CERN org.glite.Gfal  2.0.1
/builddir/build/BUILD/gfal2-2.0.0/src/common/gfal_constants.h
Go to the documentation of this file.
00001 #pragma once
00002 #ifndef _GFAL_CONSTANTS_H
00003 #define _GFAL_CONSTANTS_H
00004 
00005 /*
00006  * Copyright (c) Members of the EGEE Collaboration. 2004.
00007  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00008  *
00009  * Licensed under the Apache License, Version 2.0 (the "License");
00010  * you may not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  * 
00013  *     http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing, software
00016  * distributed under the License is distributed on an "AS IS" BASIS,
00017  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  * See the License for the specific language governing permissions and
00019  * limitations under the License.
00020  */
00021  
00022 
00023  
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif 
00034 
00035 
00036 
00037 
00038 #define MAX_PLUGIN_LIST 64
00039 
00040 /* used to check wether there is enough space on the SE */
00041 #define GFAL_NEWFILE_SIZE         1024
00042 #define GFAL_MODULE_NAME_SIZE   1024
00043 #define GFAL_OPEN_MAX             1024
00044 #define GFAL_DEFAULT_PLUGIN_TYPE "lfc"
00045 #define GFAL_FQAN_MAX             64
00046 #define GFAL_GUID_LEN             37
00047 #define GFAL_VO_MAXLEN            255
00048 #define GFAL_FQAN_MAXLEN          511
00049 #define GFAL_HOSTNAME_MAXLEN      255
00050 #define GFAL_PATH_MAXLEN          1024
00051 #define GFAL_ERRMSG_LEN           1024
00052 #define GFAL_BDII_TIMEOUT         60
00053 #define GFAL_SIZE_MARGIN          1048576     // 1MB
00054 #define GFAL_SRM_MAXRETRIES       10
00055 #define GFAL_MAX_PLUGIN_ID_SIZE 512
00056 
00057 /* GFAL error level for gfal_errmsg */
00058 #define GFAL_ERRMSG_LEN                   1024
00059 #define GFAL_ERRLEVEL_ERROR       0
00060 #define GFAL_ERRLEVEL_WARN        1
00061 #define GFAL_ERRLEVEL_INFO        2
00062 
00063 #define GFAL_VERBOSE_NORMAL     0x00    
00064 #define GFAL_VERBOSE_VERBOSE    0x01    
00065 #define GFAL_VERBOSE_DEBUG      0x02    
00066 #define GFAL_VERBOSE_TRACE              0x08    
00069 #define GFAL_GUID_PREFIX "guid:"
00070 
00071 // default buffer size for address
00072 #define GFAL_URL_MAX_LEN 2048
00073 
00074 #define GFAL_MODULEID_LOCAL "local_file_module"
00075 #define GFAL_MODULEID_SRM 2
00076 #define GFAL_EXTERNAL_MODULE_OFFSET 10
00077 
00078 #define GFAL_PLUGIN_DIR_ENV "GFAL_PLUGIN_DIR" 
00079 #define GFAL_PLUGIN_DIR_SUFFIX "gfal2-plugins" 
00080 #define GFAL_PLUGIN_INIT_SYM "gfal_plugin_init"
00081 #define GFAL_MAX_PLUGIN_LIST 2048
00082 
00083 
00084 // xattr standard keys for getxattr / setxattr
00085 #define GFAL_XATTR_REPLICA "user.replicas" // global key of replicas for the extended attributes 
00086 #define GFAL_XATTR_GUID "user.guid" // global key for the guid of a file 
00087 #define GFAL_XATTR_COMMENT "user.comment" // global key for the comments of a file 
00088 #define GFAL_XATTR_CHKSUM_TYPE "user.chksumtype"
00089 #define GFAL_XATTR_CHKSUM_VALUE "user.checksum"
00090 #define GFAL_XATTR_STATUS "user.status" 
00091 
00092 // xattr standard values 
00093 // list of standard values return by getxattr for status key
00094 #define GFAL_XATTR_STATUS_ONLINE "ONLINE"
00095 #define GFAL_XATTR_STATUS_NEARLINE "NEARLINE "
00096 #define GFAL_XATTR_STATUS_NEARLINE_ONLINE "ONLINE_AND_NEARLINE"
00097 #define GFAL_XATTR_STATUS_UNKNOW "UNKNOW"
00098 #define GFAL_XATTR_STATUS_LOST "LOST"
00099 #define GFAL_XATTR_STATUS_UNAVAILABLE "UNAVAILABLE"
00100 
00101 
00102 
00103 // plugins entry points for the new system of plugins
00104 //  int plugin_url_transfer_check(plugin_handle handle, const char* src, const char* dst, gfal_transfer_type type )
00105 // return true if url is compatible with this plugin else false
00106 #define GFAL_PLUGIN_URL_TRANSFER_CHECK "plugin_url_transfer_check"
00107 
00108 
00109 // parameters list for core
00110 #define GFAL_NO_BDII_OPTION "no_bdii" // set bdii value, can be True or False
00111 
00112 
00113 #ifdef __cplusplus
00114 }
00115 #endif 
00116 
00117 #endif