Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Data Structures | Macros | Typedefs | Functions
EmbStorage.h File Reference

EMBB Storage API. More...

#include "EmbProcessor.h"
#include "EmbItem.h"
#include <time.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  XPCA_Package
 The following structure defines the characteristics of a package. More...
 
struct  XPCA_Content
 An XPCA_Content type describes the status of a protected content with regard to the license associated with it. More...
 
struct  XPCA_PackageContentArray
 This is a variable-size array of XPCA_Content data. More...
 
struct  XPCA_UintArray
 This is a variable-size array of uint32_t data which are package ids returned by relevant EPD storage queries. More...
 

Macros

#define INVALID_EPD_STORAGE   (void *)NULL
 Invalid value for the EPD_Storage opaque type. More...
 
#define MIN_XPCA_PACKAGE_TYPE   1
 
#define MAX_XPCA_PACKAGE_TYPE   15
 
#define ANY_XPCA_PACKAGE_TYPE   0
 
#define MIN_XPCA_PACKAGE_ACCESS   1
 
#define MAX_XPCA_PACKAGE_ACCESS   15
 
#define ANY_XPCA_PACKAGE_ACCESS   0
 
#define XPCA_CONTENT_STATUS_IS_IN_EPD(status)   (((status) & 0x01) == 0x01)
 XPCA_Content status is a bitmask field, more than one bit can be set. More...
 
#define XPCA_CONTENT_STATUS_IS_IN_EPL(status)   (((status) & 0x02) == 0x02)
 
#define XPCA_CONTENT_STATUS_CHECK_ERROR(status)   (((status) & 0x80) == 0x80)
 
#define EPD_INFINITE_TIME   ((time_t)(-1))
 The value of an infinite duration for a package. More...
 

Typedefs

typedef struct EMB_Storage EMB_Storage
 An EMB_Storage object represents information about EMB object storage. More...
 
typedef void * EPD_Storage
 Entitlement Package Description (EPD) specific operations. More...
 
typedef int XPCA_package_type_t
 Type of package. More...
 
typedef int XPCA_package_access_t
 Accessibility of a package. More...
 

Functions

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. More...
 
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). More...
 
EMB_EXPORT EMB_Result EMB_Storage_FindItemsTargetAtGroup (EMB_Storage *storage, EMB_ItemType item_type, EMB_ByteArray group_id, SHI_Data **items)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EMB_EXPORT EMB_Result EMB_Storage_Close (EMB_Storage *storage)
 Closes the EMBB storage and releases the specified EMB_Storage object referring to it. More...
 
EMB_EXPORT EMB_Result EMB_Storage_Wipe ()
 Wipes the EMBB and license storage by deleting the underlying database. More...
 
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. More...
 
EMB_EXPORT EMB_Result EMB_Storage_ReleaseEntitlementStorage (EMB_Storage *storage, EPD_Storage epds)
 Release the handle to the EPD_storage database. More...
 
EMB_EXPORT EMB_Result EMB_Storage_CleanupEntitlementStorage (EMB_Storage *storage, time_t expirationDate)
 Remove from the EMBB storage EPD entries that have expired. More...
 
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 id. More...
 
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) lcid and whose access and type match the input criteria access and type. More...
 
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 and type. More...
 
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_ContentAccess of all the content ids associated with the package corresponding to a given package id. More...
 
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. More...
 
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_Storage_GetPackagesForContent. More...
 
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_GetContentForPackage. More...
 

Detailed Description

EMBB Storage API.