OpenMAMA
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 mama_status(MAMACALLTYPE * addSymbolCbType) (mamaSymbolListMember symbol, void *closure)
 Prototype for add symbol callback. More...
 
typedef void(MAMACALLTYPE * mamaSymbolListIterateCompleteFunc) (mamaSymbolList symbolList, void *closure)
 Function invoked when completing the iteration over the symbol list using mamaSymbolList_iterate(). More...
 
typedef void(MAMACALLTYPE * mamaSymbolListIterateMemberFunc) (mamaSymbolList symbolList, mamaSymbolListMember member, void *closure)
 Function invoked for each member of the symbol list when iterating using mamaSymbolList_iterate(). More...
 
typedef mama_status(MAMACALLTYPE * removeSymbolCbType) (mamaSymbolListMember symbol, void *closure)
 Prototype for remove symbol callback. More...
 

Functions

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

◆ addSymbolCbType

typedef mama_status(MAMACALLTYPE * addSymbolCbType) (mamaSymbolListMember symbol, void *closure)

Prototype for add 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

◆ mamaSymbolListIterateCompleteFunc

typedef void(MAMACALLTYPE * mamaSymbolListIterateCompleteFunc) (mamaSymbolList symbolList, void *closure)

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

◆ mamaSymbolListIterateMemberFunc

typedef void(MAMACALLTYPE * mamaSymbolListIterateMemberFunc) (mamaSymbolList symbolList, mamaSymbolListMember member, void *closure)

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

◆ removeSymbolCbType

typedef mama_status(MAMACALLTYPE * removeSymbolCbType) (mamaSymbolListMember symbol, void *closure)

Prototype for remove symbol callback.

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

Function Documentation

◆ mamaSymbolList_addMember()

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

◆ mamaSymbolList_allocate()

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

◆ mamaSymbolList_allocateMember()

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.

◆ mamaSymbolList_clear()

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

◆ mamaSymbolList_deallocate()

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

◆ mamaSymbolList_deallocateMember()

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

◆ mamaSymbolList_deallocateWithMembers()

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

◆ mamaSymbolList_findMember()

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

◆ mamaSymbolList_getClosure()

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

◆ mamaSymbolList_getSize()

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

◆ mamaSymbolList_iterate()

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

◆ mamaSymbolList_removeMember()

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

◆ mamaSymbolList_removeMemberByRef()

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

◆ mamaSymbolList_setAddSymbolHandler()

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

◆ mamaSymbolList_setClosure()

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

◆ mamaSymbolList_setRemoveSymbolHandler()

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