DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
objectCarousel.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2001 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
25 /*---includes for this file--------------------------------------------------*/
26 #include "clDsmSystem.h"
27 #include "objectCarousel.h"
28 
29 #include "object.h"
30 #include "module.h"
31 #include "cacheMgr.h"
32 #include "loadMgr.h"
33 
34 /*------------------------------- Local Macros -------------------------------*/
35 
36 #define FG_HDR_LEN 8
37 
38 #define DESCRIPTOR_STORED_GROUPS_TAG ((U8BIT) 0x80)
39 #define DESCRIPTOR_GROUP_LOCATION_TAG ((U8BIT) 0x81)
40 
41 /*------------------------------ Exported Data -----------------------------*/
42 
43 
44 
45 /*--------------------------------Local Types --------------------------------*/
46 
47 
48 typedef enum {
49  FGC_NONE,
50  FGC_VERS,
51  FGC_LIST
52 } E_FgChange;
53 
54 typedef struct FileGroupList_s
55 {
56  pFileGroupList_t next;
57  U16BIT clientCount;
58  U16BIT fgTotal;
59  U16BIT dataSize;
60 } FileGroupList_t;
61 
62 
63 /*------------------------------- Local Statics ------------------------------*/
64 
65 static pFileGroupList_t gOrphanFileGroups = NULL;
66 
67 
68 /*------------------- local prototypes/forward declarations ------------------*/
69 
70 
71 /*------------------------------ Local Functions -----------------------------*/
72 
73 
74 static void ClearFileGroups( P_DsmCoreInst idp, pFileGroupList_t *ppFG )
75 {
76  pFileGroupList_t pFG;
77  do
78  {
79  pFG = *ppFG;
80  *ppFG = pFG->next;
81 
82  /* -- Client should have released any references to the file group list
83  * but if not, add to the orphan list (don't delete) */
84  if (pFG->clientCount != 0)
85  {
86  pFG->next = gOrphanFileGroups;
87  gOrphanFileGroups = pFG;
88  }
89  else
90  {
91  DSC_CmMemRelease( idp, pFG );
92  }
93  }
94  while (*ppFG);
95 }
96 
97 static U8BIT* SkipTaps( U8BIT *pData )
98 {
99  U8BIT count, secLen;
100  READ_UINT8( pData, count);
101  while (count--)
102  {
103  SET_POS_REL( pData, 6 ); /* tapId, tapUse, associationTag */
104  READ_UINT8( pData, secLen ); /* Read selectorLength */
105  SET_POS_REL( pData, (S32BIT)secLen ); /* Skip selector field */
106  }
107  return pData;
108 }
109 
110 static U8BIT* SkipServiceContexts( U8BIT *pData )
111 {
112  U8BIT count;
113  U16BIT ctxtLen;
114  READ_UINT8(pData, count);
115  while (count--)
116  {
117  SET_POS_REL(pData, 4); /* Skip service ID (context_id) */
118  READ_UINT16(pData, ctxtLen); /* context data length */
119  SET_POS_REL(pData, ctxtLen); /* Skip context data */
120  }
121  return pData;
122 }
123 
124 /*----------------------------------------------------------------------------*/
125 
126 /*---------------------------- Exported Functions ----------------------------*/
127 
128 /* /////////////////////////////////////////////////////////////////////////////
129 // DSC_ObjCrslCreate
130 // Creates an instance of the ObjectCarousel struct and initialises it.
132 E_DscError DSC_ObjCrslCreate( P_DsmCoreInst idp, U16BIT serviceId,
133  U32BIT carouselId, P_ObjectCarousel *ppObjectCarousel )
134 {
135  P_ObjectCarousel pOC;
136  P_LoadRequest pLoadRequest;
137  E_DscError err;
138 
139  dsmDP3(("DSC_ObjCrslCreate()\n"));
140  dsmAssert((idp != NULL));
141  dsmAssert((ppObjectCarousel != NULL));
142 
143  pOC = (P_ObjectCarousel)DSC_CmMemGet( idp, sizeof(S_ObjectCarousel) );
144  if (!pOC)
145  {
146  err = CLDSM_ERR_MEM_HEAP_FULL;
147  *ppObjectCarousel = NULL;
148  }
149  else
150  {
151  memset(pOC,0,sizeof(S_ObjectCarousel));
152 
153  err = DSC_RootCrslInitialise( idp, &pOC->root, OC_MAGIC, serviceId, carouselId );
154  if (err)
155  {
156  DSC_CmMemRelease( idp, pOC );
157  *ppObjectCarousel = NULL;
158  }
159  else
160  {
161  err = LLCreate( idp, pOC, CURR_OBJECT_LIST, &pOC->llcCurrObjects );
162  if (err)
163  {
164  DSC_RootCrslFinalise( idp, &pOC->root );
165  DSC_CmMemRelease( idp, pOC );
166  *ppObjectCarousel = NULL;
167  }
168  else
169  {
170  err = LLCreate( idp, pOC, OC_LITE_OBJECT_LOAD_LIST, &pOC->llcOcPostponedLiteObjectLoads );
171  if (err)
172  {
173  LLDestroy( idp, &(pOC->llcCurrObjects));
174  DSC_RootCrslFinalise( idp, &pOC->root );
175  DSC_CmMemRelease( idp, pOC );
176  *ppObjectCarousel = NULL;
177  }
178  else
179  {
180  err = DSC_LoadRsqtCreate( idp, sizeof(S_LoadRequest), TT_CAROUSEL, pOC,
181  (F_LoadFinalise)lmCarouselLoadFinalise, (P_RootLoadRqst *)&pLoadRequest );
182  if (err)
183  {
184  LLDestroy( idp, &(pOC->llcCurrObjects));
185  LLDestroy( idp, &(pOC->llcOcPostponedLiteObjectLoads));
186  DSC_RootCrslFinalise( idp, &pOC->root );
187  DSC_CmMemRelease( idp, pOC );
188  *ppObjectCarousel = NULL;
189  }
190  else
191  {
192  pOC->root.pLoadRqst = (P_RootLoadRqst)pLoadRequest;
193  pLoadRequest->pObjCarousel = pOC;
194  *ppObjectCarousel = pOC;
195  DBGLOG(DD_OC,"pOC=%p",pOC)
196  }
197  }
198  }
199  }
200  }
201  DEBUG_CHK( err == CLDSM_OK, dsmDP1(("ERROR: DSC_ObjCrslCreate %u\n", err)));
202  dsmDP3(("exit DSC_ObjCrslCreate -> rtn: %u\n", err));
203  return err;
204 }
205 
206 /* /////////////////////////////////////////////////////////////////////////////
207 // DSC_ObjCrslDestroy
208 //
210 void DSC_ObjCrslDestroy( P_DsmCoreInst idp, P_ObjectCarousel *ppObjectCarousel )
211 {
212  P_ObjectCarousel pOC;
213 
214  dsmDP3(("DSC_ObjCrslDestroy()\n"));
215  dsmAssert((idp != NULL));
216  dsmAssert((ppObjectCarousel != NULL));
217  dsmAssert((*ppObjectCarousel != NULL));
218 
219  pOC = *ppObjectCarousel;
220 
221  DBGLOG(DD_OC,"pOC=%p",pOC)
222 
223  /* -- Should not have any loaded objects */
224  dsmAssert((pOC->loadedObjectCount == 0));
225 
226  if (pOC->root.pLoadRqst)
227  {
228  DSC_LoadRsqtDestroy( idp, pOC->root.pLoadRqst );
229  }
230  if (pOC->pFileGroupList != NULL)
231  {
232  ClearFileGroups( idp, &pOC->pFileGroupList );
233  }
234 
235  LLDestroy( idp, &pOC->llcOcPostponedLiteObjectLoads);
236  LLDestroy( idp, &pOC->llcCurrObjects );
237 
238  DSC_RootCrslFinalise( idp, &pOC->root );
239 
240  memset(pOC,0,sizeof(S_ObjectCarousel));
241  DSC_CmMemRelease( idp, pOC );
242  *ppObjectCarousel = NULL;
243 
244  dsmDP3(("exit DSC_ObjCrslDestroy\n"));
245 }
246 
247 static U16BIT CountFileGroups( U8BIT *pData, U16BIT uiLen, U16BIT *pDataSize )
248 {
249  U16BIT count = 0;
250  U8BIT descTag, descLen;
251  U8BIT ui8;
252  *pDataSize = 0;
253  while (uiLen > FG_HDR_LEN + 2)
254  {
255  READ_UINT8( pData, descTag);
256  READ_UINT8( pData, descLen);
257  uiLen -= 2;
258  if (descLen > uiLen)
259  {
260  dsmDP2(("DATA ERROR: DSI User Info: UI_len=%u desc_len=%u\n", uiLen, descLen));
261  break;
262  }
263  uiLen -= descLen;
264  if (descTag == DESCRIPTOR_STORED_GROUPS_TAG)
265  {
266  while (descLen > FG_HDR_LEN)
267  {
268  count++;
269  /* skip: owner_id, group_id, group_priority,use_flags,receiver_profile,group_version */
270  SET_POS_REL( pData, FG_HDR_LEN );
271  READ_UINT8( pData, ui8 ); // private data length
272  descLen -= FG_HDR_LEN + 1;
273  if (ui8 != 0)
274  {
275  if (ui8 > descLen)
276  {
277  dsmDP2(("DATA ERROR: DSI User Info: desc_len=%u priv data len=%u\n", descLen, ui8));
278  uiLen = 0;
279  break;
280  }
281  /* add max possible len for "group location" */
282  *pDataSize += ui8;
283  /* private data - Skip it */
284  SET_POS_REL( pData, ui8 );
285  descLen -= ui8;
286  }
287  /* add 1 for null terminating char */
288  *pDataSize += 1;
289  }
290  }
291  else
292  {
293  SET_POS_REL( pData, descLen );
294  }
295  }
296  return count;
297 }
298 
299 static U8BIT* ParseGroupLocation( U8BIT *pData, U16BIT len, U8BIT *dataPtr )
300 {
301  U8BIT descTag, descLen;
302  do
303  {
304  READ_UINT8( pData, descTag);
305  READ_UINT8( pData, descLen);
306  len -= 2;
307  if (descLen > len)
308  {
309  dsmDP2(("DATA ERROR: desc len too long: len=%u desc_len=%u\n", len, descLen));
310  break;
311  }
312  len -= descLen;
313  if (descTag == DESCRIPTOR_GROUP_LOCATION_TAG)
314  {
315  while (descLen--)
316  {
317  READ_UINT8( pData, *dataPtr );
318  dataPtr++;
319  }
320  }
321  }
322  while (len > 2);
323  return dataPtr;
324 }
325 
326 static void ParseFileGroups( S_CarouselInfoFileGroup *pIFP, U8BIT *pData, U16BIT uiLen, U8BIT *dataPtr )
327 {
328  U8BIT descTag, descLen;
329  U8BIT ui8;
330  do
331  {
332  READ_UINT8( pData, descTag);
333  READ_UINT8( pData, descLen);
334  uiLen -= 2;
335  if (descLen > uiLen)
336  {
337  dsmDP2(("DATA ERROR: DSI User Info: UI_len=%u desc_len=%u\n", uiLen, descLen));
338  break;
339  }
340  uiLen -= descLen;
341  if (descTag == DESCRIPTOR_STORED_GROUPS_TAG)
342  {
343  while (descLen > FG_HDR_LEN)
344  {
345  READ_UINT16( pData, pIFP->owner_id );
346  READ_UINT16( pData, pIFP->group_id );
347  READ_UINT8( pData, pIFP->group_priority );
348  READ_UINT8( pData, pIFP->use_flags );
349  READ_UINT8( pData, pIFP->receiver_profile );
350  READ_UINT8( pData, pIFP->group_version );
351  READ_UINT8( pData, ui8 );
352  descLen -= FG_HDR_LEN + 1;
353  pIFP->location = dataPtr;
354  if (ui8 != 0)
355  {
356  if (ui8 > descLen)
357  {
358  dsmDP2(("DATA ERROR: DSI User Info: desc_len=%u priv data len=%u\n", descLen, ui8));
359  uiLen = 0;
360  break;
361  }
362  dataPtr = ParseGroupLocation( pData, ui8, dataPtr );
363  /* now skip over private data */
364  SET_POS_REL( pData, ui8 );
365  descLen -= ui8;
366  }
367  *dataPtr = '\0';
368  DBG2(DD_OC, "oid=0x%x gid=0x%x ver=%d", pIFP->owner_id, pIFP->group_id, pIFP->group_version)
369  dataPtr++;
370  pIFP++;
371  }
372  }
373  else
374  {
375  SET_POS_REL( pData, descLen );
376  uiLen -= descLen;
377  }
378  }
379  while (uiLen > FG_HDR_LEN + 2);
380 }
381 
382 E_DscError DSC_ObjCrslRetrieveFileGroups( P_ObjectCarousel pOC, U16BIT *total,
383  S_CarouselInfoFileGroup **pGroups )
384 {
385  E_DscError err;
386  pFileGroupList_t pFG = pOC->pFileGroupList;
387  if (pFG == NULL)
388  {
389  *total = 0;
390  *pGroups = NULL;
391  err = CLDSM_ERR_LOAD_FAILED;
392  }
393  else
394  {
395  pFG->clientCount++;
396  *total = pFG->fgTotal;
397  *pGroups = (S_CarouselInfoFileGroup *)(pFG + 1);
398  err = CLDSM_OK;
399  }
400  return err;
401 }
402 
403 void DSC_ObjCrslReleaseFileGroups( P_DsmCoreInst idp, P_ObjectCarousel pOC, S_CarouselInfoFileGroup *groups )
404 {
405  pFileGroupList_t pFG;
406  pFileGroupList_t *ppFG;
407  BOOLEAN remove;
408  if (groups != NULL)
409  {
410  pFG = (pFileGroupList_t)groups;
411  pFG--; // move pointer to private data for the list
412  remove = TRUE;
413  if (pOC == NULL)
414  {
415  ppFG = &gOrphanFileGroups;
416  }
417  else
418  {
419  ppFG = &pOC->pFileGroupList;
420  if (pFG == *ppFG)
421  {
422  /* Current filegroup - just dec the client count */
423  if (pFG->clientCount != 0)
424  pFG->clientCount--;
425  remove = FALSE;
426  }
427  }
428  if (remove)
429  {
430  /* Old filegroup - dec client count and remove */
431  while (*ppFG)
432  {
433  if (pFG == *ppFG)
434  {
435  if (pFG->clientCount != 0)
436  {
437  pFG->clientCount--;
438  }
439  if (!pFG->clientCount)
440  {
441  *ppFG = pFG->next;
442  DSC_CmMemRelease(idp, pFG);
443  }
444  break;
445  }
446  ppFG = &((*ppFG)->next);
447  }
448  }
449  }
450 }
451 
452 E_FgChange FileGroupChange( S_CarouselInfoFileGroup *pOldIFP, S_CarouselInfoFileGroup *pNewIFP, U16BIT fgTotal )
453 {
454  E_FgChange result = FGC_NONE;
455  /* check to see if group list changed or if group version changed
456  * (assuming they are in same order when no change) */
457  while (fgTotal--)
458  {
459  if (pOldIFP->owner_id != pNewIFP->owner_id ||
460  pOldIFP->group_id != pNewIFP->group_id )
461  {
462  DBG2(DD_OC,"(%x,%x) (%x,%x)",
463  pOldIFP->owner_id,pOldIFP->group_id,
464  pNewIFP->owner_id,pNewIFP->group_id )
465  result = FGC_LIST;
466  break;
467  }
468  else if (pOldIFP->group_version != pNewIFP->group_version )
469  {
470  DBG2(DD_OC, "(%x,%x) (%x,%x) oldver=%d newver=%d",
471  pOldIFP->owner_id, pOldIFP->group_id,
472  pNewIFP->owner_id, pNewIFP->group_id,
473  pOldIFP->group_version, pNewIFP->group_version )
474  result = FGC_VERS;
475  }
476  }
477  return result;
478 }
479 
480 static E_DscError ocUpdateSrgUserInfo( P_DsmCoreInst idp, P_ObjectCarousel pOC,
481  U8BIT *pSrgData, U16BIT usrInfoLen )
482 {
483  E_DscError err;
484  pFileGroupList_t pOldFG, pNewFG;
485  S_CarouselInfoFileGroup *fgListPtr;
486  U16BIT fgTotal, size, dataSize;
487  U8BIT *dataPtr;
488  E_FgChange fgchange;
489 
490  fgTotal = CountFileGroups(pSrgData, usrInfoLen, &dataSize);
491  pOldFG = pOC->pFileGroupList;
492  DBGLOG(DD_OC, "fgTotal=%d", fgTotal);
493  size = sizeof(FileGroupList_t) + (fgTotal * sizeof(S_CarouselInfoFileGroup)) + dataSize;
494  pNewFG = (pFileGroupList_t)DSC_CmMemGet( idp, size );
495  if (!pNewFG)
496  {
497  ERRPRINT("Mem error")
498  err = CLDSM_ERR_MEM_HEAP_FULL;
499  }
500  else
501  {
502  err = CLDSM_OK;
503  memset( pNewFG, 0, size );
504  pNewFG->fgTotal = fgTotal;
505  pNewFG->dataSize = dataSize;
506  if (fgTotal != 0)
507  {
508  fgListPtr = (S_CarouselInfoFileGroup *)(pNewFG + 1);
509  dataPtr = (U8BIT *)(fgListPtr + fgTotal);
510  ParseFileGroups( fgListPtr, pSrgData, usrInfoLen, dataPtr );
511  }
512  if (pOldFG == NULL)
513  {
514  DBGLOG(DD_OC, "pNewFG=%p", pNewFG);
515  pNewFG->next = pOC->pFileGroupList;
516  pOC->pFileGroupList = pNewFG;
517  if (fgTotal != 0 &&
518  pOC->root.status == RCS_LOADED && /* don't signal when booting - done in DSC_ObjCrslUpdateSuiLoad */
519  idp->setup.notifyCarouselLoadEventFunc != NULL)
520  {
521  idp->setup.notifyCarouselLoadEventFunc((H_DsmCarousel)pOC, OC_FILE_GROUP_LIST_CHANGE, pOC->root.rcid);
522  }
523  }
524  else
525  {
526  if (pOldFG->fgTotal != fgTotal)
527  {
528  fgchange = FGC_LIST;
529  }
530  else
531  {
532  fgchange = FileGroupChange((S_CarouselInfoFileGroup*)(pOldFG+1),(S_CarouselInfoFileGroup*)(pNewFG+1),fgTotal);
533  }
534  if (fgchange != FGC_NONE)
535  {
536  DBGLOG(DD_OC, "clientCount=%d", pOldFG->clientCount);
537  if (pOldFG->clientCount == 0)
538  {
539  /* Old File Group list can be removed */
540  pOC->pFileGroupList = pOldFG->next;
541  DSC_CmMemRelease(idp, pOldFG);
542  }
543  pNewFG->next = pOC->pFileGroupList;
544  pOC->pFileGroupList = pNewFG;
545  if ( idp->setup.notifyCarouselLoadEventFunc )
546  {
547  idp->setup.notifyCarouselLoadEventFunc( (H_DsmCarousel)pOC,
548  (fgchange == FGC_LIST)? OC_FILE_GROUP_LIST_CHANGE : OC_FILE_GROUP_VERS_CHANGE,
549  pOC->root.rcid );
550  }
551  }
552  else /*FGC_NONE*/
553  {
554  /* No change to File Group list or versions */
555  DSC_CmMemRelease(idp, pNewFG);
556  }
557  }
558  }
559  return err;
560 }
561 
562 void DSC_ObjCrslUpdateSuiLoaded( P_DsmCoreInst idp, P_ObjectCarousel pOC )
563 {
564  pFileGroupList_t pFGL;
565  dsmAssert(( pOC != NULL ));
566  dsmAssert(( pOC->root.status == RCS_LOADED ));
567  pFGL = pOC->pFileGroupList;
568  if (pFGL && pFGL->fgTotal != 0 && idp->setup.notifyCarouselLoadEventFunc != NULL)
569  {
570  idp->setup.notifyCarouselLoadEventFunc((H_DsmCarousel)pOC, OC_FILE_GROUP_LIST_LOADED, pOC->root.rcid);
571  }
572 
573 }
574 
575 E_DscError DSC_ObjCrslParseSrgInfo( P_DsmCoreInst idp, P_ObjectCarousel pOC,
576  U8BIT *pDsiPrivate, U16BIT dsiPrivateLen )
577 {
578  E_DscError err = CLDSM_OK;
579  U8BIT *pData;
580  U32BIT iorTypeId;
581  S_ObjectLocation srgLocation;
582  S_DeliveryParaTap srgTap;
583  U16BIT srgUsedLen;
584 
585  dsmAssert((pDsiPrivate != NULL));
586 
587  if (dsiPrivateLen < MIN_SRG_INFO_LEN)
588  {
589  ERRLOG(DD_OC, "DATA ERROR: SRG short len=%u", dsiPrivateLen )
590  }
591  else
592  {
593  pData = pDsiPrivate;
594  srgUsedLen = getIorInfoContig( pData, &iorTypeId, &srgLocation, &srgTap );
595  /* -- Check IOR type == SRG or DIR */
596  /* -- NK 16/10/01 - Default to allowing SRG or DIR since some
597  transmissions are known to use DIR */
598  if (srgUsedLen == 0 || (iorTypeId != SRG_STR && iorTypeId != DIR_STR))
599  {
600  ERRLOG(DD_OC, "DATA ERROR: Invalid IOR data for DSI, len=%u typ=%x", srgUsedLen, iorTypeId )
601  }
602  else if (srgLocation.carouselId != pOC->root.rcid)
603  {
604  ERRLOG(DD_OC, "DATA ERROR: srgLocation.carouselId=%d tid=%d", srgLocation.carouselId, pOC->root.rcid )
605  }
606  else
607  {
608  U16BIT srgUserInfoLen;
609 
610  dsmDP3(("INFO: srgLocation.carouselId=%d\n", srgLocation.carouselId));
611  pData += srgUsedLen;
612  pData = SkipTaps( pData );
613  pData = SkipServiceContexts( pData );
614 
615  READ_UINT16( pData, srgUserInfoLen );
616  if (pData + srgUserInfoLen != pDsiPrivate + dsiPrivateLen)
617  {
618  dsmDP2(("DATA ERROR: DSI srg Info length error: %u - %u != %u\n",
619  dsiPrivateLen, pData - pDsiPrivate, srgUserInfoLen));
620  }
621  else
622  {
623  dsmDP3(("INFO: pOC = 0x%p idp->pBootingCarousel = 0x%p\n", pOC, idp->pBootingCarousel));
624  if (idp->pBootingCarousel == &(pOC->root))
625  {
626  /* -- DSI is for booting carousel */
627  idp->pBootingCarousel = NULL;
628  }
629  ocUpdateSrgUserInfo( idp, pOC, pData, srgUserInfoLen );
630 
631  err = lmUpdateCarouselSRGInfo( idp, pOC, &srgTap, &srgLocation );
632  }
633  }
634  }
635  return err;
636 }
637 
638 
639 E_DscError DSC_ObjCrslUnloadObjects( P_DsmCoreInst idp, P_ObjectCarousel pOC, E_DsmRstMode mode )
640 {
641  P_DsmObject pDsmObject;
642  E_DscError err = CLDSM_OK;
643 
644  /* -- Any active object loads will still be in the current object list
645  -- so check if there is anything in it */
646  pDsmObject = LLHead( pOC->llcCurrObjects );
647  while ( pDsmObject )
648  {
649  if (pDsmObject->objectDataSeq)
650  {
651  /* object is open - close it */
652  err = CDSM_CloseObject( idp, (H_DsmObject)pDsmObject );
653  if (err != CLDSM_OK) break;
654  }
655  err = CDSM_UnloadObject( idp, (H_DsmObject)pDsmObject, mode );
656  if (err != CLDSM_OK) break;
657  pDsmObject = LLHead( pOC->llcCurrObjects );
658  }
659  return err;
660 }
661 
662 BOOLEAN DSC_ObjCrslSrgObjectLoaded( P_ObjectCarousel pOC )
663 {
664  dsmAssert((pOC->srgObjectInfo.objectKind != DIR_STR));
665  return (pOC->srgObjectInfo.objectKind == SRG_STR && DSC_ObjCrslSrgModule(pOC))? TRUE : FALSE;
666 }
667 
668 P_Module DSC_ObjCrslSrgModule( P_ObjectCarousel pOC )
669 {
670  P_DataCarousel pDC;
671  pDC = DSC_RootCrslFirstDataCarousel( &pOC->root );
672  return (pDC)? DSC_DataCrslFirstModule( pDC ) : NULL;
673 }
674 
675 void DSC_ObjCrslSrgObjectReset( P_ObjectCarousel pOC )
676 {
677  dsmAssert((pOC->root.magic == OC_MAGIC));
678  pOC->srgObjectInfo.objectKind = 0;
679 }
680 
General include file for clDsm library internal definitions.
Header to the loadMgr module.
Header to the cacheMgr module.
E_DscError CDSM_UnloadObject(H_DsmCoreInst instance, H_DsmObject clDsmObjectHandle, E_DsmRstMode mode)
Unload (or cancel the requested load of) a DSM-CC object The client MUST first close and/or unsubscri...
Header to the object module - functions/methods accessing data of object messages inside modules...
Header to the 'module' module - Functions/methods for creating/destroying and managing attributes of ...