21 #ifndef _EMB_STORAGE_H_ 22 #define _EMB_STORAGE_H_ 47 #if defined(__cplusplus) 259 #define INVALID_EPD_STORAGE (void *)NULL 330 #define MIN_XPCA_PACKAGE_TYPE 1 331 #define MAX_XPCA_PACKAGE_TYPE 15 332 #define ANY_XPCA_PACKAGE_TYPE 0 341 #define MIN_XPCA_PACKAGE_ACCESS 1 342 #define MAX_XPCA_PACKAGE_ACCESS 15 343 #define ANY_XPCA_PACKAGE_ACCESS 0 368 #define XPCA_CONTENT_STATUS_IS_IN_EPD(status) (((status) & 0x01) == 0x01) 369 #define XPCA_CONTENT_STATUS_IS_IN_EPL(status) (((status) & 0x02) == 0x02) 370 #define XPCA_CONTENT_STATUS_CHECK_ERROR(status) (((status) & 0x80) == 0x80) 422 #define EPD_INFINITE_TIME ((time_t)(-1)) 554 #if defined(__cplusplus) EMB_EXPORT EMB_Result EMB_Storage_Wipe()
Wipes the EMBB and license storage by deleting the underlying database.
EMB_EXPORT EMB_Result EPD_Storage_GetContentForPackage(EPD_Storage epds, uint32_t id, XPCA_PackageContentArray **array)
This API searches the EPD_Storage and the EMB_Storage for the content access definition XPCA_ContentA...
time_t startDate
UTC time, always valid.
Definition: EmbStorage.h:351
int lcidSize
Size of the variable-length array.
Definition: EmbStorage.h:355
This is a variable-size array of XPCA_Content data.
Definition: EmbStorage.h:402
#define EMB_CONTENT_ID_HASH_LENGTH
Definition: EmbProcessor.h:38
uint32_t id
Package id.
Definition: EmbStorage.h:349
int32_t eplGroupId
Group id from the EPL, -1 if contentID is missing in the EPL or it is not associated with a group...
Definition: EmbStorage.h:394
uint32_t size
Size of the variable-length array.
Definition: EmbStorage.h:415
EMB_EXPORT EMB_Result EMB_Storage_ReleaseEntitlementStorage(EMB_Storage *storage, EPD_Storage epds)
Release the handle to the EPD_storage database.
EMB (Extended Marlin Broadcast) Processor API.
EMB_EXPORT EMB_Result EMB_Storage_CleanupEntitlementStorage(EMB_Storage *storage, time_t expirationDate)
Remove from the EMBB storage EPD entries that have expired.
XPCA_package_type_t type
Type of package.
Definition: EmbStorage.h:353
EMB_EXPORT EMB_Result EMB_Storage_RemoveItemsByIds(EMB_Storage *storage, EMB_ItemType item_type, EMB_UInt32 id_count, EMB_ByteArray **ids)
Removes the list of the items specified in the EMB_ByteArray from the EMBB Storage.
void * EPD_Storage
Entitlement Package Description (EPD) specific operations.
Definition: EmbStorage.h:254
EMB_EXPORT EMB_Result EMB_Storage_FindItemsByIds(EMB_Storage *storage, EMB_ItemType item_type, EMB_UInt32 id_count, EMB_ByteArray **ids, EMB_Bool hash_content_ids, SHI_Data **items)
Finds in the EMBB Storage the items that contain the specified id(s).
EMB_EXPORT EMB_Result EPD_Storage_ReleaseUintArray(EPD_Storage epds, XPCA_UintArray *array)
Release a XPCA_UintArray result set returned by a successful call to EPD_Storage_GetPackages or EPD_S...
EMB_EXPORT EMB_Result EPD_Storage_GetPackages(EPD_Storage epds, XPCA_package_type_t type, XPCA_package_access_t access, XPCA_UintArray **array)
This API searches the EPD_Storage for packages whose access and type match the input criteria access ...
uint32_t status
Bitmask, use XPCA_CONTENT_STATUS_IS_IN_xxx to access the bitmask.
Definition: EmbStorage.h:393
EMB_EXPORT EMB_Result EMB_Storage_ExpungeExpiredItems(EMB_Storage *storage, EMB_ItemType item_type)
Expunges all expired items of item type from the EMBB storage.
The following structure defines the characteristics of a package.
Definition: EmbStorage.h:348
int EMB_Result
Signed integer value representing a function or method result (return value).
Definition: EmbTypes.h:38
EMB_EXPORT EMB_Result EPD_Storage_ReleasePackageContentArray(EPD_Storage epds, XPCA_PackageContentArray *array)
Release a XPCA_PackageContentArray result set returned by a successful call to EPD_Storage_GetContent...
An XPCA_Content type describes the status of a protected content with regard to the license associate...
Definition: EmbStorage.h:391
int XPCA_package_access_t
Accessibility of a package.
Definition: EmbStorage.h:340
int32_t pkgGroupId
Group id from the package, -1 if contentID is missing in the EPL or it is not associated with a group...
Definition: EmbStorage.h:403
bool EMB_Bool
A boolean value which can be either true or false.
Definition: EmbTypes.h:79
EMB_EXPORT EMB_Result EPD_Storage_GetPackagesForContent(EPD_Storage epds, uint32_t lcid, XPCA_package_type_t type, XPCA_package_access_t access, XPCA_UintArray **array)
This API searches the EPD_Storage for packages including the entitlement item (logical content id) lc...
EMB_EXPORT EMB_Result EMB_Storage_GetEntitlementStorage(EMB_Storage *storage, EPD_Storage *epds)
Factory function to create an handle to access the EPD_Storage database.
XPCA_package_access_t access
Accessibility of the package.
Definition: EmbStorage.h:354
EMB_EXPORT EMB_Result EMB_Storage_Open(EMB_Storage **storage)
Opens the EMBB storage and creates a new EMB_Storage object to refer to it.
EMB_ItemType
EMBB item type.
Definition: EmbItem.h:53
EMB_EXPORT EMB_Result EMB_Storage_FindItemsTargetAtGroup(EMB_Storage *storage, EMB_ItemType item_type, EMB_ByteArray group_id, SHI_Data **items)
time_t endDate
UTC time, (-1) if unlimited.
Definition: EmbStorage.h:352
EMB_EXPORT EMB_Result EMB_Storage_Close(EMB_Storage *storage)
Closes the EMBB storage and releases the specified EMB_Storage object referring to it...
struct EMB_Storage EMB_Storage
An EMB_Storage object represents information about EMB object storage.
Definition: EmbStorage.h:42
uint32_t size
Size of the variable-length array.
Definition: EmbStorage.h:406
EMB_EXPORT EMB_Result EMB_Storage_GetItemByItemId(EMB_Storage *storage, EMB_ItemType item_type, EMB_UInt32 item_id, SHI_Data **item)
Finds the item in the EMBB Storage that contain the specified item_id.
int XPCA_package_type_t
Type of package.
Definition: EmbStorage.h:329
EMB_EXPORT EMB_Result EPD_Storage_GetPackageById(EPD_Storage epds, uint32_t id, XPCA_Package **package)
This API searches the EPD_Storage for a single package definition corresponding to the given package ...
This is a variable-size array of uint32_t data which are package ids returned by relevant EPD storage...
Definition: EmbStorage.h:414
struct SHI_Data SHI_Data
A SHI_Data object represents a typed data object.
Definition: EmbProcessor.h:231
unsigned int EMB_UInt32
An unsigned 32-bit integer.
Definition: EmbTypes.h:53
An array of bytes.
Definition: EmbProcessor.h:53
EMB_EXPORT EMB_Result EMB_Storage_RemoveItem(EMB_Storage *storage, EMB_ItemType item_type, EMB_UInt32 item_id)
Removes from the EMBB Storage the item with a specified item ID.
EMB_EXPORT EMB_Result EPD_Storage_ReleasePackage(EPD_Storage epds, XPCA_Package *package)
Release a XPCA_Package result set returned by a successful call to EPD_Storage_GetPackageById.
#define EMB_EXPORT
Definition: EmbConfig.h:25