DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
dsm_types.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2014 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _DSM_TYPES_H
26 #define _DSM_TYPES_H
27 
28 #include "dvblocator.h"
29 
30 #define INVALID_CAROUSEL_ID 0xFFFFFFFF
31 #define UNKNOWN_CAROUSEL_ID 0xFFFFFFFE
32 
33 /* For compilation backward compatability, define OC_LOAD_FILE_GROUP_CHANGE */
34 #define OC_LOAD_FILE_GROUP_CHANGE OC_FILE_GROUP_LIST_CHANGE
35 
36 /* Enum used to specify type of behaviour in unload type operation.
37  * The unload operation (normally on carousel) can cause any pending
38  * object load requests to either:
39  * 1. forced to abort, or
40  * 2. kept pending until a new carousel is loaded.
41  * This enum is used in relevant API functions.
42  */
43 typedef enum
44 {
45  RST_MODE_FORCE,
46  RST_MODE_PENDING,
47 } E_DsmRstMode;
48 
49 /* Enum used to report Object Carousel load status */
50 typedef enum
51 {
52  /*0*/ OC_LOAD_UNINITIATED = 0,
53  /*1*/ OC_LOAD_IN_PROGRESS,
54  /*2*/ OC_LOAD_BOOTED,
55  /*3*/ OC_LOAD_COMPLETED,
56  /*4*/ OC_LOAD_ABORTED_TIMEOUT,
57  /*5*/ OC_LOAD_ABORTED_PATH_ERROR,
58  /*6*/ OC_LOAD_ABORTED_ERROR,
59  /*7*/ OC_LOAD_ABORTED_UNLOAD,
60  /*8*/ OC_FILE_GROUP_LIST_LOADED, /* Loaded carousel has file group items - signalled just before OC_LOAD_COMPLETED */
61  /*9*/ OC_FILE_GROUP_LIST_CHANGE, /* file group change includes added and/or deleted items */
62  /*10*/OC_FILE_GROUP_VERS_CHANGE /* only a version change on existing file group(s) */
63 } E_OCLoadStatus;
64 
65 /* Enum used to report System Software Update load status */
66 typedef enum
67 {
68  /* No recogised SSU download */
69  SSU_NOT_AVAILABLE,
70 
71  /* Recogised SSU download ready - about to start */
72  SSU_CRSL_READY,
73 
74  /* Starting to download a module */
75  SSU_LOAD_STARTING,
76 
77  /* Completed download of a module */
78  SSU_LOAD_COMPLETE,
79 
80  /* Aborted download of a module */
81  SSU_LOAD_ABORTED,
82 
83  /* Completed SSU download */
84  SSU_CRSL_DONE,
85 
86  /* Aborted SSU download */
87  SSU_CRSL_ABORT,
88 
89  /* Unloading SSU carousel */
90  SSU_CRSL_UNLOAD
91 } E_UCLoadStatus;
92 
93 typedef enum
94 {
95  MTYP_EXECUTABLE,
96  MTYP_MEMORY_MAP,
97  MTYP_DATA_MODULE
98 } E_ModuleType;
99 
100 /* Carousel SRG User Info for File Groups - available once carousel is loaded
101  * - used by Australia/South Africa MHEG profile */
102 typedef struct
103 {
104  U16BIT owner_id;
105  U16BIT group_id;
106  U8BIT group_priority;
107  U8BIT use_flags;
108  U8BIT receiver_profile;
109  U8BIT group_version;
110  U8BIT *location;
112 
113 typedef struct s_SsuModelVersion
114 {
115  U16BIT hw_model;
116  U16BIT hw_version;
117  U16BIT sw_model;
118  U16BIT sw_version;
120 
121 typedef U32BIT H_DsmEvent;
122 typedef struct s_DsmCarousel *H_ObjCarousel;
123 typedef struct s_DsmCarousel *H_DsmCarousel;
124 typedef struct s_DsmControl *H_DsmControl;
125 typedef void* H_UsrRef;
126 typedef union
127 {
128  H_UsrRef ur;
129  U32BIT id;
130 } U_StatusRef;
131 
148 typedef void (*F_SsuStatus)( H_DsmCarousel hCarousel, E_UCLoadStatus status,
149  U_StatusRef sr, U32BIT data );
150 
159 typedef BOOLEAN (*F_SsuWanted)( U32BIT grp_id, U32BIT grp_size, S_SsuModelVersion *smv );
160 
170 typedef H_UsrRef (*F_SsuStartModule)( E_ModuleType mtyp, U8BIT *name );
171 
184 typedef BOOLEAN (*F_SsuWantModuleData)( H_UsrRef usrRef, U32BIT moduleRef,
185  U32BIT offset, U32BIT size, U32BIT crc );
186 
198 typedef void (*F_SsuSaveModuleData)( H_UsrRef usrRef, U32BIT moduleRef,
199  U32BIT offset, U32BIT size, U8BIT *data );
200 
201 /* Convenient struct to hold SSU callbacks */
202 typedef struct s_SsuConfig
203 {
204  F_SsuStatus status;
205  F_SsuWanted wanted;
206  F_SsuStartModule startModule;
207  F_SsuWantModuleData wantModuleData;
208  F_SsuSaveModuleData saveModuleData;
209 } S_SsuConfig;
210 
211 
212 #endif /*_DSM_TYPES_H*/
void(* F_SsuSaveModuleData)(H_UsrRef usrRef, U32BIT moduleRef, U32BIT offset, U32BIT size, U8BIT *data)
SSU callback function supplied by client - called when download of a module has completed. The data will remain in memory after returning from this funcrtion and until the client calls DSMCC_SsuUnloadModule.
Definition: dsm_types.h:198
BOOLEAN(* F_SsuWantModuleData)(H_UsrRef usrRef, U32BIT moduleRef, U32BIT offset, U32BIT size, U32BIT crc)
SSU callback function supplied by client which DSM-CC calls to check whether client requires this mod...
Definition: dsm_types.h:184
Define DVB Location structures.
void(* F_SsuStatus)(H_DsmCarousel hCarousel, E_UCLoadStatus status, U_StatusRef sr, U32BIT data)
SSU callback to inform client of status.
Definition: dsm_types.h:148
H_UsrRef(* F_SsuStartModule)(E_ModuleType mtyp, U8BIT *name)
SSU callback to ask client whether if client wants to download data connected to this module...
Definition: dsm_types.h:170
BOOLEAN(* F_SsuWanted)(U32BIT grp_id, U32BIT grp_size, S_SsuModelVersion *smv)
SSU callback to ask client whether the download details matches the product and is a valid/required s...
Definition: dsm_types.h:159