.TH "globus_extension.h" 3 "Version 18.14" "globus_common" \" -*- nroff -*- .ad l .nh .SH NAME globus_extension.h \- Globus Extension Modules\&. .SH SYNOPSIS .br .PP \fC#include 'globus_common_include\&.h'\fP .br \fC#include 'globus_module\&.h'\fP .br \fC#include 'globus_hashtable\&.h'\fP .br .SS "Macros" .in +1c .ti -1c .RI "#define \fBGlobusExtensionDefineModule\fP(name) \fBglobus_module_descriptor_t\fP name##_module" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBglobus_extension_activate\fP (const char *extension_name)" .br .ti -1c .RI "void * \fBglobus_extension_lookup\fP (globus_extension_handle_t *handle, globus_extension_registry_t *registry, void *symbol)" .br .ti -1c .RI "int \fBglobus_extension_register_builtin\fP (const char *extension_name, \fBglobus_module_descriptor_t\fP *module_descriptor)" .br .in -1c .SH "Detailed Description" .PP Globus Extension Modules\&. .SH "Macro Definition Documentation" .PP .SS "#define GlobusExtensionDefineModule(name) \fBglobus_module_descriptor_t\fP name##_module" Declare your module with the following\&. .PP Ex: \fBGlobusExtensionDefineModule(my_module)\fP = { 'my_module', globus_l_my_module_activate, globus_l_my_module_deactivate, NULL, NULL, &local_version }; .SH "Function Documentation" .PP .SS "int globus_extension_activate (const char * extension_name)" loads the shared library 'lib\fBextension_name\fP_\fBflavor\fP\&.so' from $GLOBUS_LOCATION/lib (or other location in LD_LIBRARY_PATH and activates the module defined within\&. .PP In the future, a configuration file will be supported allowing arbitrary extension names to be mapped to a specific library name\&. .PP Also, when builtin (compiled in) extensions are supported, this will activate those directly without needing to load the library\&. .PP Search order: .IP "\(bu" 2 \fBextension_name\fP in mappings hash XXX not implemented .IP " \(bu" 4 mapped name in builtin hash XXX not implemented .IP " \(bu" 4 mapped name in dll hash XXX not implemented .IP " \(bu" 4 load mapped name XXX not implemented .PP .IP "\(bu" 2 \fBextension_name\fP in builtin hash .IP "\(bu" 2 \fBextension_name\fP in dll hash .IP "\(bu" 2 load library if(strchr(\fBextension_name\fP, '/')) .IP " \(bu" 4 concatenate / + dirname(\fBextension_name\fP) + /lib + basename(\fBextension_name\fP) + _\&.so to $GLOBUS_LOCATION/lib and each search path in mappings file XXX not implemented (eg, for \fBextension_name\fP == wsrf/services/CounterService, load $GLOBUS_LOCATION/lib/wsrf/services/libCounterService_gcc32dbg\&.so) .IP " \(bu" 4 lib + basename(\fBentension_name\fP) + _\fBflavor\fP\&.so subject to LD_LIBRARY_PATH else .IP " \(bu" 4 load lib\fBextension_name\fP_\fBbuild_flavor\fP subject to LD_LIBRARY_PATH .PP .PP .SS "void * globus_extension_lookup (globus_extension_handle_t * handle, globus_extension_registry_t * registry, void * symbol)" Get the datum associated with symbol in this registry\&. .PP You MUST call globus_extension_release() when you are done using the data\&. the lookup() and release() calls handle the reference counting that prevents an extension from being unloaded while things it provides are being used\&. Do NOT call release() until you are done accessing the data from * the lookup() call\&. .PP release() could potentially block as a result of module deactivation and unloading\&. ensuring that globus_extension_deactivate() is not called with outstanding references will prevent that\&. .PP symbol is a char * by default\&. the key can be changed by calling globus_extension_registry_set_hashing() before it is accessed\&. .SS "int globus_extension_register_builtin (const char * extension_name, \fBglobus_module_descriptor_t\fP * module_descriptor)" hopefully in the future, these functions will only be needed by generated code .SH "Author" .PP Generated automatically by Doxygen for globus_common from the source code\&.