Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
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_ */
#define SHI_PUBLIC_API
Definition: ShiTypes.h:52
SHI_ContentKeyFormat
Format indenfifier for content keys.
Definition: ShiLicense.h:73
Definition: ShiLicense.h:74
Actions.
Result codes.
SHI_PUBLIC_API SHI_Result SHI_License_Describe(SHI_License *self, SHI_LicenseInfo **description)
Gets a description for this license.
SHI_UInt32 SHI_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: ShiTypes.h:95
SHI_PUBLIC_API SHI_Result SHI_License_SetContentIds(SHI_License *self, const char *const *ids, SHI_Cardinal id_count)
Specifies a set of content IDs for this license.
struct SHI_Action SHI_Action
A SHI_Action object represents an action that can be performed on the content item represented by a l...
Definition: ShiAction.h:575
Definition: ShiLicense.h:75
SHI_PUBLIC_API SHI_Result SHI_License_CreateAction(SHI_License *self, const char *name, const void *parameters, SHI_Action **action)
Creates a SHI_Action object for this license.
Crypto Support.
SHI_PUBLIC_API SHI_Result SHI_License_Destroy(SHI_License *self)
Destroys this license object.
Definition: ShiLicense.h:76
License Info.
SHI_UInt32 SHI_Cardinal
An unsigned integer used to represent a quantity that can be counted (such as a number of elements in...
Definition: ShiTypes.h:112
SHI_PUBLIC_API SHI_Result SHI_License_ProcessLicenseData(SHI_License *self, const void *data, SHI_Size size)
Registers a license data element that contains Octopus data for this license.
struct SHI_LicenseInfo SHI_LicenseInfo
A SHI_LicenseInfo object represents the information for a license or for an action of a license (such...
Definition: ShiLicenseInfo.h:59
SHI_UInt32 SHI_InterfaceId
Definition: ShiInterfaces.h:33
SHI_PUBLIC_API SHI_Result SHI_License_CreateActionEx(SHI_License *self, const char *name, const void *parameters, SHI_Size parameters_size, SHI_Action **action)
This function is similar to SHI_License_CreateAction, but can be used for arbitrary actions...
struct SHI_Data SHI_Data
A SHI_Data object represents a typed data object.
Definition: EmbProcessor.h:231
Generic Lists.
Common data types.
Attributes.
SHI_PUBLIC_API SHI_Result SHI_License_GetContentKey(SHI_License *self, const char *content_id, SHI_ContentKeyFormat format, const void *format_parameters, SHI_Data **data)
Gets the content key for a specific content ID.
int SHI_Result
Signed integer value representing a function or method result (return value).
Definition: ShiTypes.h:74
SHI_PUBLIC_API void * SHI_License_GetInterface(SHI_License *self, SHI_InterfaceId iface_id)
Obtains a pointer to a SHI_License object with a different interface.
struct SHI_License SHI_License
A SHI_License object represents the license information for a piece of content.
Definition: ShiLicense.h:68
Generic Data Objects.