![]() |
|
|||
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 #ifndef GFAL_FILE_HANDLE_H 0022 #define GFAL_FILE_HANDLE_H 0023 #pragma once 0024 0025 0026 #if !defined(__GFAL2_H_INSIDE__) && !defined(__GFAL2_BUILD__) 0027 # warning "Direct inclusion of gfal2 headers is deprecated. Please, include only gfal_api.h or gfal_plugins_api.h" 0028 #endif 0029 0030 #include <glib.h> 0031 #include <stdlib.h> 0032 0033 #ifdef __cplusplus 0034 extern "C" 0035 { 0036 #endif 0037 0038 typedef struct _gfal_file_handle_container *gfal_file_handle_container; 0039 typedef struct _gfal_file_handle* gfal_file_handle; 0040 0041 /** 0042 * @brief create a gfal file handle 0043 * @param module_name : module name must be the plugin_name of the plugin creating the gfal_file_handle, \ref _gfal_plugin_interface 0044 * @param gpointer : internal file descriptor of the plugin to store* 0045 */ 0046 gfal_file_handle gfal_file_handle_new(const char* module_name, gpointer fdesc); 0047 /** 0048 * same than \ref gfal_file_handle_new but allows to store user data in the gfal file descriptor 0049 * allow the usage of the readdirpp operation in case of directory file handle 0050 */ 0051 gfal_file_handle gfal_file_handle_new2(const char *module_name, gpointer fdesc, gpointer user_data, const char *file_path); 0052 0053 /** 0054 * return the file descriptor of this gfal file handle 0055 */ 0056 gpointer gfal_file_handle_get_fdesc(gfal_file_handle fh); 0057 0058 /** 0059 * set the file descriptor 0060 */ 0061 void gfal_file_handle_set_fdesc(gfal_file_handle fh, gpointer fdesc); 0062 0063 /** 0064 * return the user data of this gfal file descriptor 0065 */ 0066 gpointer gfal_file_handle_get_user_data(gfal_file_handle fh); 0067 0068 /** 0069 * return the file path associated to the file handle 0070 */ 0071 const gchar* gfal_file_handle_get_path(gfal_file_handle fh); 0072 0073 /** 0074 * delete an existing gfal file descriptor 0075 * a file descriptor must be deleted by the plugin in the "close" functions 0076 */ 0077 void gfal_file_handle_delete(gfal_file_handle fh); 0078 0079 /** 0080 * Lock file handler 0081 */ 0082 void gfal_file_handle_lock(gfal_file_handle fh); 0083 0084 /** 0085 * Unlock file handler 0086 */ 0087 void gfal_file_handle_unlock(gfal_file_handle fh); 0088 0089 #ifdef __cplusplus 0090 } 0091 #endif 0092 0093 #endif /* GFAL_FILE_HANDLE_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |