OpenMAMA
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
symbollist.h File Reference
#include "mama/mama.h"
#include <mama/config.h>
#include "mama/symbollisttypes.h"

Go to the source code of this file.

Typedefs

typedef voidclosure
 
typedef mamaSymbolListMember member
 

Functions

typedef mama_status (MAMACALLTYPE *addSymbolCbType)(mamaSymbolListMember symbol
 Prototype for add symbol callback. More...
 
typedef void (MAMACALLTYPE *mamaSymbolListIterateCompleteFunc)(mamaSymbolList symbolList
 Function invoked when completing the iteration over the symbol list using mamaSymbolList_iterate(). More...
 
MAMAExpDLL mama_status mamaSymbolList_addMember (mamaSymbolList symbolList, mamaSymbolListMember member)
 Add a symbol member to the symbol list, this will cause the add callback to be invoked if it has been installed. More...
 
MAMAExpDLL mama_status mamaSymbolList_allocate (mamaSymbolList *symbolList)
 Allocate and initialize memory for a new symbolList, mamaSymbolList_deallocate should be called on the returned symbol list. More...
 
MAMAExpDLL mamaSymbolListMember mamaSymbolList_allocateMember (mamaSymbolList symbolList)
 Allocate a symbolListMember. More...
 
MAMAExpDLL mama_status mamaSymbolList_clear (mamaSymbolList symbolList, int membersToo)
 Clear the symbol list. More...
 
MAMAExpDLL mama_status mamaSymbolList_deallocate (mamaSymbolList symbolList)
 Free a symbol list created by mamaSymbolList_allocate. More...
 
MAMAExpDLL mama_status mamaSymbolList_deallocateMember (mamaSymbolList symbolList, mamaSymbolListMember member)
 Deallocate a symbolListMember. More...
 
MAMAExpDLL mama_status mamaSymbolList_deallocateWithMembers (mamaSymbolList symbolList)
 Free the memory for the symbolList and all members. More...
 
MAMAExpDLL mama_status mamaSymbolList_findMember (const mamaSymbolList symbolList, const char *symbol, const char *source, mamaTransport transport, mamaSymbolListMember *member)
 Find a symbol member in the symbol list. More...
 
MAMAExpDLL mama_status mamaSymbolList_getClosure (const mamaSymbolList symbolList, void **closure)
 Get the closure associated with the this symbolList. More...
 
MAMAExpDLL mama_status mamaSymbolList_getSize (const mamaSymbolList symbolList, unsigned long *size)
 Get the size of the symbolList. More...
 
MAMAExpDLL mama_status mamaSymbolList_iterate (mamaSymbolList symbolList, mamaSymbolListIterateMemberFunc memberFunc, mamaSymbolListIterateCompleteFunc completeFunc, void *iterateClosure)
 Iterate over the symbol list. More...
 
MAMAExpDLL mama_status mamaSymbolList_removeMember (mamaSymbolList symbolList, const char *symbol, const char *source, mamaTransport transport, mamaSymbolListMember *member)
 Remove a symbol member from the symbol list. More...
 
MAMAExpDLL mama_status mamaSymbolList_removeMemberByRef (mamaSymbolList symbolList, mamaSymbolListMember member)
 Remove a symbol member from the symbol list. More...
 
MAMAExpDLL mama_status mamaSymbolList_setAddSymbolHandler (mamaSymbolList symbolList, addSymbolCbType addCb)
 Registers the user defined add symbol callback with the symbolList. More...
 
MAMAExpDLL mama_status mamaSymbolList_setClosure (mamaSymbolList symbolList, void *closure)
 Set the closure associated with the this symbolList. More...
 
MAMAExpDLL mama_status mamaSymbolList_setRemoveSymbolHandler (mamaSymbolList symbolList, removeSymbolCbType removeCb)
 Registers the user defined remove symbol callback with the symbolList. More...
 

Typedef Documentation

typedef void* closure

Function Documentation

typedef mama_status ( MAMACALLTYPE *  removeSymbolCbType)

Prototype for add symbol callback.

Prototype for remove symbol callback.

The registered add symbol callback is executed for each symbol added to the symbol list.

Parameters
symbolThe symbol to be added to the list
userDataUser-data to be associated with symbol

The registered remove symbol callback is executed just prior to a symbol being removed from the symbol list.

Parameters
symbolThe symbol to be removed from the list
userDataUser-data previously associated with symbol
typedef void ( MAMACALLTYPE *  mamaSymbolListIterateCompleteFunc)

Function invoked when completing the iteration over the symbol list using mamaSymbolList_iterate().

Function invoked for each member of the symbol list when iterating using mamaSymbolList_iterate().

MAMAExpDLL mama_status mamaSymbolList_addMember ( mamaSymbolList  symbolList,
mamaSymbolListMember  member 
)

Add a symbol member to the symbol list, this will cause the add callback to be invoked if it has been installed.

Parameters
[in]symbolListThe symbolList.
[in]memberThe symbol member.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_allocate ( mamaSymbolList symbolList)

Allocate and initialize memory for a new symbolList, mamaSymbolList_deallocate should be called on the returned symbol list.

Parameters
[out]symbolListThe address of the allocated symbolList.
Returns
mama_status return code can be one of MAMA_STATUS_NOMEM MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mamaSymbolListMember mamaSymbolList_allocateMember ( mamaSymbolList  symbolList)

Allocate a symbolListMember.

Parameters
[in]symbolListThe symbolList the member to be allocated in.
Returns
Pointer to the new member.
MAMAExpDLL mama_status mamaSymbolList_clear ( mamaSymbolList  symbolList,
int  membersToo 
)

Clear the symbol list.

Parameters
[in]symbolListThe symbolList.
[in]membersTooWhether to also clear all members of the list.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_deallocate ( mamaSymbolList  symbolList)

Free a symbol list created by mamaSymbolList_allocate.

Parameters
[in]symbolListThe symbolList to be deallocated.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_deallocateMember ( mamaSymbolList  symbolList,
mamaSymbolListMember  member 
)

Deallocate a symbolListMember.

Parameters
[in]symbolListThe symbolList the member belongs to.
[in]memberThe member of the list to deallocate.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_deallocateWithMembers ( mamaSymbolList  symbolList)

Free the memory for the symbolList and all members.

Parameters
symbolListThe symbolList to be deallocated.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_findMember ( const mamaSymbolList  symbolList,
const char *  symbol,
const char *  source,
mamaTransport  transport,
mamaSymbolListMember member 
)

Find a symbol member in the symbol list.

Parameters
[in]symbolListThe symbolList.
[in]symbolThe name of the symbol to find.
[in]sourceThe source of the symbol to find.
[in]transportThe tport of the symbol to find.
[out]memberThe return symbol member (set to NULL if not found).
Returns
mama_status return code can be one of MAMA_STATUS_INVALID_ARG - the member can't be found. MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_getClosure ( const mamaSymbolList  symbolList,
void **  closure 
)

Get the closure associated with the this symbolList.

Parameters
[in]symbolListThe symbolList.
[out]closureThe closure
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_getSize ( const mamaSymbolList  symbolList,
unsigned long *  size 
)

Get the size of the symbolList.

Parameters
[in]symbolListThe symbolList.
[in]sizeThe size
Returns
mama_status value can be one of: MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_iterate ( mamaSymbolList  symbolList,
mamaSymbolListIterateMemberFunc  memberFunc,
mamaSymbolListIterateCompleteFunc  completeFunc,
void iterateClosure 
)

Iterate over the symbol list.

The "handler" function will be invoked for each

Parameters
[in]symbolListThe symbolList.
[in]memberFuncThe function invoked for each symbol list member.
[in]completeFuncThe function invoked upon completion.
[in]iterateClosureThe closure passed to each callback
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_removeMember ( mamaSymbolList  symbolList,
const char *  symbol,
const char *  source,
mamaTransport  transport,
mamaSymbolListMember member 
)

Remove a symbol member from the symbol list.

Parameters
[in]symbolListThe symbolList.
[in]symbolThe name of the symbol to be removed.
[in]sourceThe source of the symbol to be removed.
[in]transportThe tport of the symbol to be removed.
[out]memberThe return symbol member (set to NULL if not found). Note that this will be freed by the symbol list and should be used for reference only.
Returns
mama_status return code can be one of MAMA_STATUS_INVALID_ARG - the member can't be found. MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_removeMemberByRef ( mamaSymbolList  symbolList,
mamaSymbolListMember  member 
)

Remove a symbol member from the symbol list.

Parameters
symbolListThe symbolList.
memberThe symbol to be removed.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_setAddSymbolHandler ( mamaSymbolList  symbolList,
addSymbolCbType  addCb 
)

Registers the user defined add symbol callback with the symbolList.

The registered callback will get called each time a symbol is added to the symbol list.

Parameters
[in]symbolListThe symbolList.
[in]addCbPointer to the user defined callback. Must conform to function prototype addSymbolCbType.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_setClosure ( mamaSymbolList  symbolList,
void closure 
)

Set the closure associated with the this symbolList.

Parameters
[in]symbolListThe symbolList.
[in]closureThe closure
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK
MAMAExpDLL mama_status mamaSymbolList_setRemoveSymbolHandler ( mamaSymbolList  symbolList,
removeSymbolCbType  removeCb 
)

Registers the user defined remove symbol callback with the symbolList.

The registered callback will get called each time a symbol is deleted from the symbol list.

Parameters
[in]symbolListThe symbolList.
[in]removeCbPointer to the user defined callback. Must conform to function prototype removeSymbolCbType.
Returns
mama_status return code can be one of MAMA_STATUS_NULL_ARG MAMA_STATUS_OK


© 2012 Linux Foundation