Classes Files

mama/source.h

Types

  Name
enum mamaSourceState_ { MAMA_SOURCE_STATE_OFF = 0, MAMA_SOURCE_STATE_OK = 1, MAMA_SOURCE_STATE_UNKNOWN = 99}
typedef enum mamaSourceState_ mamaSourceState

Functions

  Name
MAMAExpDLL mama_status mamaSource_create(mamaSource * source)
MAMAExpDLL mama_status mamaSource_destroy(mamaSource source)
MAMAExpDLL mama_status mamaSource_clear(mamaSource source)
MAMAExpDLL mama_status mamaSource_setId(mamaSource source, const char * id)
MAMAExpDLL mama_status mamaSource_setMappedId(mamaSource source, const char * id)
MAMAExpDLL mama_status mamaSource_setDisplayId(mamaSource source, const char * id)
MAMAExpDLL mama_status mamaSource_setQuality(mamaSource source, mamaQuality quality)
MAMAExpDLL mama_status mamaSource_setState(mamaSource source, mamaSourceState quality)
MAMAExpDLL mama_status mamaSource_setParent(mamaSource source, mamaSource parent)
MAMAExpDLL mama_status mamaSource_setSymbolNamespace(mamaSource source, const char * symbolNamespace)
MAMAExpDLL mama_status mamaSource_setTransportName(mamaSource source, const char * transportName)
MAMAExpDLL mama_status mamaSource_setTransport(mamaSource source, mamaTransport transport)
MAMAExpDLL mama_status mamaSource_setSymbology(mamaSource source, mamaSymbology symbology)
MAMAExpDLL mama_status mamaSource_getId(const mamaSource source, const char ** id)
MAMAExpDLL mama_status mamaSource_getMappedId(const mamaSource source, const char ** id)
MAMAExpDLL mama_status mamaSource_getDisplayId(const mamaSource source, const char ** id)
MAMAExpDLL mama_status mamaSource_getQuality(const mamaSource source, mamaQuality * quality)
MAMAExpDLL mama_status mamaSource_getState(const mamaSource source, mamaSourceState * state)
MAMAExpDLL const char * mamaSource_getStateAsString(const mamaSource source)
MAMAExpDLL mama_status mamaSource_getParent(const mamaSource source, mamaSource * parent)
MAMAExpDLL mama_status mamaSource_getSymbolNamespace(const mamaSource source, const char ** symbolNamespace)
MAMAExpDLL mama_status mamaSource_getTransportName(const mamaSource source, const char ** transportName)
MAMAExpDLL mama_status mamaSource_getTransport(const mamaSource source, mamaTransport * transport)
MAMAExpDLL mama_status mamaSource_getSymbology(const mamaSource source, mamaSymbology * symbology)
MAMAExpDLL mama_status mamaSource_getSubSourceManager(const mamaSource source, mamaSourceManager * subSourceManager)

Types Documentation

enum mamaSourceState_

Enumerator Value Description
MAMA_SOURCE_STATE_OFF 0  
MAMA_SOURCE_STATE_OK 1  
MAMA_SOURCE_STATE_UNKNOWN 99  

typedef mamaSourceState

typedef enum mamaSourceState_ mamaSourceState;

Functions Documentation

function mamaSource_create

MAMAExpDLL mama_status mamaSource_create(
    mamaSource * source
)

Parameters:

  • source The location of a mamaSource to store the result.

Create a mamaSource object.

function mamaSource_destroy

MAMAExpDLL mama_status mamaSource_destroy(
    mamaSource source
)

Parameters:

  • source The source object to destroy.

Destroy a mamaSource object.

function mamaSource_clear

MAMAExpDLL mama_status mamaSource_clear(
    mamaSource source
)

Parameters:

  • source The source object to clear.

Clear a mamaSource object.

function mamaSource_setId

MAMAExpDLL mama_status mamaSource_setId(
    mamaSource source,
    const char * id
)

Parameters:

  • source The source object to update.
  • id The new ID for the source object.

Set the ID of a mamaSource object.

function mamaSource_setMappedId

MAMAExpDLL mama_status mamaSource_setMappedId(
    mamaSource source,
    const char * id
)

Parameters:

  • source The source object to update.
  • id The new mapped ID for the source object.

Set the mapped ID of a mamaSource object. The mapped ID is the ID that the parent source manager has mapped this source as.

function mamaSource_setDisplayId

MAMAExpDLL mama_status mamaSource_setDisplayId(
    mamaSource source,
    const char * id
)

Parameters:

  • source The source object to update.
  • id The new display ID for the source object.

Set the display ID of a mamaSource object.

function mamaSource_setQuality

