70 MHEG5ingredientPrint(&program->ingredient, out);
72 MHEG_PRINT(out,
":Name ");
73 MHEG5stringPrint(program->name, out);
76 if (!program->initiallyAvailable)
79 MHEG_PRINT(out,
":InitiallyAvailable FALSE");
82 if (program->programConnectionTag != 0)
85 MHEG_PRINT(out,
":ConnectionTag ");
86 MHEG5intPrint(program->programConnectionTag, out);
111 program->initiallyAvailable = MHEG5TRUE;
142 MHEG5programInit(program);
168 MHEG5programInit(program);
194 MHEG5programInit(program);
236 MHEG5ErrorCode MHEG5programActivate(
MHEG5Program *program)
247 MHEG5resolveORef(program->parameter, &callVar);
248 if (!callVar || callVar->clazz != MHEG5BOOLEANVARIABLE)
250 rc = MHEG5ERR_WRONGPARAM;
252 else if (program->startFunc == NULL)
256 extra_trace_param = (int)program->name.data;
258 rc = MHEG5ERR_NOTSUPPORTEDBYPROFILE;
267 if (!program->ingredient.root.runningStatus)
270 if (!program->ingredient.root.availabilityStatus)
286 program->forkSucceededValue = NULL;
289 rc = (program->startFunc)(program);
292 program->ingredient.root.runningStatus = MHEG5TRUE;
299 rc = MHEG5ERR_TARGETNOTACTIVE;
317 if (program->stopFunc != NULL)
319 (program->stopFunc)(program);
321 if (program->ingredient.root.runningStatus)
330 if (program->stopFunc != NULL)
332 (program->stopFunc)(program);
370 rc = MHEG5ERR_WRONGNUMBEROFPARAMS;
375 switch (target->clazz)
379 rc = MHEG5ERR_WRONGTARGET;
382 case MHEG5REMOTEPROGRAM:
383 case MHEG5INTERCHANGEDPROGRAM:
385 rc = MHEG5ERR_NOTSUPPORTEDBYPROFILE;
388 case MHEG5RESIDENTPROGRAM:
390 if (!target->availabilityStatus)
395 if (target->runningStatus)
397 rc = MHEG5ERR_NOERROR;
467 rc = MHEG5ERR_WRONGNUMBEROFPARAMS;
472 switch (target->clazz)
476 rc = MHEG5ERR_WRONGTARGET;
479 case MHEG5REMOTEPROGRAM:
480 case MHEG5INTERCHANGEDPROGRAM:
482 rc = MHEG5ERR_NOTSUPPORTEDBYPROFILE;
485 case MHEG5RESIDENTPROGRAM:
487 if (!target->availabilityStatus)
492 if (target->runningStatus)
494 rc = MHEG5ERR_NOERROR;
504 if (rc == MHEG5ERR_NOERROR)
506 if (((
MHEG5Program *)target)->forkSucceededValue == NULL)
void MHEG5ingredientInit(MHEG5Ingredient *ingredient)
Initialise a ingredient object with default values.
Distributor for Prepare, Destruct, Activate, Deactivate and Clone calls. Distribute the +Prepare +Des...
Implement the MHEG5 Program Class Defines means to handle execution of external pieces of procedural ...
void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient)
Implementation of the Destruction behaviour Execute the following sequence of actions: ...
void MHEG5remoteProgramInit(MHEG5Program *program)
Initialise a remoteProgram object with default values.
void MHEG5programFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
Implementation of the resident programs which are defined by the current profile. ...
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MHEG5ingredientDeactivate(MHEG5Ingredient *ingredient)
Implementation of Deactivate behaviour Inherrited from Root class.
Implement functions to retrieve MHEG5objects by GroupID and ID.
void MHEG5ingredientPrepare(MHEG5Ingredient *ingredient)
Implementation of the Preparation behaviour Inherrited from Root class.
Mheg5 logging and debug printing.
void MHEG5interchangedProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5ProgramSetStartFunc(MHEG5Program *program)
Test if the program NAME is included in this profile and get the start function to execute...
void MHEG5sendEvent(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the asynchronous event queue.
void MHEG5residentProgramInit(MHEG5Program *program)
Initialise a residentProgram object with default values.
void MHEG5remoteProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5ingredientFree(MHEG5Ingredient *ingredient)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5interchangedProgramInit(MHEG5Program *program)
Initialise a interchangedProgram object with default values.
void MHEG5residentProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5sendSync(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the synchronous event queue.