Wasabi ExpressPlay SDK for Embedded Systems  1.10
ShiLicense.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Sushi - License
4 |
5 | $Id: ShiLicense.h 7930 2014-06-25 11:05:10Z jebaseelir $
6 | Original author: Gilles Boccon-Gibod
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) 2005-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _SHI_LICENSE_H_
22 #define _SHI_LICENSE_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "ShiResults.h"
28 #include "ShiTypes.h"
29 #include "ShiList.h"
30 #include "ShiData.h"
31 #include "ShiAction.h"
32 #include "ShiAttributes.h"
33 #include "ShiLicenseInfo.h"
34 #include "ShiCrypto.h"
35 
36 /*----------------------------------------------------------------------
37 | constants
38 +---------------------------------------------------------------------*/
39 #define SHI_ERROR_LICENSE_IDS_ALREADY_SET (SHI_ERROR_BASE_API_LICENSE - 0)
40 #define SHI_ERROR_LICENSE_ID_NOT_FOUND (SHI_ERROR_BASE_API_LICENSE - 1)
41 #define SHI_ERROR_LICENSE_INVALID_DATA (SHI_ERROR_BASE_API_LICENSE - 2)
42 #define SHI_ERROR_LICENSE_ACTION_PENDING (SHI_ERROR_BASE_API_LICENSE - 3)
43 #define SHI_ERROR_LICENSE_MUST_PERFORM (SHI_ERROR_BASE_API_LICENSE - 4)
44 #define SHI_ERROR_LICENSE_INCOMPLETE_DATA (SHI_ERROR_BASE_API_LICENSE - 5)
45 #define SHI_ERROR_LICENSE_NO_SUCH_ACTION (SHI_ERROR_BASE_API_LICENSE - 6)
46 #define SHI_ERROR_LICENSE_ACCEPT_FAILED (SHI_ERROR_BASE_API_LICENSE - 7)
47 #define SHI_ERROR_LICENSE_CALLBACK_NOT_FOUND (SHI_ERROR_BASE_API_LICENSE - 8)
48 #define SHI_ERROR_LICENSE_CALLBACK_FAILED (SHI_ERROR_BASE_API_LICENSE - 9)
49 #define SHI_ERROR_LICENSE_MUST_ACCEPT (SHI_ERROR_BASE_API_LICENSE - 10)
50 #define SHI_ERROR_LICENSE_PARSE_FAILURE (SHI_ERROR_BASE_API_LICENSE - 11)
51 
52 /*----------------------------------------------------------------------
53 | interfaces
54 +---------------------------------------------------------------------*/
55 #if defined(__cplusplus)
56 extern "C" {
57 #endif
58 
68 typedef struct SHI_License SHI_License;
69 
73 typedef enum {
74  SHI_CONTENT_KEY_FORMAT_CLEARTEXT, /* no parameters */
75  SHI_CONTENT_KEY_FORMAT_SKB_STANDARD, /* SKB_EXPORT_TARGET_CROSS_ENGINE, no parameters */
76  SHI_CONTENT_KEY_FORMAT_SKB_CUSTOM /* SKB_EXPORT_TARGET_CUSTOM, parameters is a pointer to an SKB_ExportCustomParameters structure. */
78 
90 void*
92 
102 SHI_Result
104 
118 SHI_Result
119 SHI_License_Describe(SHI_License* self, SHI_LicenseInfo** description);
120 
130 SHI_Result
132  const void* data,
133  SHI_Size size);
134 
156  const char* const* ids,
157  SHI_Cardinal id_count);
158 
181  const char* content_id,
182  SHI_ContentKeyFormat format,
183  const void* format_parameters,
184  SHI_Data** data);
185 
222 SHI_Result
224  const char* name,
225  const void* parameters,
226  SHI_Action** action);
227 
249 SHI_Result
251  const char* name,
252  const void* parameters,
253  SHI_Size parameters_size,
254  SHI_Action** action);
255 
257 #if defined(__cplusplus)
258 }
259 #endif
260 
261 #endif /* _SHI_LICENSE_H_ */