MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Functions
mh5root.c File Reference

Implementation of the Root class. More...

#include <string.h>
#include "mh5base.h"
#include "mh5queue.h"
#include "mh5object.h"
#include "mh5variable.h"
#include "mh5final.h"
#include "mh5debug.h"

Functions

void MHEG5rootInit (MHEG5Root *root)
 Initialise a Root object with default values. More...
 
void MHEG5rootFree (MHEG5Root *root)
 Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed. More...
 
void MHEG5rootClone (MHEG5Root *destination, MHEG5Root *source)
 Implementation of the root part of the Close action. More...
 
void MHEG5rootPrepare (MHEG5Root *root)
 Implementation of the Preparation behaviour Preparation This behaviour has the basic semantics of allocating all requested resources in order to handle or to present this object. Apply the following sequence of actions: More...
 
void MHEG5rootActivate (MHEG5Root *root)
 Implementation of the Activation behaviour Activation This behaviour has the basic semantics of immediately making this object active. Apply the following sequence of actions: More...
 
void MHEG5rootDeactivate (MHEG5Root *root)
 Implementation of the Deactivation behaviour Deactivation This behaviour has the basic semantics of notifying the MHEG-5 engine to deactivate this object immediately. Apply the following sequence of actions: More...
 
void MHEG5rootDestruct (MHEG5Root *root)
 Implementation of the Destruction behaviour Destruction This behaviour has the basic semantics of asking the MHEG-5 engine to delete the object. Apply the following sequence of actions: More...
 
MHEG5ErrorCode MHEG5getAvailabilityStatus (MHEG5Root *target, MHEG5GList *params)
 Implementation of the GetAvailabilityStatus action GetAvailabilityStatus (AvailabilityStatusVar) Set the Variable referenced by AvailabilityStatusVar to the value of the AvailabilityStatus attribute. NOTE - A GetAvailabilityStatus action targeted to an object inexistant in the MHEG-5 engine is not an error; the result is False. Provisions of use: AvailabilityStatusVar shall refer to an active BooleanVariable object. GetAvailabilityStatus –> Target, AvailabilityStatusVar Target –> GenericObjectReference AvailabilityStatusVar –> ObjectReference. More...
 
MHEG5ErrorCode MHEG5getRunningStatus (MHEG5Root *target, MHEG5GList *params)
 Implementation of the GetRunningStatus action GetRunningStatus (RunningStatusVar) Set the Variable referenced by RunningStatusVar to the value of the RunningStatus attribute. Provisions of use: The Target object shall be available. RunningStatusVar shall refer to an active BooleanVariable object. GetRunningStatus –> Target, RunningStatusVar Target –> GenericObjectReference RunningStatusVar –> ObjectReference. More...
 

Detailed Description

Implementation of the Root class.

Date
17/12/2001
Author
iwillis

Function Documentation

MHEG5ErrorCode MHEG5getAvailabilityStatus ( MHEG5Root target,
MHEG5GList params 
)

Implementation of the GetAvailabilityStatus action GetAvailabilityStatus (AvailabilityStatusVar) Set the Variable referenced by AvailabilityStatusVar to the value of the AvailabilityStatus attribute. NOTE - A GetAvailabilityStatus action targeted to an object inexistant in the MHEG-5 engine is not an error; the result is False. Provisions of use: AvailabilityStatusVar shall refer to an active BooleanVariable object. GetAvailabilityStatus –> Target, AvailabilityStatusVar Target –> GenericObjectReference AvailabilityStatusVar –> ObjectReference.

Parameters
targettarget object for this action
paramsAction parameters
Returns
MHEG5ErrorCode - See mh5base.h
MHEG5ErrorCode MHEG5getRunningStatus ( MHEG5Root target,
MHEG5GList params 
)

Implementation of the GetRunningStatus action GetRunningStatus (RunningStatusVar) Set the Variable referenced by RunningStatusVar to the value of the RunningStatus attribute. Provisions of use: The Target object shall be available. RunningStatusVar shall refer to an active BooleanVariable object. GetRunningStatus –> Target, RunningStatusVar Target –> GenericObjectReference RunningStatusVar –> ObjectReference.

