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

Implementation of the Ingredient class. More...

#include <string.h>
#include "mh5ingredient.h"
#include "mh5object.h"
#include "mh5final.h"
#include "mh5display.h"
#include "mh5visible.h"
#include "mh5fileorm.h"
#include "mh5streamevent.h"
#include "mh5memory.h"
#include "mh5queue.h"
#include "mh5scene.h"
#include "mh5application.h"
#include "mh5variable.h"
#include "mh5hypertext.h"
#include "mh5listgroup.h"
#include "mh5stream.h"
#include "mh5video.h"
#include "mh5debug.h"
#include "mh5palette.h"
#include "mh5cursorshape.h"
#include "mh5font.h"
#include "mh5program.h"
#include "mh5audio.h"
#include "mh5rtgraphics.h"
#include "mh5slider.h"
#include "mh5dynamiclineart.h"
#include "mh5entryfield.h"
#include "mh5hotspot.h"
#include "mh5pushbutton.h"
#include "mh5switchbutton.h"
#include "mh5profile.h"
#include "mg_api.h"
#include "mg_fontapi.h"
#include "mh5drawtext.h"

Functions

void MHEG5ingredientInit (MHEG5Ingredient *ingredient)
 Initialise a ingredient object with default values. More...
 
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. More...
 
void MHEG5ingredientClone (MHEG5Ingredient *destination, MHEG5Ingredient *source)
 Implementation of the ingredient part of the clone action. More...
 
void MHEG5ingredientPrepare (MHEG5Ingredient *ingredient)
 Implementation of the Preparation behaviour Inherrited from Root class. More...
 
void MHEG5ingredientContentPrepare (MHEG5Ingredient *ingredient)
 Implementation of the ContentPrepare behaviour COR.1 6.6: ContentPreparation Apply the following sequence of actions synchronously: More...
 
void MHEG5ingredientDestruct (MHEG5Ingredient *ingredient)
 Implementation of the Destruction behaviour Execute the following sequence of actions: More...
 
void MHEG5ingredientActivate (MHEG5Ingredient *ingredient)
 Implementation of Activate behaviour Inherrited from Root class. More...
 
void MHEG5ingredientDeactivate (MHEG5Ingredient *ingredient)
 Implementation of Deactivate behaviour Inherrited from Root class. More...
 
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: More...
 
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: More...
 
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: More...
 
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: More...
 

Detailed Description

Implementation of the Ingredient class.

Date
01/02/2002
Author
R.Freeman

Function Documentation

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
    Parameters
    targettarget object for this action
    paramsAction parameters
    Returns
    MHEG5ErrorCode - See mh5base.h
void MHEG5ingredientActivate ( MHEG5Ingredient ingredient)

Implementation of Activate behaviour Inherrited from Root class.

Parameters
ingredientIngredient to activate
Returns
<Return value>="">
void MHEG5ingredientClone ( MHEG5Ingredient destination,
MHEG5Ingredient source 
)

Implementation of the ingredient part of the clone action.

Parameters
destinationIngredient object to clone to
sourceIngredient object to clone from
Returns
void
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.
    Parameters
    ingredientIngredient to prepare
    Returns
    void
void MHEG5ingredientDeactivate ( MHEG5Ingredient ingredient)

Implementation of Deactivate behaviour Inherrited from Root class.

Parameters
ingredientIngredient to deactivate
Returns
void
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.
    Parameters
    ingredientIngredient to destruct
    Returns
    void
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.

Parameters
ingredientPointer to object to free.
Returns
Void
void MHEG5ingredientInit ( MHEG5Ingredient ingredient)

Initialise a ingredient object with default values.

Parameters
ingredientPointer to object to initialise.
Returns
Void
void MHEG5ingredientPrepare ( MHEG5Ingredient ingredient)

Implementation of the Preparation behaviour Inherrited from Root class.

Parameters
ingredientIngredient to prepare
Returns
void
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
    Returns
    MHEG5ErrorCode - See mh5base.h

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
    Parameters
    targettarget object for this action
    paramsAction parameters
    Returns
    MHEG5ErrorCode - See mh5base.h
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
    Returns
    MHEG5ErrorCode - See mh5base.h