![]() |
|
|||
File indexing completed on 2025-02-22 10:38:43
0001 /* 0002 * Copyright (c) CERN 2013-2017 0003 * 0004 * Copyright (c) Members of the EMI Collaboration. 2010-2013 0005 * See http://www.eu-emi.eu/partners for details on the copyright 0006 * holders. 0007 * 0008 * Licensed under the Apache License, Version 2.0 (the "License"); 0009 * you may not use this file except in compliance with the License. 0010 * You may obtain a copy of the License at 0011 * 0012 * http://www.apache.org/licenses/LICENSE-2.0 0013 * 0014 * Unless required by applicable law or agreed to in writing, software 0015 * distributed under the License is distributed on an "AS IS" BASIS, 0016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0017 * See the License for the specific language governing permissions and 0018 * limitations under the License. 0019 */ 0020 0021 #pragma once 0022 #ifndef GFAL_GLOBAL_H_ 0023 #define GFAL_GLOBAL_H_ 0024 0025 #if !defined(__GFAL2_H_INSIDE__) && !defined(__GFAL2_BUILD__) 0026 # warning "Direct inclusion of gfal2 headers is deprecated. Please, include only gfal_api.h or gfal_plugins_api.h" 0027 #endif 0028 0029 #include <glib.h> 0030 #include "gfal_deprecated.h" 0031 0032 #ifdef __cplusplus 0033 extern "C" 0034 { 0035 #endif 0036 0037 /** 0038 * A gfal2 context is a separated instance of the gfal2 library 0039 * Each context owns his parameters, file descriptors 0040 * Context allows to have separated instance of GFAL with different parameters 0041 * providing an advanced interface to GFAL 0042 */ 0043 typedef struct gfal_handle_* gfal2_context_t; 0044 0045 /** 0046 * @brief Create a gfal2 context 0047 * 0048 * Each context contain its own set of parameters and configurations ( \ref config_group ) 0049 * A context can be used in multiple threads at the same time ( Thread-safe ). 0050 * 0051 * @param err : GError error report system 0052 * @return a context if success, NULL if error 0053 */ 0054 gfal2_context_t gfal2_context_new(GError ** err); 0055 0056 /** 0057 * Free a gfal2 context 0058 * It is safe to delete a NULL context 0059 */ 0060 void gfal2_context_free(gfal2_context_t context); 0061 0062 /** 0063 * Get list of loaded plugins 0064 * The returned list must be freed using g_strfreev 0065 */ 0066 gchar** gfal2_get_plugin_names(gfal2_context_t context); 0067 0068 /** For errors, gfal2 core quark */ 0069 #define GFAL2_QUARK_CORE "GFAL2::CORE" 0070 /** For errors, gfal2 configuration quark */ 0071 #define GFAL2_QUARK_CONFIG "GFAL2::CONFIG" 0072 /** For errors, gfal2 plugins quark */ 0073 #define GFAL2_QUARK_PLUGINS "GFAL2::PLUGINS" 0074 0075 /** 0076 * GQuark for the gfal2 core namespace 0077 * GQuark are used by the GError gfal2 error system in order to determine the scope of one error 0078 * GQuark String : "GFAL2::CORE" 0079 */ 0080 GQuark gfal2_get_core_quark(); 0081 0082 0083 /** 0084 * GQuark for the gfal2 config namespace 0085 * GQuark are used by the GError gfal2 error system in order to determine the scope of one error 0086 * GQuark String : "GFAL2::CONFIG" 0087 */ 0088 GQuark gfal2_get_config_quark(); 0089 0090 /** 0091 * GQuark for the gfal2 plugin namespace 0092 * GQuark String : "GFAL2::PLUGINS" 0093 * Any plugin specific GQuark follows this pattern GFAL2::PLUGINS::NAME 0094 * Example srm plugin : GFAL2::PLUGINS::SRM 0095 */ 0096 GQuark gfal2_get_plugins_quark(); 0097 0098 0099 #ifdef __cplusplus 0100 } 0101 #endif 0102 0103 #endif /* GFAL_GLOBAL_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |