OpenMAMA
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sourceman.h File Reference
#include "mama/config.h"
#include "mama/status.h"
#include "mama/types.h"
#include "mama/quality.h"
#include "mama/log.h"
#include "mama/source.h"

Go to the source code of this file.

Typedefs

typedef mamaSource source
typedef mamaSource voidclosure

Functions

typedef void (MAMACALLTYPE *mamaSourceManager_sourcesIteratorCb)(mamaSourceManager sourceManager
MAMAExpDLL mama_status mamaSourceManager_create (mamaSourceManager *sourceManager)
 Create a mamaSourceManager object.
MAMAExpDLL mama_status mamaSourceManager_destroy (mamaSourceManager sourceManager)
 Destroy a mamaSourceManager object.
MAMAExpDLL mama_status mamaSourceManager_createSource (mamaSourceManager sourceManager, const char *name, mamaSource *source)
 Create a new mamaSource and add it to the manager.
MAMAExpDLL mama_status mamaSourceManager_findOrCreateSource (mamaSourceManager sourceManager, const char *name, mamaSource *source)
 Locates an existing mamaSource for the given name.
MAMAExpDLL mama_status mamaSourceManager_findSource (mamaSourceManager sourceManager, const char *name, mamaSource *source)
 Locates an existing mamaSource in the specified sourceManager with the specified string 'name' identifier.
MAMAExpDLL mama_status mamaSourceManager_addSource (mamaSourceManager sourceManager, mamaSource source)
 Add an existing mamaSource to the specified mamaSourceManager.
MAMAExpDLL mama_status mamaSourceManager_addSourceWithName (mamaSourceManager sourceManager, mamaSource source, const char *name)
 Add an existing mamaSource to the specified mamaSourceManager using the specified name as a unique identifier.
MAMAExpDLL mama_status mamaSourceManager_iterateSources (mamaSourceManager sourceGroup, mamaSourceManager_sourcesIteratorCb callback, void *closure)
 Iterate over all the sources in this mamaSourceManager.

Typedef Documentation

typedef mamaSource source

Function Documentation

typedef void ( MAMACALLTYPE *  mamaSourceManager_sourcesIteratorCb)
MAMAExpDLL mama_status mamaSourceManager_create ( mamaSourceManager sourceManager)

Create a mamaSourceManager object.

Parameters
sourceManagerThe location of a mamaSourceManager to store the result.
MAMAExpDLL mama_status mamaSourceManager_destroy ( mamaSourceManager  sourceManager)

Destroy a mamaSourceManager object.

Parameters
sourceManagerThe sourceManager object to destroy.
MAMAExpDLL mama_status mamaSourceManager_createSource ( mamaSourceManager  sourceManager,
const char *  name,
mamaSource source 
)

Create a new mamaSource and add it to the manager.

Parameters
sourceManagerThe sourceManager to use for creating the mamaSource.
nameThe string identifier for the mamaSource.
sourceThe address to which the new source will be * written.
Returns
MAMA_STATUS_OK if execution is successful.
MAMAExpDLL mama_status mamaSourceManager_findOrCreateSource ( mamaSourceManager  sourceManager,
const char *  name,
mamaSource source 
)

Locates an existing mamaSource for the given name.

If none exists creates a new mamaSource and adds to the sourceManager.

Parameters
sourceManagerThe sourceManager to use for locating the mamaSource.
nameThe string identifier for the mamaSource
sourceThe location to which the address for the source will be written.
Returns
MAMA_STATUS_OK if execution is successful.
MAMAExpDLL mama_status mamaSourceManager_findSource ( mamaSourceManager  sourceManager,
const char *  name,
mamaSource source 
)

Locates an existing mamaSource in the specified sourceManager with the specified string 'name' identifier.

The value of the source argument will be set to NULL if no source was located in the sourceManager provided.

Parameters
sourceManagerThe mamaSourceManager to use to locate the specified mamaSource.
nameThe string identifier for the required mamaSource.
sourceThe location to which the address for the source will be written. NULL if none is found.
Returns
MAMA_STATUS_OK if creation is successful.
MAMAExpDLL mama_status mamaSourceManager_addSource ( mamaSourceManager  sourceManager,
mamaSource  source 
)

Add an existing mamaSource to the specified mamaSourceManager.

The id of the source will be used instead of the name to uniquely identify the source within the manager.

Parameters
sourceManagerThe mamaSourceManager to which an existing mamaSource is being added.
sourceThe mamaSource being added to the specified mamaSourceManager.
Returns
MAMA_STATUS_OK if execution is successful.
MAMAExpDLL mama_status mamaSourceManager_addSourceWithName ( mamaSourceManager  sourceManager,
mamaSource  source,
const char *  name 
)

Add an existing mamaSource to the specified mamaSourceManager using the specified name as a unique identifier.

Parameters
sourceManagerThe mamaSourceManager to which an existing mamaSource is being added.
nameThe string identifier for the mamaSource
sourceThe mamaSource being added to the specified mamaSourceManager.
Returns
MAMA_STATUS_OK if execution is successful.
MAMAExpDLL mama_status mamaSourceManager_iterateSources ( mamaSourceManager  sourceGroup,
mamaSourceManager_sourcesIteratorCb  callback,
void closure 
)

Iterate over all the sources in this mamaSourceManager.

Parameters
sourceManagerThe mamaSourceManager to iterate over.
callbackThe callback function pointer to invoke for each source in the group.
closureUser supplied arbitrary data. Passed back on each invocation of the callback function.
Returns
MAMA_STATUS_OK if the function executes successfully.


© 2012 Linux Foundation