Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
globus_handle_table.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
38 #ifndef GLOBUS_HANDLE_TABLE_H
39 #define GLOBUS_HANDLE_TABLE_H
40 
41 #include "globus_types.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
51 typedef struct globus_l_handle_table_s * globus_handle_table_t;
52 
57 typedef int globus_handle_t;
58 
65 typedef
66 void
68  void * datum);
69 
75 #define GLOBUS_NULL_HANDLE 0
76 #define GLOBUS_HANDLE_TABLE_NO_HANDLE 0
77 
78 int
80  globus_handle_table_t * handle_table,
81  globus_handle_destructor_t destructor);
82 
83 int
85  globus_handle_table_t * handle_table);
86 
87 globus_handle_t
89  globus_handle_table_t * handle_table,
90  void * datum,
91  int initial_refs);
92 
95  globus_handle_table_t * handle_table,
96  globus_handle_t handle);
97 
100  globus_handle_table_t * handle_table,
101  globus_handle_t handle,
102  unsigned int inc);
103 
106  globus_handle_table_t * handle_table,
107  globus_handle_t handle);
108 
109 void *
111  globus_handle_table_t * handle_table,
112  globus_handle_t handle);
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* GLOBUS_HANDLE_TABLE_H */
Common Primitive Types.
int globus_handle_table_destroy(globus_handle_table_t *handle_table)
Destroy a handle table.
Definition: globus_handle_table.c:109
struct globus_l_handle_table_s * globus_handle_table_t
Handle table abstract type.
Definition: globus_handle_table.h:51
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
globus_handle_t globus_handle_table_insert(globus_handle_table_t *handle_table, void *value, int initial_refs)
Definition: globus_handle_table.c:186
void * globus_handle_table_lookup(globus_handle_table_t *handle_table, globus_handle_t handle)
Resolve a handle its datum.
Definition: globus_handle_table.c:414
int globus_handle_t
Handle abstract type.
Definition: globus_handle_table.h:57
globus_bool_t globus_handle_table_increment_reference_by(globus_handle_table_t *handle_table, globus_handle_t handle, unsigned int inc)
Increment the reference count for handle.
Definition: globus_handle_table.c:268
globus_bool_t globus_handle_table_decrement_reference(globus_handle_table_t *handle_table, globus_handle_t handle)
Remove a reference to a handle.
Definition: globus_handle_table.c:325
globus_bool_t globus_handle_table_increment_reference(globus_handle_table_t *handle_table, globus_handle_t handle)
Add a reference to a handle table entry.
Definition: globus_handle_table.c:391
void(* globus_handle_destructor_t)(void *datum)
Handle datum destructor.
Definition: globus_handle_table.h:67
int globus_handle_table_init(globus_handle_table_t *handle_table, globus_handle_destructor_t destructor)
Definition: globus_handle_table.c:62