DSMCC  15.3.1
source/dscore/src/streamEvent.c File Reference

Stream event related functions References: [1] ISO_IEC_13818-6;1998(E) More...

#include <string.h>
#include "clDsmSystem.h"
#include "moduleData.h"
#include "pmtUpdate.h"
#include "cacheMgr.h"

Data Structures

struct  s_se_info
struct  s_listener
struct  s_dsmevent

Defines

#define MAX_EVT_LISTENERS   8
#define LIFECYCLE_STR   "Life cycle"
#define STREAM_NPT_REF_DESC   23
#define STREAM_NPT_END_DESC   24
#define STREAM_MODE_DESC   25
#define STREAM_EVENT_DESC   26
#define GEN_E_HDL(sid, eid, lid)   (((U32BIT)sid<<24)|((U32BIT)eid<<8)|(lid))
#define EH_TO_LID(eh)   (U8BIT)(((U32BIT)eh)&0xFF)
#define EH_TO_SID(eh)   (U8BIT)(((U32BIT)eh)>>24)
#define EH_TO_EID(eh)   (U16BIT)((((U32BIT)eh)>>8)&0xFFFF)

Typedefs

typedef struct s_se_info S_SE_INFO
typedef struct s_listener S_LISTENER
typedef struct s_dsmevent S_EVENT

Functions

S_SE_INFOFindEventInfo (pclDsmInstData_t idp, H_DsmEvent eventHandle)
S_SE_INFOFindStreamInfo (pclDsmInstData_t idp, clDsmObjHandle_t streamObject)
S_EVENTFindMatchingEventName (S_SE_INFO *pStreamInfo, U8BIT *name, U32BIT nlen)
S_EVENTFindMatchingEventId (S_SE_INFO *pStreamInfo, U16BIT id)
clDsmErr_t clDsmStreamEventSubscribe (clDsmInstHandle_t dsmccInstance, clDsmObjHandle_t streamObject, U8BIT *eventName, void *userData1, void *userData2, H_DsmEvent *pEventHandle)
 The Client uses this function to request that the DSMCC notifies it when a named stream event occurs. The notification is implemented by means of a callback function defined by the Client. Refer to the description of clDsmNotifyStreamEventFunc_t for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the clDsmObjectLoad() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed before subscribing. Do not have to open an object before subscribing (since synchronous function).
clDsmErr_t clDsmSpecialEventSubscribe (clDsmInstHandle_t dsmccInstance, U16BIT associationTag, U16BIT eventId, void *userData1, void *userData2, H_DsmEvent *pEventHandle)
 Like clDsmStreamEventSubscribe, except that no stream object is required. This function subscribes to events specified by event ID, and association tag for the current service.
clDsmErr_t clDsmStreamEventUnsubscribe (clDsmInstHandle_t dsmccInstance, H_DsmEvent eventHandle)
 This function is called by the Client to let DSMCC know when a previously subscribed stream event is no longer needed. Callback made to acknowledge unsubscribe. All data relating to this stream event will no longer be valid, including the streamEventHandle.
clDsmErr_t clDsmSpecialEventUnsubscribe (clDsmInstHandle_t dsmccInstance, H_DsmEvent eventHandle)
 Same as clDsmStreamEventUnsubscribe - used in conjuction with clDsmSpecialEventSubscribe.
clDsmErr_t processStreamDescr (pclDsmInstData_t idp, U8BIT *pStreamDescrSection, U32BIT targetId)
void dsmEventsProcessFilterReset (pclDsmInstData_t idp)
U16BIT dsmEventsGetID (pclDsmInstData_t idp, MemHandle hEvent, U16BIT *pAssocTag)
void seListDestroy (pclDsmInstData_t idp)
clDsmErr_t clDsmStreamEventNameList (clDsmInstHandle_t dsmccInstance, clDsmObjHandle_t streamObject, U8BIT **pNamesPtr, U16BIT *pNamesLen)
 The Client uses this function to request list of event names for stream object Before calling this function the Client must request that the stream object of interest be loaded using the clDsmObjectLoad() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed Do not have to open an object.

Detailed Description

Stream event related functions References: [1] ISO_IEC_13818-6;1998(E)

Date:
05/17/2006
Author:
Ocean Blue

Function Documentation

clDsmErr_t clDsmSpecialEventSubscribe ( clDsmInstHandle_t  dsmccInstance,
U16BIT  associationTag,
U16BIT  eventId,
void *  userData1,
void *  userData2,
H_DsmEvent *  pEventHandle 
)

Like clDsmStreamEventSubscribe, except that no stream object is required. This function subscribes to events specified by event ID, and association tag for the current service.

Parameters:
dsmccInstanceAllows support >= 1 instance of a DSMCC.
streamObjectThis references a BIOP::StreamEventMessage as well as indicating the carousel, module and the kind of the object.
eventNameName of stream event required by the Client.
userData1Optional data to be used by client. This data is stored and returned unchanged to the Client using a callback.
userData2Optional data to be used by client. This data is stored and returned unchanged to the Client using a callback.
pStatusStatus of the subscription.
pEventHandleThe is the handle to the stream event returned by subscribe. The caller will use this handle when the stream event being subscribed to is referred to in the future.
Returns:
CLDSM_ERR_INVALID_INSTANCE The Instance value is invalid CLDSM_ERR_INVALID_STREAM_EVENT_NAME The supplied event name is invalid CLDSM_ERR_SUBSCRIBE_FAILURE The event could not be subscribed to CLDSM_ERR_INVALID_OBJECT_HANDLE The supplied object handle is invalid CLDSM_ERR_INVALID_OBJECT_TYPE The message referred to by streamObject is not a BIOP::StreamEventMessage CLDSM_ERR_NO_STREAM_EVENT_NOTIFY_CALLBACK If Stream Events are to be used then a callback must be registered. CLDSM_ERR_MEM_HEAP_FULL Out of memory. CLDSM_OK The event has been successfully subscribed to.
clDsmErr_t clDsmSpecialEventUnsubscribe ( clDsmInstHandle_t  dsmccInstance,
H_DsmEvent  eventHandle 
)

