Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
Macros | Typedefs | Functions
WsbLicenseStore.h File Reference

Wasabi License Store API. More...

#include "ShiData.h"
#include "WsbTypes.h"

Go to the source code of this file.

Macros

#define WSB_ERROR_LS_PARSE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 0)
 
#define WSB_ERROR_LS_CREATE_DIR   (WSB_ERROR_BASE_LICENSE_STORE - 1)
 
#define WSB_ERROR_LS_OPEN_DB   (WSB_ERROR_BASE_LICENSE_STORE - 2)
 
#define WSB_ERROR_LS_CREATE_TABLES   (WSB_ERROR_BASE_LICENSE_STORE - 3)
 
#define WSB_ERROR_LS_ADD_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 4)
 
#define WSB_ERROR_LS_DUPLICATE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 5)
 
#define WSB_ERROR_LS_REMOVE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 6)
 
#define WSB_ERROR_LS_FAIL_LOOKUP   (WSB_ERROR_BASE_LICENSE_STORE - 7)
 
#define WSB_ERROR_LS_NO_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 8)
 
#define WSB_ERROR_LS_OWNING_THREAD   (WSB_ERROR_BASE_LICENSE_STORE - 9)
 
#define WSB_ERROR_LS_NO_CID   (WSB_ERROR_BASE_LICENSE_STORE - 10)
 
#define WSB_ERROR_LS_CLOSE_DB   (WSB_ERROR_BASE_LICENSE_STORE - 11)
 
#define WSB_ERROR_LS_VACUUM   (WSB_ERROR_BASE_LICENSE_STORE - 12)
 
#define WSB_TYPE_ID_LICENSE   1000
 Type ID for a license object. More...
 
#define WSB_LS_FLAG_LICENSE_DATA   0x01
 Values for the 'flags' argument of WSB_LicenseStore_EnumerateLicenses() method. More...
 
#define WSB_LS_FLAG_LICENSE_EXPIRE_DATE   0x02
 License expiration date. More...
 
#define WSB_LS_FLAG_LICENSE_INSERT_DATE   0x04
 License insertion date. More...
 
#define WSB_LS_FLAG_LICENSE_TAG   0x08
 License tag. More...
 

Typedefs

typedef struct WSB_License WSB_License
 A WSB_License object represents information about a license. More...
 
typedef struct WSB_LicenseStore WSB_LicenseStore
 A WSB_LicenseStore object is used to access the Wasabi License Store in which licenses may be stored. More...
 

Functions

WSB_EXPORT WSB_UInt32 WSB_License_GetId (const WSB_License *license)
 Gets the license ID for a specified license. More...
 
WSB_EXPORT WSB_ByteArray WSB_License_GetData (const WSB_License *license)
 Gets the license data (the bytes representing the license) for a specified license. More...
 
WSB_EXPORT WSB_Int32 WSB_License_GetExpirationDate (const WSB_License *license)
 Gets the license expiration date for a specified license. More...
 
WSB_EXPORT WSB_Int32 WSB_License_GetPriority (const WSB_License *license)
 Gets the license priority for a specified license. More...
 
WSB_EXPORT WSB_Int32 WSB_License_GetInsertionDate (const WSB_License *license)
 Gets the license insertion date (the date it was inserted into the License Store) for a specified license. More...
 
WSB_EXPORT const char * WSB_License_GetTag (const WSB_License *license)
 Gets the license tag for a specified license. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_Open (WSB_LicenseStore **store)
 Opens the License Store and creates a new WSB_LicenseStore object to refer to it. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_AddLicense (WSB_LicenseStore *store, const void *data, WSB_Size data_size, const char *tag, WSB_UInt32 *lid)
 Adds a license into the License Store. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_FindLicensesByContentIds (WSB_LicenseStore *store, const char **cids, WSB_Cardinal id_count, SHI_Data **licenses)
 Finds in the License Store the license(s) with specified content ID(s). More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_FindContentIdsByLicense (WSB_LicenseStore *store, WSB_UInt32 lid, SHI_Data **cids)
 Finds in the License Store the content ID(s) governed by the license with the specified license ID. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_GetLicenseById (WSB_LicenseStore *store, WSB_UInt32 lid, SHI_Data **license)
 Obtains from the License Store the license with a specified license ID. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_EnumerateLicenses (WSB_LicenseStore *store, WSB_Flags flags, SHI_Data **licenses)
 Obtains from the License Store all licenses. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_EnumerateContentIds (WSB_LicenseStore *store, SHI_Data **cids)
 Obtains from the License Store all content IDs governed by the licenses in the License Store. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_ExpungeExpiredLicenses (WSB_LicenseStore *store)
 Expunges from the License Store all the expired licenses and vacuums the database. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_RemoveLicense (WSB_LicenseStore *store, WSB_UInt32 lid)
 Removes from the License Store the license with a specified license ID. More...
 
