globus_common - Globus Common API
Contents
Common Runtime Components
• Threading
• GlobusCallback
• MemoryPool
• ModuleActivationManagementContainer Data Types
• LinkedList
• FIFOQueue
• HandleTableforReferenceCountingData
• HashTable
• PriorityQueueDetailed Description
Common Data Structures and Functions.
Error Handling
• GlobusErrorAPIFunction Documentation
globus_result_tglobus_eval_path(constchar*pathstring,char**bufp)Parameterspathstring A string containing any number of variable path references using the syntax ${PATH-NAME}
Supported path elements are
• prefix
• exec_prefix
• sbindir
• bindir
• libdir
• libexecdir
• includedir
• datarootdir
• datadir
• mandir
• sysconfdir
• sharedstatedir
• localstatedir
• perlmoduledir These strings are based on the parameters passed to this package configure script,
but modified so that if GLOBUS_LOCATION is set in the environment, it is used instead of the
configured path.
bufp Pointer to be set to a newly allocated string that has recursively resolved all substitution
paths.
intglobus_tilde_expand(unsignedlongoptions,globus_bool_turl_form,char*inpath,char**outpath)
Expand ~ and/or ~user in path strings. Expand the leading ~ (or ~user) characters from inpath to the home
directory path of the current user (or user specified in ~user); the result is stored in a newly
allocated buffer *outpath (which will need to be freed by a call to globus_free.) The string following
the ~/or ~user/ is copied verbatim to the output string.
Parametersoptions The expansion is conditioned by the options as defined in globus_tilde_expand.h:
• GLOBUS_TILDE_EXPAND: expand ~
• GLOBUS_TILDE_USER_EXPAND: expand ~user Otherwise, the corresponding form is not expanded (just
copied int the output path)
url_form True if the inpath follows an URL format (/~) Used when expanding an url (for :
<scheme>://host[:port][/path] were /path can be of the form /~[user][/...]. Otherwise, the form
~[user][/...] is expected.
inpath Input string to expand.
outpath Output string; Need to be freed when not used anymore.
Miscellaneous Utilities
• GlobusUUIDGenerator
• URLStringParserName
globus_common - Globus Common API
- Common Data Structures and Functions.
Synopsis
ModulesGlobusCallback
Globus Callback Function Interface.
GlobusErrorAPI
Globus Error API.
FIFOQueue
FIFO Queue Implementation.
HandleTableforReferenceCountingData
Handle Table for Reference Counting Data.
HashTable
Hash Table.
LinkedList
Linked List.
MemoryPool
Memory Pool.
ModuleActivationManagement
Module Activation Management.
PriorityQueue
Priority Queue.
Threading
Portable Thread Abstraction.
ThreadPooling
Thread Pooling.
URLStringParser
URL String Parser.
GlobusUUIDGenerator
UUID Generator.
Macros
#define GLOBUS_COMMON_MODULE (&globus_i_common_module)
Globus Common Module Descriptor.
#define GLOBUS_TILDE_EXPAND
Expand ~.
#define GLOBUS_TILDE_USER_EXPAND
Expand ~user.
#define GLOBUS_TRUE 1
True value for globus_bool_t.
#define GLOBUS_FALSE 0
False value for globus_bool_t.
#define GLOBUS_SUCCESS 0
Generic success result
Most Globus API functions return this value to indicate success, or some error constant or
globus_result_t to indicate an error. "
#define GLOBUS_FAILURE -1
Generic failure result
Some Globus API functions without good error handling return this value to indicate some undetermined
error occurred. "
Typedefs
typedef size_t globus_size_t
Standard size of memory object
The globus_size_t is the size of a memory object. It is identical to size_t in all cases and doesn't need
to be used ever. "
typedef socklen_t globus_socklen_t
Size of a socket length parameter.
typedef unsigned char globus_byte_t
Unsigned byte datatype
This is used for byte-addressable arrays of arbitrary data which is not subject to sign extension. "
typedef int globus_bool_t
Boolean type.
typedef uint32_t globus_result_tFunctionsglobus_result_tglobus_eval_path (const char *pathstring, char **bufp)
int globus_tilde_expand (unsigned long options, globus_bool_t url_form, char *inpath, char **outpath)
Expand ~ and/or ~user in path strings.
Typedef Documentation
typedefintglobus_bool_t
Boolean type. Set values to either the constant GLOBUS_TRUE and GLOBUS_FALSE
typedefuint32_tglobus_result_t
Weak pointer to a Globus Error object, or the special value GLOBUS_SUCCESS
typedefsocklen_tglobus_socklen_t
Size of a socket length parameter. The globus_socklen_t type is part of the POSIX socket interface and is
also available in winsock2.h. In older UNIX implementations, this was variously a size_t or an int.
