MHEG5
15.3.0
|
Implementation of the Ingredient class. More...
#include "mh5root.h"
Go to the source code of this file.
Data Structures | |
struct | sMHEG5ContentBody |
struct | sMHEG5Ingredient |
Defines | |
#define | MHEG5CHOOK_UNDEFINED 0xFFFF |
#define | CP_STATE_INITIAL 0 |
#define | CP_STATE_PRELOAD 1 |
#define | CP_STATE_CHANGED 2 |
Typedefs | |
typedef struct sMHEG5ContentBody | MHEG5ContentBody |
typedef struct sMHEG5Ingredient | MHEG5Ingredient |
Functions | |
void | MHEG5ingredientInit (MHEG5Ingredient *ingredient) |
Initialise a ingredient object with default values. | |
void | MHEG5ingredientFree (MHEG5Ingredient *ingredient) |
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. | |
void | MHEG5ingredientClone (MHEG5Ingredient *destination, MHEG5Ingredient *source) |
Implementation of the ingredient part of the clone action. | |
void | MHEG5ingredientPrepare (MHEG5Ingredient *ingredient) |
Implementation of the Preparation behaviour Inherrited from Root class. | |
void | MHEG5ingredientContentPrepare (MHEG5Ingredient *ingredient) |
Implementation of the ContentPrepare behaviour COR.1 6.6: ContentPreparation Apply the following sequence of actions synchronously: 1. If the Ingredient does not have the Content attribute encoded then ignore this action. 2. Cancel any outstanding ContentPreparationasynchronous steps for this object. 3. Initiate retrieval of the data for the Contentattribute of the object. The following step is asynchronousand occurs when the content of the object has been fully retrieved: 4. Generate a ContentAvailableevent. | |
void | MHEG5ingredientDestruct (MHEG5Ingredient *ingredient) |
Implementation of the Destruction behaviour Execute the following sequence of actions: 1. If the Content attribute is set to a reference to external data source and if ContentCachePriority is set to 0, the MHEG-5 engine shall free all resources allocated to the external content data of the Ingredient. 2. If the Content attribute is set to a reference to external data source and if ContentCachePriority is different from 0, the MHEG-5 engine may free all resources allocated to the external content data of the Ingredient, or cache it. 3. Apply the Destruction behaviour as inherited from the Root class. | |
void | MHEG5ingredientActivate (MHEG5Ingredient *ingredient) |
Implementation of Activate behaviour Inherrited from Root class. | |
void | MHEG5ingredientDeactivate (MHEG5Ingredient *ingredient) |
Implementation of Deactivate behaviour Inherrited from Root class. | |
MHEG5ErrorCode | MHEG5setData (MHEG5Root *target, MHEG5GList *params) |
Implementation of SetData action SetData (NewContent) Set the Content attribute of the target Ingredient to NewContent. Provisions of use: The Target object shall be an available Ingredient object. The ContentHook of the target Ingredient object shall be encoded. Data included or referenced by NewContent shall have the encoding format determined by ContentHook of the target Ingredient. If Content is currently set to included data, NewContent shall be set or refer to included data. If Content is currently set to a reference to an external data source, then NewContent shall be set or refer to a reference to an external data source. COR1: Execute the following sequence of actions: 1. Set the Content attribute of the target Ingredient to NewContent. 2. Apply the ContentPreparation behaviour. SetData --> Target, NewContent Target --> GenericObjectReference NewContent --> NewIncludedContent | NewReferencedContent NewIncludedContent --> GenericOctetString NewReferencedContent --> NewContentReference, NewContentSize?, NewContentCachePriority? NewContentReference --> GenericContentReference NewContentSize --> GenericInteger NewContentCachePriority --> GenericInteger. | |
MHEG5ErrorCode | MHEG5clone (MHEG5Root *target, MHEG5GList *params) |
Implementation of the Clone action Clone (CloneRefVar) If the engine supports the Cloning option the effect of this action is described below. Engines that do not support the Cloning option shall ignore this action. This action copies the Target adding the copy to the same group that contains the Target using a unique ObjectReference obtained from the engine. The ObjectReference referring to the copy is returned in the ObjectRefVariable referenced by CloneRefVar. Execute the following sequence of actions: 1. Determine a unique ObjectReference within the same group as the Target. 2. Create a copy of the Target, taking into account only the exchanged attributes and not the internal attributes. The ObjectIdentifier attribute inherited from the Root class is not copied, but set to the ObjectReference determined in step 1. 3. Add the copy to the group containing the Target object. 4. Set the ObjectRefVariable referenced by CloneRefVar to the ObjectReference determined in step 1. 5. Apply the Preparation behaviour to the copy. An object created using this action is deactivated/destroyed when the group that contains that object is deactivated/destroyed. The objects are deactivated/destroyed along with other static Ingredients in the reverse order of creation. A dynamically created Ingredient can also be destroyed using the Unload elementary action if its Content attribute is not Null. Provision of use: The Target object shall be an available Ingredient. CloneRefVar shall be an active ObjectRefVariable. Clone --> Target, CloneRefVar Target --> GenericObjectReference CloneRefVar --> ObjectReference. | |
MHEG5ErrorCode | MHEG5preload (MHEG5Root *target, MHEG5GList *params) |
Implementation of the Preload action Preload Prepares an Ingredient and provides a hint to the MHEG-5 engine to prepare the content data of an Ingredient for future use. Execute the following sequence of actions: 1. Apply the Preparation behaviour. 2. The MHEG-5 engine may optionally retrieve and/or decode the content data associated with the target Ingredient object. Provisions of use: The Target object shall be non-available Ingredient object. The Content attribute of the target Ingredient shall be different from Null. Preload --> Target Target --> GenericObjectReference. | |
MHEG5ErrorCode | MHEG5unload (MHEG5Root *target, MHEG5GList *params) |
Implementation of the Unload action Unload Destroys an Ingredient and provides a hint to the MHEG-5 engine to free resources allocated to an Ingredient. Execute the following sequence of actions: 1. Apply the Destruction behaviour. Provisions of use: The Target object shall be an available and inactive Ingredient object. The Content attribute of the target Ingredient shall be different from Null. Unload --> Target Target --> GenericObjectReference. |
Implementation of the Ingredient class.
MHEG5ErrorCode MHEG5clone | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
Implementation of the Clone action Clone (CloneRefVar) If the engine supports the Cloning option the effect of this action is described below. Engines that do not support the Cloning option shall ignore this action. This action copies the Target adding the copy to the same group that contains the Target using a unique ObjectReference obtained from the engine. The ObjectReference referring to the copy is returned in the ObjectRefVariable referenced by CloneRefVar. Execute the following sequence of actions: 1. Determine a unique ObjectReference within the same group as the Target. 2. Create a copy of the Target, taking into account only the exchanged attributes and not the internal attributes. The ObjectIdentifier attribute inherited from the Root class is not copied, but set to the ObjectReference determined in step 1. 3. Add the copy to the group containing the Target object. 4. Set the ObjectRefVariable referenced by CloneRefVar to the ObjectReference determined in step 1. 5. Apply the Preparation behaviour to the copy. An object created using this action is deactivated/destroyed when the group that contains that object is deactivated/destroyed. The objects are deactivated/destroyed along with other static Ingredients in the reverse order of creation. A dynamically created Ingredient can also be destroyed using the Unload elementary action if its Content attribute is not Null. Provision of use: The Target object shall be an available Ingredient. CloneRefVar shall be an active ObjectRefVariable. Clone --> Target, CloneRefVar Target --> GenericObjectReference CloneRefVar --> ObjectReference.
target | target object for this action |
params | Action parameters |
void MHEG5ingredientActivate | ( | MHEG5Ingredient * | ingredient | ) |
Implementation of Activate behaviour Inherrited from Root class.
ingredient | Ingredient to activate |
void MHEG5ingredientClone | ( | MHEG5Ingredient * | destination, |
MHEG5Ingredient * | source | ||
) |
Implementation of the ingredient part of the clone action.
destination | Ingredient object to clone to |
source | Ingredient object to clone from |
void MHEG5ingredientContentPrepare | ( | MHEG5Ingredient * | ingredient | ) |
Implementation of the ContentPrepare behaviour COR.1 6.6: ContentPreparation Apply the following sequence of actions synchronously: 1. If the Ingredient does not have the Content attribute encoded then ignore this action. 2. Cancel any outstanding ContentPreparationasynchronous steps for this object. 3. Initiate retrieval of the data for the Contentattribute of the object. The following step is asynchronousand occurs when the content of the object has been fully retrieved: 4. Generate a ContentAvailableevent.
ingredient | Ingredient to prepare |
void MHEG5ingredientDeactivate | ( | MHEG5Ingredient * | ingredient | ) |
Implementation of Deactivate behaviour Inherrited from Root class.
ingredient | Ingredient to deactivate |
void MHEG5ingredientDestruct | ( | MHEG5Ingredient * | ingredient | ) |
Implementation of the Destruction behaviour Execute the following sequence of actions: 1. If the Content attribute is set to a reference to external data source and if ContentCachePriority is set to 0, the MHEG-5 engine shall free all resources allocated to the external content data of the Ingredient. 2. If the Content attribute is set to a reference to external data source and if ContentCachePriority is different from 0, the MHEG-5 engine may free all resources allocated to the external content data of the Ingredient, or cache it. 3. Apply the Destruction behaviour as inherited from the Root class.
ingredient | Ingredient to destruct |
void MHEG5ingredientFree | ( | MHEG5Ingredient * | ingredient | ) |
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.
ingredient | Pointer to object to free. |
void MHEG5ingredientInit | ( | MHEG5Ingredient * | ingredient | ) |
Initialise a ingredient object with default values.
ingredient | Pointer to object to initialise. |
void MHEG5ingredientPrepare | ( | MHEG5Ingredient * | ingredient | ) |
Implementation of the Preparation behaviour Inherrited from Root class.
ingredient | Ingredient to prepare |
MHEG5ErrorCode MHEG5preload | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
Implementation of the Preload action Preload Prepares an Ingredient and provides a hint to the MHEG-5 engine to prepare the content data of an Ingredient for future use. Execute the following sequence of actions: 1. Apply the Preparation behaviour. 2. The MHEG-5 engine may optionally retrieve and/or decode the content data associated with the target Ingredient object. Provisions of use: The Target object shall be non-available Ingredient object. The Content attribute of the target Ingredient shall be different from Null. Preload --> Target Target --> GenericObjectReference.
MHEG5PROFILE_UK1_06
MHEG5ErrorCode MHEG5setData | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
Implementation of SetData action SetData (NewContent) Set the Content attribute of the target Ingredient to NewContent. Provisions of use: The Target object shall be an available Ingredient object. The ContentHook of the target Ingredient object shall be encoded. Data included or referenced by NewContent shall have the encoding format determined by ContentHook of the target Ingredient. If Content is currently set to included data, NewContent shall be set or refer to included data. If Content is currently set to a reference to an external data source, then NewContent shall be set or refer to a reference to an external data source. COR1: Execute the following sequence of actions: 1. Set the Content attribute of the target Ingredient to NewContent. 2. Apply the ContentPreparation behaviour. SetData --> Target, NewContent Target --> GenericObjectReference NewContent --> NewIncludedContent | NewReferencedContent NewIncludedContent --> GenericOctetString NewReferencedContent --> NewContentReference, NewContentSize?, NewContentCachePriority? NewContentReference --> GenericContentReference NewContentSize --> GenericInteger NewContentCachePriority --> GenericInteger.
target | target object for this action |
params | Action parameters |
MHEG5ErrorCode MHEG5unload | ( | MHEG5Root * | target, |
MHEG5GList * | params | ||
) |
Implementation of the Unload action Unload Destroys an Ingredient and provides a hint to the MHEG-5 engine to free resources allocated to an Ingredient. Execute the following sequence of actions: 1. Apply the Destruction behaviour. Provisions of use: The Target object shall be an available and inactive Ingredient object. The Content attribute of the target Ingredient shall be different from Null. Unload --> Target Target --> GenericObjectReference.