77 U32BIT token_num, actions_num, num;
80 MHEG5ingredientPrint(&tokenGroup->ingredient, out);
81 MHEG5tokenManagerPrint(&tokenGroup->tokenManager, out);
85 MHEG_PRINT(out,
":TokenGroupItems (");
88 currTGItem = tokenGroup->tokens_ptr + 1;
89 token_num = tokenGroup->tokens_num - 1;
91 while (token_num != 0)
97 if ((tokenGroup->ingredient.root.grp == currTGItem->groupid.ptr.group) ||
98 ((currTGItem->groupid.len) &&
MHEG5sameGroup(tokenGroup->ingredient.root.grp, currTGItem->groupid)))
100 MHEG5intPrint(currTGItem->id, out);
104 MHEG_PRINT(out,
"(");
105 MHEG5stringPrint(*((
MHEG5String *)&currTGItem->groupid), out);
106 MHEG_PRINT(out,
" ");
107 MHEG5intPrint(currTGItem->id, out);
108 MHEG_PRINT(out,
")");
112 MHEG_PRINT(out,
":ActionSlots (");
117 actions_num = currTGItem->actions_num;
118 actions_ptr = currTGItem->actions_ptr;
120 while (actions_num != 0)
123 MHEG_PRINT(out,
"( // AS=");
124 MHEG5intPrint(num, out);
126 MHEG5actionPrint(*actions_ptr, out);
128 MHEG_PRINT(out,
")");
136 MHEG_PRINT(out,
")");
141 MHEG_PRINT(out,
")");
150 MHEG_PRINT(out,
")");
152 currTGItem = tokenGroup->tokens_ptr;
153 actions_num = currTGItem->actions_num;
154 if (actions_num != 0)
158 MHEG_PRINT(out,
":NoTokenActionSlot ");
162 actions_ptr = currTGItem->actions_ptr;
166 MHEG_PRINT(out,
"(");
168 MHEG5actionPrint(*actions_ptr, out);
170 MHEG_PRINT(out,
")");
175 while (actions_num != 0);
194 U32BIT token_num, actions_num;
202 token_ptr = tokenGroup->tokens_ptr;
203 token_num = tokenGroup->tokens_num;
206 if (token_ptr->groupid.len)
210 actions_num = token_ptr->actions_num;
211 actions_ptr = token_ptr->actions_ptr;
238 token_ptr = tokenGroup->tokens_ptr;
239 token_num = tokenGroup->tokens_num;
242 actions_num = token_ptr->actions_num;
243 actions_ptr = token_ptr->actions_ptr;
276 if (!tokenGroup->ingredient.root.runningStatus)
278 if (!tokenGroup->ingredient.root.availabilityStatus)
280 MHEG5tokenGroupPrepare( tokenGroup );
285 token_ptr = tokenGroup->tokens_ptr + 1;
286 token_num = tokenGroup->tokens_num - 1;
289 item = MHEG5findObject(token_ptr->groupid, token_ptr->id);
298 tokenGroup->ingredient.root.runningStatus = MHEG5TRUE;
313 if (tokenGroup->ingredient.root.runningStatus)
331 token_ptr = tokenGroup->tokens_ptr;
332 token_num = tokenGroup->tokens_num;
335 actions_num = token_ptr->actions_num;
336 actions_ptr = token_ptr->actions_ptr;
350 static void TraceToken(
MHEG5TokenGroup *tkn, MHEG5Int t_posn, MHEG5Int idx )
352 int ind = (event_indent_num << 1) + 1;
355 ind = (event_indent_num << 1) % MAX_EVENT_INDENT;
365 DBG_PRINTF(
"Tokengroup: %c%ld posn: %d aslot: %d",
366 (tkn->ingredient.root.grp->root.clazz == MHEG5SCENE) ?
'S' :
'A', tkn->ingredient.root.id, t_posn, idx );
395 MHEG5Int idx = 0, position = 0;
399 if ((target->clazz != MHEG5TOKENGROUP) && (target->clazz != MHEG5LISTGROUP))
401 return MHEG5ERR_WRONGTARGET;
406 return MHEG5ERR_WRONGNUMBEROFPARAMS;
408 MHEG5resolveGenericInteger(params, &idx);
413 extra_trace_param = (position << 16) | idx;
416 if (position >= ((
MHEG5TokenGroup *)target)->tokens_num || position < 0)
418 return MHEG5ERR_NOSUCHITEM;
423 token_ptr += position;
424 if (idx <= token_ptr->actions_num && idx > 0)
426 actions_ptr = token_ptr->actions_ptr + idx - 1;
429 MHEG5LogPrintf(MHEG5CALLS,
"MHEG5callActionSlot position = %d, %d\n", position, idx);
433 if (mheg_trace_debug & (TACTIONS | TEVNTS))
441 return MHEG5ERR_NOSUCHSLOT;
444 return MHEG5ERR_NOERROR;
void MHEG5tokenManagerDestruct(MHEG5TokenManager *tokenManager)
Destruct a TokenManager object.
void MHEG5tokenManagerFree(MHEG5TokenManager *tokenManager)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Distributor for Prepare, Destruct, Activate, Deactivate and Clone calls. Distribute the +Prepare +Des...
MHEG5Bool MHEG5sameGroup(MH5GroupPtr gptr, MH5GroupRef gref)
Compares group ptr with group ref to see whether they both reference the same group. The first is pointer to group, the second can be a relative group name and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group name produces a True return value.
void MHEG5finalActivate(MHEG5Root *item)
void MHEG5PrependActionList(MHEG5ActionList actions)
Execute the supplied list of actions before others.
void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient)
Implementation of the Destruction behaviour Execute the following sequence of actions: ...
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
Implement the MHEG5 Tokengroup Class 29 TokenGroup Class. Defines a group of Visible objects for navi...
void MHEG5tokenManagerPrepare(MHEG5TokenManager *tokenManager)
Sets all internal attributes for the specified object to their default values.
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DS...
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MHEG5tokenGroupFree(MHEG5TokenGroup *tokenGroup)
<Function description>="">
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 MHEG5actionDestruct(MHEG5ActionList actions)
<Function description>="">
void MHEG5queueUnresolveTargets(MHEG5ActionList actions)
Clear targets for the action list.
void MHEG5queueResolveTargets(MHEG5ActionList actions)
Finds targets for the action list.
void MHEG5ingredientFree(MHEG5Ingredient *ingredient)
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.