Wasabi ExpressPlay SDK for iOS  1.10
WsbLicenseStore.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - License Store API
4 |
5 | $Id: WsbLicenseStore.h 10793 2014-06-25 12:46:08Z jebaseelir $
6 | Original author: John Hwa
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2009-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_LICENSE_STORE_H_
22 #define _WSB_LICENSE_STORE_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "ShiData.h"
28 #include "WsbTypes.h"
29 
30 /*----------------------------------------------------------------------
31 | result codes
32 +---------------------------------------------------------------------*/
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)
46 
47 /*----------------------------------------------------------------------
48 | constants
49 +---------------------------------------------------------------------*/
54 #define WSB_TYPE_ID_LICENSE 1000
55 
61 #define WSB_LS_FLAG_LICENSE_DATA 0x01
62 
63 #define WSB_LS_FLAG_LICENSE_EXPIRE_DATE 0x02
64 
65 #define WSB_LS_FLAG_LICENSE_INSERT_DATE 0x04
66 
67 #define WSB_LS_FLAG_LICENSE_TAG 0x08
68 
69 /*----------------------------------------------------------------------
70 | interfaces
71 +---------------------------------------------------------------------*/
72 #if defined(__cplusplus)
73 extern "C" {
74 #endif
75 
84 typedef struct WSB_License WSB_License;
85 
95 WSB_EXPORT WSB_UInt32
96 WSB_License_GetId(const WSB_License* license);
97 
112 WSB_EXPORT WSB_ByteArray
113 WSB_License_GetData(const WSB_License* license);
114 
128 WSB_EXPORT WSB_Int32
130 
140 WSB_EXPORT WSB_Int32
141 WSB_License_GetPriority(const WSB_License* license);
142 
155 WSB_EXPORT WSB_Int32
157 
170 WSB_EXPORT const char*
171 WSB_License_GetTag(const WSB_License* license);
172 
185 
198 WSB_EXPORT WSB_Result
200 
216 WSB_EXPORT WSB_Result
218  const void* data,
219  WSB_Size data_size,
220  const char* tag,
221  WSB_UInt32* lid);
222 
251 WSB_EXPORT WSB_Result
253  const char** cids,
254  WSB_Cardinal id_count,
255  SHI_Data** licenses);
256 
278 WSB_EXPORT WSB_Result
280  WSB_UInt32 lid,
281  SHI_Data** cids);
282 
302 WSB_EXPORT WSB_Result
304  WSB_UInt32 lid,
305  SHI_Data** license);
306 
334 WSB_EXPORT WSB_Result
336  WSB_Flags flags,
337  SHI_Data** licenses);
338 
358 WSB_EXPORT WSB_Result
360  SHI_Data** cids);
361 
370 WSB_EXPORT WSB_Result
372 
380 WSB_EXPORT WSB_Result
382  WSB_UInt32 lid);
383 
390 WSB_EXPORT WSB_Result
392 
395 #if defined(__cplusplus)
396 }
397 #endif
398 
399 #endif /* _WSB_LICENSE_STORE_H_ */
400