DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
Macros | Typedefs | Functions
streamEvent.c File Reference

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

#include <string.h>
#include <stdio.h>
#include "clDsmSystem.h"
#include "moduleData.h"
#include "sectionFilter.h"
#include "dsmObject.h"
#include "module.h"
#include "objectCarousel.h"
#include "cacheMgr.h"

Go to the source code of this file.

Macros

#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)
 
#define XML_DATA1a
 
#define XML_DATA1b   "\">\n"
 
#define XML_DATA2a   "<dsmcc:stream_event dsmcc:stream_event_id=\""
 
#define XML_DATA2b   "\" dsmcc:stream_event_name=\""
 
#define XML_DATA2c   "\"/>\n"
 
#define XML_DATA3
 

Typedefs

typedef struct s_se_info S_SE_INFO
 
typedef struct s_listener S_LISTENER
 
typedef struct s_dsmevent S_Event
 

Functions

S_SE_INFO * FindEventInfo (P_DsmCoreInst idp, H_DsmEvent eventHandle)
 
S_SE_INFO * FindStreamInfo (P_DsmCoreInst idp, H_DsmObject streamObject)
 
E_DscError CDSM_StreamEventSubscribe (H_DsmCoreInst dsmccInstance, H_DsmObject 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 F_NotifyStreamEvent for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the CDSM_ObjectLoad() 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). More...
 
E_DscError CDSM_SpecialEventSubscribe (H_DsmCoreInst 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. More...
 
E_DscError CDSM_StreamEventUnsubscribe (H_DsmCoreInst idp, 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. More...
 
E_DscError CDSM_SpecialEventUnsubscribe (H_DsmCoreInst dsmccInstance, H_DsmEvent eventHandle)
 Same as clDsmStreamEventUnsubscribe - used in conjuction with clDsmSpecialEventSubscribe. More...
 
E_DscError DSC_StrmEventUpdate (P_DsmCoreInst idp, U8BIT *pStreamDescrSection, P_Event pEvent, U32BIT targetId)
 
void DSC_StrmEventFilterReset (P_DsmCoreInst idp)
 
void DSC_StrmEventListReset (P_DsmCoreInst idp)
 
E_DscError CDSM_StreamEventNameList (H_DsmCoreInst dsmccInstance, H_DsmObject 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 CDSM_ObjectLoad() 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. More...
 
E_DscError CDSM_StreamEventXmlData (H_DsmCoreInst dsmccInstance, H_DsmObject streamObject, U8BIT **pXmlData, U16BIT *pXmlLen)
 The Client uses this function to request data in XML format for stream object and associated events. This XML format is defined by 'TS 102 809' v 1.2.1, section 8.2 Before calling this function the Client must request that the stream object of interest be loaded using the CDSM_ObjectLoad() function. More...
 

Detailed Description

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

Date
05/17/2006
Author
Ocean Blue

Definition in file streamEvent.c.

Macro Definition Documentation

#define XML_DATA1a
Value:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
"<dsmcc:dsmcc xmlns=\"urn:dvb:mis:dsmcc:2009\" xmlns:dsmcc=\"urn:dvb:mis:dsmcc:2009\">\n" \
"<dsmcc:dsmcc_object dsmcc:component_tag=\""

Definition at line 57 of file streamEvent.c.

#define XML_DATA3
Value:
"</dsmcc:dsmcc_object>\n" \
"</dsmcc:dsmcc>\n"

Definition at line 64 of file streamEvent.c.

Function Documentation

E_DscError CDSM_SpecialEventSubscribe ( H_DsmCoreInst  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.

Definition at line 504 of file streamEvent.c.

E_DscError CDSM_SpecialEventUnsubscribe ( H_DsmCoreInst  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

Definition at line 700 of file streamEvent.c.

E_DscError CDSM_StreamEventNameList ( H_DsmCoreInst  dsmccInstance,
H_DsmObject  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 CDSM_ObjectLoad() 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.

Definition at line 1279 of file streamEvent.c.

E_DscError CDSM_StreamEventSubscribe ( H_DsmCoreInst  dsmccInstance,
H_DsmObject  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 F_NotifyStreamEvent for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the CDSM_ObjectLoad() 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 F_NotifyStreamEvent for information about the callback function. Before calling this function the Client must request that the stream object of interest be loaded using the CDSM_ObjectLoad() 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.

Definition at line 329 of file streamEvent.c.

E_DscError CDSM_StreamEventUnsubscribe ( H_DsmCoreInst  idp,
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

Definition at line 638 of file streamEvent.c.

E_DscError CDSM_StreamEventXmlData ( H_DsmCoreInst  dsmccInstance,
H_DsmObject  streamObject,
U8BIT **  pXmlData,
U16BIT *  pXmlLen 
)

The Client uses this function to request data in XML format for stream object and associated events. This XML format is defined by 'TS 102 809' v 1.2.1, section 8.2 Before calling this function the Client must request that the stream object of interest be loaded using the CDSM_ObjectLoad() function.

Parameters
dsmccInstanceinstance of DSMCC.
streamObjecthandle to stream object
pXmlPtrPointer to XML data for Stream Object
pXmlLenLength of XML data for Stream Object
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 - streamObject is not a BIOP::StreamEventMessage CLDSM_ERR_MEM_HEAP_FULL - Out of memory. CLDSM_OK - Successfully retrieved XML data for stream object.

Definition at line 1310 of file streamEvent.c.