21 #ifndef _WSB_LICENSE_STORE_H_ 22 #define _WSB_LICENSE_STORE_H_ 33 #define WSB_ERROR_LS_PARSE_LICENSE (WSB_ERROR_BASE_LICENSE_STORE - 0) 34 #define WSB_ERROR_LS_CREATE_DIR (WSB_ERROR_BASE_LICENSE_STORE - 1) 35 #define WSB_ERROR_LS_OPEN_DB (WSB_ERROR_BASE_LICENSE_STORE - 2) 36 #define WSB_ERROR_LS_CREATE_TABLES (WSB_ERROR_BASE_LICENSE_STORE - 3) 37 #define WSB_ERROR_LS_ADD_LICENSE (WSB_ERROR_BASE_LICENSE_STORE - 4) 38 #define WSB_ERROR_LS_DUPLICATE_LICENSE (WSB_ERROR_BASE_LICENSE_STORE - 5) 39 #define WSB_ERROR_LS_REMOVE_LICENSE (WSB_ERROR_BASE_LICENSE_STORE - 6) 40 #define WSB_ERROR_LS_FAIL_LOOKUP (WSB_ERROR_BASE_LICENSE_STORE - 7) 41 #define WSB_ERROR_LS_NO_LICENSE (WSB_ERROR_BASE_LICENSE_STORE - 8) 42 #define WSB_ERROR_LS_OWNING_THREAD (WSB_ERROR_BASE_LICENSE_STORE - 9) 43 #define WSB_ERROR_LS_NO_CID (WSB_ERROR_BASE_LICENSE_STORE - 10) 44 #define WSB_ERROR_LS_CLOSE_DB (WSB_ERROR_BASE_LICENSE_STORE - 11) 45 #define WSB_ERROR_LS_VACUUM (WSB_ERROR_BASE_LICENSE_STORE - 12) 54 #define WSB_TYPE_ID_LICENSE 1000 61 #define WSB_LS_FLAG_LICENSE_DATA 0x01 63 #define WSB_LS_FLAG_LICENSE_EXPIRE_DATE 0x02 65 #define WSB_LS_FLAG_LICENSE_INSERT_DATE 0x04 67 #define WSB_LS_FLAG_LICENSE_TAG 0x08 72 #if defined(__cplusplus) 170 WSB_EXPORT
const char*
395 #if defined(__cplusplus) 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.
struct WSB_LicenseStore WSB_LicenseStore
A WSB_LicenseStore object is used to access the Wasabi License Store in which licenses may be stored...
Definition: WsbLicenseStore.h:184
WSB_EXPORT WSB_Result WSB_LicenseStore_Close(WSB_LicenseStore *store)
Closes the License Store and releases the specified WSB_LicenseStore object referring to it...
WSB_EXPORT WSB_Result WSB_LicenseStore_EnumerateLicenses(WSB_LicenseStore *store, WSB_Flags flags, SHI_Data **licenses)
Obtains from the License Store all licenses.
An untyped array of bytes.
Definition: WsbTypes.h:178
WSB_EXPORT WSB_Result WSB_LicenseStore_ExpungeExpiredLicenses(WSB_LicenseStore *store)
Expunges from the License Store all the expired licenses and vacuums the database.
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...
WSB_UInt32 WSB_Flags
Type used to represent a bit pattern signifying a combination of flags that can be on or off...
Definition: WsbTypes.h:93
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.
WSB_EXPORT WSB_Int32 WSB_License_GetExpirationDate(const WSB_License *license)
Gets the license expiration date for a specified license.
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. ...
struct WSB_License WSB_License
A WSB_License object represents information about a license.
Definition: WsbLicenseStore.h:84
WSB_EXPORT WSB_Int32 WSB_License_GetPriority(const WSB_License *license)
Gets the license priority for a specified license.
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...
WSB_EXPORT WSB_ByteArray WSB_License_GetData(const WSB_License *license)
Gets the license data (the bytes representing the license) for a specified license.
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 lic...
WSB_UInt32 WSB_Cardinal
An unsigned integer used to represent a quantity that can be counted (such as a number of elements in...
Definition: WsbTypes.h:121
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
WSB_EXPORT WSB_UInt32 WSB_License_GetId(const WSB_License *license)
Gets the license ID for a specified license.
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
WSB_EXPORT const char * WSB_License_GetTag(const WSB_License *license)
Gets the license tag for a specified license.
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.
struct SHI_Data SHI_Data
A SHI_Data object represents a typed data object.
Definition: ShiData.h:116
signed int WSB_Int32
32-bit (or more) signed integer
Definition: WsbTypes.h:37
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).
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104