Parameters
targettarget object for this action
paramsAction parameters
Returns
MHEG5ErrorCode - See mh5base.h
void MHEG5rootActivate ( MHEG5Root root)

Implementation of the Activation behaviour Activation This behaviour has the basic semantics of immediately making this object active. Apply the following sequence of actions:

  1. If the RunningStatus attribute of the object is True, abort the behaviour. Otherwise:
  2. If the AvailabilityStatus attribute of the object is False, a) apply the Preparation behaviour to the object. b) wait for an IsAvailable event from the object. These steps are executed synchronously, meaning that the engine will not perform other actions until the Preparation behaviour has ended. NOTES 1 The effect of the Activation behaviour (e.g., the display of a bitmap) will continue even after the behaviour itself has returned. 2 The generation of an IsRunning event and the modification of the RunningStatus internal attribute are parts of the Activation behaviour of subclasses of the Root class.
    Parameters
    rootRoot object to activate
    Returns
    void
void MHEG5rootClone ( MHEG5Root destination,
MHEG5Root source 
)

Implementation of the root part of the Close action.

Parameters
destinationRoot object to clone to
sourceRoot object to clone from
Returns
void
void MHEG5rootDeactivate ( MHEG5Root root)

Implementation of the Deactivation behaviour Deactivation This behaviour has the basic semantics of notifying the MHEG-5 engine to deactivate this object immediately. Apply the following sequence of actions:

  1. If the RunningStatus attribute of the object is False, abort the behaviour. Otherwise:
  2. Set the RunningStatus attribute of the object to False.
  3. Generate an IsStopped event.
    Parameters
    rootRoot object to deactivate
    Returns
    void
void MHEG5rootDestruct ( MHEG5Root root)

Implementation of the Destruction behaviour Destruction This behaviour has the basic semantics of asking the MHEG-5 engine to delete the object. Apply the following sequence of actions:

  1. If the AvailabilityStatus attribute of the object is False, abort the behaviour. Otherwise:
  2. If the RunningStatus attribute of the object is True, a) apply the Deactivation behaviour. b) wait for an IsStopped event from the object. This shall all be done synchronously.
  3. If the RunningStatus attribute of the object is False, execute the following actions synchronously.
  4. If the GroupCachePriority attribute of the object itself or of the group this object belongs to is set to 0, the MHEG-5 engine shall free all resources allocated to the object. Note that GroupCachePriority is defined in Group class.
  5. If the GroupCachePriority attribute of the object itself or of the group this object belongs to is different from 0, the MHEG-5 engine may decide to either actually free all resources allocated to the object or to cache it.
  6. Generate an IsDeleted event. Note that the IsDeleted event shall be generated whether the resources mentioned above were actually freed or not; the object is deleted in the sense defined by this part of ISO/IEC 13522, even if some associated resources are not.
    Parameters
    rootRoot object to destruct
    Returns
    void
void MHEG5rootFree ( MHEG5Root root)

Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed.

Parameters
rootPointer to object to free.
Returns
Void
void MHEG5rootInit ( MHEG5Root root)

Initialise a Root object with default values.

Parameters
rootRoot object to initialise
Returns
void
void MHEG5rootPrepare ( MHEG5Root root)

Implementation of the Preparation behaviour Preparation This behaviour has the basic semantics of allocating all requested resources in order to handle or to present this object. Apply the following sequence of actions:

  1. If the AvailabilityStatus attribute of the object is True, abort the behaviour. Otherwise:
  2. Retrieve the object from an entity outside the engine.
  3. Set each internal attribute of the object to its initial value.
  4. Set the AvailabilityStatus attribute to True.
  5. Generate an IsAvailable event. The above steps are executed synchronously. The following step is asynchronous.
  6. Generate a ContentAvailable event. COR1: Remove the instruction between step 5 and 6 of the Preparation behaviour of the Root class in subclause 8.3 and change point 6 to:
  1. Perform the ContentPreparation behaviour.
    Parameters
    rootRoot object to prepare
    Returns
    void