Same as clDsmStreamEventUnsubscribe - used in conjuction with clDsmSpecialEventSubscribe.

Parameters:
dsmccInstanceAllows support of >= 1 instance of a DSMCC.
eventHandleThis is a handle to an entry which is to be deleted from a list of subscribed to stream events
Returns:
CLDSM_ERR_INVALID_STREAM_EVENT_HANDLE The streamEventHandle is not valid. CLDSM_OK The stream event was successfully unsubscribed
clDsmErr_t clDsmStreamEventNameList ( clDsmInstHandle_t  dsmccInstance,
clDsmObjHandle_t  streamObject,
U8BIT **  pNamesPtr,
U16BIT *  pNamesLen 
)

The Client uses this function to request list of event names for stream object Before calling this function the Client must request that the stream object of interest be loaded using the clDsmObjectLoad() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed Do not have to open an object.

Parameters:
dsmccInstanceAllows support >= 1 instance of a DSMCC.
streamObjectThis references a BIOP::StreamEventMessage as well as indicating the carousel, module and the kind of the object.
pNamesPtrPointer to comma separated list of Event names
pNamesLenLength of comma separated list of Event names
Returns:
CLDSM_ERR_INVALID_INSTANCE The Instance value is invalid CLDSM_ERR_INVALID_OBJECT_HANDLE The supplied object handle is invalid CLDSM_ERR_INVALID_OBJECT_TYPE The message referred to by streamObject is not a BIOP::StreamEventMessage CLDSM_ERR_MEM_HEAP_FULL Out of memory. CLDSM_OK Successfully retrieved list of names for this stream object.
clDsmErr_t clDsmStreamEventSubscribe ( clDsmInstHandle_t  dsmccInstance,
clDsmObjHandle_t  streamObject,
U8BIT *  eventName,
void *  userData1,
void *  userData2,
H_DsmEvent *  pEventHandle 
)

The Client uses this function to request that the DSMCC notifies it when a named stream event occurs. The notification is implemented by means of a callback function defined by the Client. Refer to the description of clDsmNotifyStreamEventFunc_t for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the clDsmObjectLoad() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed before subscribing. Do not have to open an object before subscribing (since synchronous function).

The Client uses this function to request that the DSMCC notifies it when a named stream event occurs. The notification is implemented by means of a callback function defined by the Client. Refer to the description of clDsmNotifyStreamEventFunc_t for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the clDsmObjectLoad() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed before subscribing. Do not have to open an object before subscribing (since synchronous function). CALLBACKS THAT MAY BE INITIATED DURING THIS CALL: none.

Parameters:
dsmccInstanceAllows support >= 1 instance of a DSMCC.
streamObjectThis references a BIOP::StreamEventMessage as well as indicating the carousel, module and the kind of the object.
eventNameName of stream event required by the Client.
userData1Optional data to be used by client. This data is stored and returned unchanged to the Client using a callback.
userData2Optional data to be used by client. This data is stored and returned unchanged to the Client using a callback.
pStatusStatus of the subscription.
pEventHandleThe is the handle to the stream event returned by subscribe. The caller will use this handle when the stream event being subscribed to is referred to in the future.
Returns:
CLDSM_ERR_INVALID_INSTANCE The Instance value is invalid CLDSM_ERR_INVALID_STREAM_EVENT_NAME The supplied event name is invalid CLDSM_ERR_SUBSCRIBE_FAILURE The event could not be subscribed to CLDSM_ERR_INVALID_OBJECT_HANDLE The supplied object handle is invalid CLDSM_ERR_INVALID_OBJECT_TYPE The message referred to by streamObject is not a BIOP::StreamEventMessage CLDSM_ERR_NO_STREAM_EVENT_NOTIFY_CALLBACK If Stream Events are to be used then a callback must be registered. CLDSM_ERR_MEM_HEAP_FULL Out of memory. CLDSM_OK The event has been successfully subscribed to.
clDsmErr_t clDsmStreamEventUnsubscribe ( clDsmInstHandle_t  dsmccInstance,
H_DsmEvent  eventHandle 
)

This function is called by the Client to let DSMCC know when a previously subscribed stream event is no longer needed. Callback made to acknowledge unsubscribe. All data relating to this stream event will no longer be valid, including the streamEventHandle.

This function is called by the Client to let DSMCC know when a previously subscribed stream event is no longer needed. Callback made to acknowledge unsubscribe. All data relating to this stream event will no longer be valid, including the eventHandle. CALLBACKS THAT MAY BE INITIATED DURING THIS CALL: none.

Parameters:
dsmccInstanceAllows support of >= 1 instance of a DSMCC.
eventHandleThis is a handle to an entry which is to be deleted from a list of subscribed to stream events
Returns:
CLDSM_ERR_INVALID_STREAM_EVENT_HANDLE The eventHandle is not valid. CLDSM_OK The stream event was successfully unsubscribed
 All Data Structures Files Functions Typedefs