MAMAExpDLL mama_status mamaSource_setQuality(
    mamaSource source,
    mamaQuality quality
)

Parameters:

  • source The source object to update.
  • quality The new quality for the source object.

Set the quality of a mamaSource object.

function mamaSource_setState

MAMAExpDLL mama_status mamaSource_setState(
    mamaSource source,
    mamaSourceState quality
)

Parameters:

  • source The source object to update.
  • quality The new state for the source object.

Set the state of a mamaSource object.

function mamaSource_setParent

MAMAExpDLL mama_status mamaSource_setParent(
    mamaSource source,
    mamaSource parent
)

Parameters:

  • source The source object to update.
  • parent The parent source for this source object.

See: mamaSource_getSubSourceManager()

Set the parent for a mamaSource object. The current mamaSource is added to the parents sub source manager.

function mamaSource_setSymbolNamespace

MAMAExpDLL mama_status mamaSource_setSymbolNamespace(
    mamaSource source,
    const char * symbolNamespace
)

Parameters:

  • source The source object to update.
  • symbolNamespace The namespace for the publisher this mamaSource object describes.

Set the publisher specific source name for this source. e.g. This could be “NASDAQ” for a UTP PAPA publisher.

function mamaSource_setTransportName

MAMAExpDLL mama_status mamaSource_setTransportName(
    mamaSource source,
    const char * transportName
)

Parameters:

  • source The source object to update.
  • transportName The name of the mamaTransport for which this source is valid.

Set the name of the mamaTransport on which this describes a valid source of data.

function mamaSource_setTransport

MAMAExpDLL mama_status mamaSource_setTransport(
    mamaSource source,
    mamaTransport transport
)

Parameters:

  • source The source to update.
  • transport The mamaTransport to associate with the source.

Associate a mamaTransport object with the source.

function mamaSource_setSymbology

MAMAExpDLL mama_status mamaSource_setSymbology(
    mamaSource source,
    mamaSymbology symbology
)

Parameters:

  • source The source to update.
  • symbology The mamaSymbology to associate with the source.

Associate a mamaSymbology object with the source.

function mamaSource_getId

MAMAExpDLL mama_status mamaSource_getId(
    const mamaSource source,
    const char ** id
)

Parameters:

  • source The source object to check.
  • id Location of the result for the ID of the source.

Get the ID of a mamaSource object.

function mamaSource_getMappedId

MAMAExpDLL mama_status mamaSource_getMappedId(
    const mamaSource source,
    const char ** id
)

Parameters:

  • source The source object to check.
  • id Location of the result for the mapped ID of the source.

Get the mapped ID of a mamaSource object.

function mamaSource_getDisplayId

MAMAExpDLL mama_status mamaSource_getDisplayId(
    const mamaSource source,
    const char ** id
)

Parameters:

  • source The source object to check.
  • id Location of the result for the display ID of the source.

Get the display ID of a mamaSource object.

function mamaSource_getQuality

MAMAExpDLL mama_status mamaSource_getQuality(
    const mamaSource source,
    mamaQuality * quality
)

Parameters:

  • source The source object to check.
  • quality Location of the result for the quality of the source.

Get the quality of a mamaSource object.

function mamaSource_getState

MAMAExpDLL mama_status mamaSource_getState(
    const mamaSource source,
    mamaSourceState * state
)

Parameters:

  • source The source object to check.
  • state Location of the result for the state of the source.

Get the state of a mamaSource object.

function mamaSource_getStateAsString

MAMAExpDLL const char * mamaSource_getStateAsString(
    const mamaSource source
)

function mamaSource_getParent

MAMAExpDLL mama_status mamaSource_getParent(
    const mamaSource source,
    mamaSource * parent
)

Parameters:

  • source The source object to check.
  • parent Location to store the address of the parent for this source.

Get the parent source for a mamaSource object.

function mamaSource_getSymbolNamespace

MAMAExpDLL mama_status mamaSource_getSymbolNamespace(
    const mamaSource source,
    const char ** symbolNamespace
)

Parameters:

  • source The source object to check.
  • symbolNamespace The source name for the publisher.

Get the source name for the publisher which this mamaSource represents.

function mamaSource_getTransportName

MAMAExpDLL mama_status mamaSource_getTransportName(
    const mamaSource source,
    const char ** transportName
)

Parameters:

  • source The source object to check.
  • transportName The location to store the pointer to the transportName.

Get the name of the mamaTransport on which this source is valid.

function mamaSource_getTransport

MAMAExpDLL mama_status mamaSource_getTransport(
    const mamaSource source,
    mamaTransport * transport
)

Parameters:

  • source The source object to check.
  • transport The mamaTransport associated with this source.