WSB_EXPORT WSB_Result WSB_LicenseStore_Close (WSB_LicenseStore *store)
 Closes the License Store and releases the specified WSB_LicenseStore object referring to it. More...
 

Detailed Description

Wasabi License Store API.

Macro Definition Documentation

◆ WSB_ERROR_LS_ADD_LICENSE

#define WSB_ERROR_LS_ADD_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 4)

◆ WSB_ERROR_LS_CLOSE_DB

#define WSB_ERROR_LS_CLOSE_DB   (WSB_ERROR_BASE_LICENSE_STORE - 11)

◆ WSB_ERROR_LS_CREATE_DIR

#define WSB_ERROR_LS_CREATE_DIR   (WSB_ERROR_BASE_LICENSE_STORE - 1)

◆ WSB_ERROR_LS_CREATE_TABLES

#define WSB_ERROR_LS_CREATE_TABLES   (WSB_ERROR_BASE_LICENSE_STORE - 3)

◆ WSB_ERROR_LS_DUPLICATE_LICENSE

#define WSB_ERROR_LS_DUPLICATE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 5)

◆ WSB_ERROR_LS_FAIL_LOOKUP

#define WSB_ERROR_LS_FAIL_LOOKUP   (WSB_ERROR_BASE_LICENSE_STORE - 7)

◆ WSB_ERROR_LS_NO_CID

#define WSB_ERROR_LS_NO_CID   (WSB_ERROR_BASE_LICENSE_STORE - 10)

◆ WSB_ERROR_LS_NO_LICENSE

#define WSB_ERROR_LS_NO_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 8)

◆ WSB_ERROR_LS_OPEN_DB

#define WSB_ERROR_LS_OPEN_DB   (WSB_ERROR_BASE_LICENSE_STORE - 2)

◆ WSB_ERROR_LS_OWNING_THREAD

#define WSB_ERROR_LS_OWNING_THREAD   (WSB_ERROR_BASE_LICENSE_STORE - 9)

◆ WSB_ERROR_LS_PARSE_LICENSE

#define WSB_ERROR_LS_PARSE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 0)

◆ WSB_ERROR_LS_REMOVE_LICENSE

#define WSB_ERROR_LS_REMOVE_LICENSE   (WSB_ERROR_BASE_LICENSE_STORE - 6)

◆ WSB_ERROR_LS_VACUUM

#define WSB_ERROR_LS_VACUUM   (WSB_ERROR_BASE_LICENSE_STORE - 12)

◆ WSB_LS_FLAG_LICENSE_DATA

#define WSB_LS_FLAG_LICENSE_DATA   0x01

Values for the 'flags' argument of WSB_LicenseStore_EnumerateLicenses() method.

License data

◆ WSB_LS_FLAG_LICENSE_EXPIRE_DATE

#define WSB_LS_FLAG_LICENSE_EXPIRE_DATE   0x02

License expiration date.

◆ WSB_LS_FLAG_LICENSE_INSERT_DATE

#define WSB_LS_FLAG_LICENSE_INSERT_DATE   0x04

License insertion date.

◆ WSB_LS_FLAG_LICENSE_TAG

#define WSB_LS_FLAG_LICENSE_TAG   0x08

License tag.

◆ WSB_TYPE_ID_LICENSE

#define WSB_TYPE_ID_LICENSE   1000

Type ID for a license object.

This is used to distinguish the data type for a license in a SHI_Data object.