globus_handle_table.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00036 #ifndef GLOBUS_HANDLE_TABLE_H
00037 #define GLOBUS_HANDLE_TABLE_H
00038 
00039 #include "globus_types.h"
00040 
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044 
00049 typedef struct globus_l_handle_table_s * globus_handle_table_t;
00050 
00055 typedef int globus_handle_t;
00056 
00063 typedef 
00064 void 
00065 (*globus_handle_destructor_t)(
00066     void *                              datum);
00067 
00073 #define GLOBUS_NULL_HANDLE 0
00074 #define GLOBUS_HANDLE_TABLE_NO_HANDLE 0
00075 
00076 int
00077 globus_handle_table_init(
00078     globus_handle_table_t *             handle_table,
00079     globus_handle_destructor_t          destructor);
00080 
00081 int
00082 globus_handle_table_destroy(
00083     globus_handle_table_t *             handle_table);
00084 
00085 globus_handle_t
00086 globus_handle_table_insert(
00087     globus_handle_table_t *             handle_table,
00088     void *                              datum,
00089     int                                 initial_refs);
00090 
00091 globus_bool_t
00092 globus_handle_table_increment_reference(
00093     globus_handle_table_t *             handle_table,
00094     globus_handle_t                     handle);
00095 
00096 globus_bool_t
00097 globus_handle_table_increment_reference_by(
00098     globus_handle_table_t *             handle_table,
00099     globus_handle_t                     handle,
00100     unsigned int                        inc);
00101 
00102 globus_bool_t
00103 globus_handle_table_decrement_reference(
00104     globus_handle_table_t *             handle_table,
00105     globus_handle_t                     handle);
00106 
00107 void *
00108 globus_handle_table_lookup(
00109     globus_handle_table_t *             handle_table,
00110     globus_handle_t                     handle);
00111 
00112 #ifdef __cplusplus
00113 }
00114 #endif
00115 
00116 #endif /* GLOBUS_HANDLE_TABLE_H */

Generated on 20 Jun 2015 for globus_common by  doxygen 1.4.7