component_manager.h File Reference


Functions

int CmAcquire (OpenComponentManagerHandle *p_cm)
 If no component manager exist, initializes a component manager.
int CmRelease ()
 Decrement a reference counter and destroy a component manager if it becomes zero.
int CmAddComponent (OpenComponentInitializer init_func)
 Register a buitin component in a component manager.
int CmLoadComponent (const char *path, const char *initializer_function_name)
 Load a dynamic library if not loaded, and register the component with a given initializer function in a component manager.
int CmFreeComponent (const char *component_name)
 Deallocate all instances of a given component, unregister a component in a component manager, and free all component resources using Free function.


Function Documentation

int CmAcquire ( OpenComponentManagerHandle p_cm  ) 

If no component manager exist, initializes a component manager.

Otherwise, increases a component manager reference count.

This function is safe to call from multiple threads.

Parameters:
[out] p_cm - on return, points to a component manager interface handle
Returns:
APR_SUCCESS if successful, or a non-zero error code.

int CmRelease (  ) 

Decrement a reference counter and destroy a component manager if it becomes zero.

The caller should ensure no cached handles will be used.

This function is safe to call from multiple threads.

Returns:
APR_SUCCESS if successful, or a non-zero error code.

int CmAddComponent ( OpenComponentInitializer  init_func  ) 

Register a buitin component in a component manager.

Parameters:
init_func - initializer function which provides a default and private interfaces for the component
This function is safe to call from multiple threads.

Returns:
APR_SUCCESS if successful, or a non-zero error code.

int CmLoadComponent ( const char *  path,
const char *  initializer_function_name 
)

Load a dynamic library if not loaded, and register the component with a given initializer function in a component manager.

This function is safe to call from multiple threads.

Parameters:
path - path to DLL which contains a component
initializer_function_name - a name of a function of OpenComponentInitializer type that registers a component in a component manager
Returns:
APR_SUCCESS if successful, or a non-zero error code.

int CmFreeComponent ( const char *  component_name  ) 

Deallocate all instances of a given component, unregister a component in a component manager, and free all component resources using Free function.

If the component is loaded from a dynamic library and no components are using the library, then unload the dynamic library.

This function is safe to call from multiple threads.

Returns:
APR_SUCCESS if successful, or a non-zero error code.


Genereated on Tue Mar 11 19:25:22 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.