Get the mamaTransport associated with this source.

function mamaSource_getSymbology

MAMAExpDLL mama_status mamaSource_getSymbology(
    const mamaSource source,
    mamaSymbology * symbology
)

Parameters:

  • source The source object to check.
  • symbology The mamaSymbology associated with this source.

Get the mamaSymbology associated with this source.

function mamaSource_getSubSourceManager

MAMAExpDLL mama_status mamaSource_getSubSourceManager(
    const mamaSource source,
    mamaSourceManager * subSourceManager
)

Parameters:

  • source The mamaSource for which the sub source manager is being obtained.
  • subSourceManager The location top store the address of the sub source manager object pointer.

A mamaSource can have sub-sources. These sub sources are maintained by a mamaSourceManager within the mamaSource.

Source code

/* $Id$
 *
 * OpenMAMA: The open middleware agnostic messaging API
 * Copyright (C) 2011 NYSE Technologies, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#ifndef MamaSourceH__
#define MamaSourceH__

#include "mama/config.h"
#include "mama/status.h"
#include "mama/sourceman.h"
#include "mama/types.h"
#include "mama/quality.h"

#if defined(__cplusplus)
extern "C" {
#endif

typedef enum mamaSourceState_
{
    MAMA_SOURCE_STATE_OFF     = 0,
    MAMA_SOURCE_STATE_OK      = 1,
    MAMA_SOURCE_STATE_UNKNOWN = 99
} mamaSourceState;

MAMAExpDLL
extern mama_status
mamaSource_create (mamaSource*  source);

MAMAExpDLL
extern mama_status
mamaSource_destroy (mamaSource  source);

MAMAExpDLL
extern mama_status
mamaSource_clear (mamaSource  source);

MAMAExpDLL
extern mama_status
mamaSource_setId (mamaSource  source,
                  const char* id);

MAMAExpDLL
extern mama_status
mamaSource_setMappedId (mamaSource  source,
                        const char* id);

MAMAExpDLL
extern mama_status
mamaSource_setDisplayId (mamaSource  source,
                         const char* id);

MAMAExpDLL
extern mama_status
mamaSource_setQuality (mamaSource  source,
                       mamaQuality quality);

MAMAExpDLL
extern mama_status
mamaSource_setState (mamaSource      source,
                     mamaSourceState quality);

MAMAExpDLL
extern mama_status
mamaSource_setParent (mamaSource source,
                      mamaSource parent);

MAMAExpDLL
extern mama_status
mamaSource_setSymbolNamespace (mamaSource  source,
                               const char* symbolNamespace);

MAMAExpDLL
extern mama_status
mamaSource_setTransportName (mamaSource  source,
                             const char* transportName);

MAMAExpDLL
extern mama_status
mamaSource_setTransport (mamaSource    source,
                         mamaTransport transport);

                         
MAMAExpDLL
extern mama_status
mamaSource_setSymbology (mamaSource    source,
                         mamaSymbology symbology);                        
MAMAExpDLL
extern mama_status
mamaSource_getId (const mamaSource source,
                  const char**     id);

MAMAExpDLL
extern mama_status
mamaSource_getMappedId (const mamaSource source,
                        const char**     id);

MAMAExpDLL
extern mama_status
mamaSource_getDisplayId (const mamaSource source,
                         const char**     id);

MAMAExpDLL
extern mama_status
mamaSource_getQuality (const mamaSource source,
                       mamaQuality*     quality);

MAMAExpDLL
extern mama_status
mamaSource_getState (const mamaSource source,
                     mamaSourceState* state);

/*
   Get the stringified representation of the source state.
*/
MAMAExpDLL
extern const char*
mamaSource_getStateAsString (const mamaSource source);

MAMAExpDLL
extern mama_status
mamaSource_getParent (const mamaSource source,
                      mamaSource*      parent);

MAMAExpDLL
extern mama_status
mamaSource_getSymbolNamespace (const mamaSource source,
                               const char**     symbolNamespace);

MAMAExpDLL
extern mama_status
mamaSource_getTransportName (const mamaSource source,
                             const char**     transportName);

MAMAExpDLL
extern mama_status
mamaSource_getTransport (const mamaSource source,
                         mamaTransport*   transport);


MAMAExpDLL
extern mama_status
mamaSource_getSymbology (const mamaSource source,
                         mamaSymbology*   symbology);
                         
MAMAExpDLL
extern mama_status
mamaSource_getSubSourceManager (const mamaSource   source,
                                mamaSourceManager* subSourceManager);

#if defined(__cplusplus)
}
#endif

#endif

Updated on 2023-03-31 at 15:29:16 +0100