CERN org.glite.Gfal
2.0.1
|
00001 #pragma once 00002 /* 00003 * Copyright (c) Members of the EGEE Collaboration. 2004. 00004 * See http://www.eu-egee.org/partners/ for details on the copyright holders. 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00027 #include <gfal_srm_ifce.h> 00028 #include <gfal_srm_ifce_types.h> 00029 #include <glib.h> 00030 00031 #include <common/gfal_types.h> 00032 #include "gfal_common_srm_endpoint.h" 00033 #include "gfal_common_srm.h" 00034 00035 00036 00037 // request type for surl <-> turl translation 00038 typedef enum _srm_req_type{ 00039 SRM_GET, 00040 SRM_PUT 00041 } srm_req_type; 00042 00043 00048 struct _gfal_srm_external_call{ 00049 00050 void (*srm_context_init)(struct srm_context *context,char *srm_endpoint,char *errbuf,int errbufsz,int verbose); 00051 00052 int (*srm_ls)(struct srm_context *context, 00053 struct srm_ls_input *input,struct srm_ls_output *output); 00054 00055 int (*srm_rm)(struct srm_context *context, 00056 struct srm_rm_input *input,struct srm_rm_output *output); 00057 00058 int (*srm_rmdir)(struct srm_context *context, 00059 struct srm_rmdir_input *input,struct srm_rmdir_output *output); 00060 00061 int (*srm_mkdir)(struct srm_context *context, 00062 struct srm_mkdir_input *input); 00063 00064 int (*srm_getpermission) (struct srm_context *context, 00065 struct srm_getpermission_input *input,struct srm_getpermission_output *output); 00066 00067 int (*srm_check_permission)(struct srm_context *context, 00068 struct srm_checkpermission_input *input,struct srmv2_filestatus **statuses); 00069 00070 int (*srm_prepare_to_get)(struct srm_context *context, 00071 struct srm_preparetoget_input *input,struct srm_preparetoget_output *output); 00072 00073 void (*srm_srmv2_pinfilestatus_delete)(struct srmv2_pinfilestatus* srmv2_pinstatuses, int n); 00074 00075 void (*srm_srmv2_mdfilestatus_delete)(struct srmv2_mdfilestatus* mdfilestatus, int n); 00076 00077 void (*srm_srmv2_filestatus_delete)(struct srmv2_filestatus* srmv2_statuses, int n); 00078 00079 void (*srm_srm2__TReturnStatus_delete)(struct srm2__TReturnStatus* status); 00080 00081 int (*srm_prepare_to_put)(struct srm_context *context, 00082 struct srm_preparetoput_input *input,struct srm_preparetoput_output *output); 00083 00084 int (*srm_put_done)(struct srm_context *context, 00085 struct srm_putdone_input *input, struct srmv2_filestatus **statuses); 00086 00087 int (*srm_setpermission) (struct srm_context *context, 00088 struct srm_setpermission_input *input); 00089 00090 }; 00091 00092 extern struct _gfal_srm_external_call gfal_srm_external_call; 00093 00094 int gfal_check_fullendpoint_in_surl(const char * surl, GError ** err); 00095 00096 00097 gboolean gfal_srm_surl_group_checker(gfal_srmv2_opt* opts,char** surls, GError** err); 00098 00099 int gfal_srm_getTURLS_plugin(plugin_handle ch, const char* surl, char* buff_turl, int size_turl, char** reqtoken, GError** err); 00100 00101 int gfal_srm_putTURLS_plugin(plugin_handle ch, const char* surl, char* buff_turl, int size_turl, char** reqtoken, GError** err); 00102 00103 int gfal_srm_getTURLS(gfal_srmv2_opt* opts, char** surls, gfal_srm_result** resu, GError** err); 00104 00105 int gfal_srm_putTURLS(gfal_srmv2_opt* opts , char** surls, gfal_srm_result** resu, GError** err); 00106 00107 int gfal_srm_putdone(gfal_srmv2_opt* opts, char** surls, char* token, GError** err); 00108 00109 int gfal_srm_unlinkG(plugin_handle ch, const char * path, GError** err); 00110 00111 void gfal_srm_report_error(char* errbuff, GError** err); 00112 00113