Loading...
Searching...
No Matches
globus_handle_table.h
Go to the documentation of this file.
/*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOBUS_HANDLE_TABLE_H
#define GLOBUS_HANDLE_TABLE_H
#include "globus_types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct globus_l_handle_table_s * globus_handle_table_t;
typedef int globus_handle_t;
typedef
void
(*globus_handle_destructor_t)(
void * datum);
#define GLOBUS_NULL_HANDLE 0
#define GLOBUS_HANDLE_TABLE_NO_HANDLE 0
int
globus_handle_table_init(
globus_handle_table_t * handle_table,
globus_handle_destructor_t destructor);
int
globus_handle_table_destroy(
globus_handle_table_t * handle_table);
globus_handle_t
globus_handle_table_insert(
globus_handle_table_t * handle_table,
void * datum,
int initial_refs);
globus_bool_t
globus_handle_table_increment_reference(
globus_handle_table_t * handle_table,
globus_handle_t handle);
globus_bool_t
globus_handle_table_increment_reference_by(
globus_handle_table_t * handle_table,
globus_handle_t handle,
unsigned int inc);
globus_bool_t
globus_handle_table_decrement_reference(
globus_handle_table_t * handle_table,
globus_handle_t handle);
void *
globus_handle_table_lookup(
globus_handle_table_t * handle_table,
globus_handle_t handle);
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_HANDLE_TABLE_H */
globus_types.h
Common Primitive Types.
globus_bool_t
int globus_bool_t
Boolean type.
Definition globus_types.h:93
globus_handle_table_init
int globus_handle_table_init(globus_handle_table_t *handle_table, globus_handle_destructor_t destructor)
Definition globus_handle_table.c:62
globus_handle_table_destroy
int globus_handle_table_destroy(globus_handle_table_t *handle_table)
Destroy a handle table.
Definition globus_handle_table.c:109
globus_handle_destructor_t
void(* globus_handle_destructor_t)(void *datum)
Handle datum destructor.
Definition globus_handle_table.h:67
globus_handle_t
int globus_handle_t
Handle abstract type.
Definition globus_handle_table.h:57
globus_handle_table_insert
globus_handle_t globus_handle_table_insert(globus_handle_table_t *handle_table, void *datum, int initial_refs)
Definition globus_handle_table.c:186
globus_handle_table_decrement_reference
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_handle_table_increment_reference_by
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_handle_table_increment_reference
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
globus_handle_table_lookup
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
globus_handle_table_t
struct globus_l_handle_table_s * globus_handle_table_t
Handle table abstract type.
Definition globus_handle_table.h:51