Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
WsbRightsEnabler.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Rights Enabler API
4 |
5 | $Id: WsbRightsEnabler.h 10793 2014-06-25 12:46:08Z jebaseelir $
6 | Original author: Adam Miller
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_RIGHTS_ENABLER_H_
22 #define _WSB_RIGHTS_ENABLER_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 #include "ShiData.h"
29 #include "WsbMediaFile.h"
30 
31 /*----------------------------------------------------------------------
32 | prototypes
33 +---------------------------------------------------------------------*/
39 
40 #if defined(__cplusplus)
41 extern "C" {
42 #endif
43 
44 /*----------------------------------------------------------------------
45 | constants
46 +---------------------------------------------------------------------*/
50 #define WSB_RIGHTSENABLER_OPTION_FLAG_DISABLE_SLA 0x00000001
51 #define WSB_RIGHTSENABLER_OPTION_FLAG_DISABLE_LINK_RENEWAL 0x00000002
52 #define WSB_RIGHTSENABLER_OPTION_FLAG_DISABLE_STORING_LICENSE_IN_FILE 0x00000004
53 
59 typedef enum {
64 
70 typedef enum {
74 
79 typedef enum {
83 
84 /*----------------------------------------------------------------------
85 | types
86 +---------------------------------------------------------------------*/
87 
92 typedef struct {
93  WSB_RightsEnabler_EventType type;
95 
105 typedef struct {
107  const char* url;
109 
121 typedef struct {
124  const void* license_data;
129 
138 typedef struct {
140  WSB_RightsEnabler_TransactionType transaction_type;
142 
148 typedef struct {
149  void* instance;
151  (*handler)(void* instance, const WSB_RightsEnabler_Event* event);
153 
154 /*----------------------------------------------------------------------
155 | functions
156 +---------------------------------------------------------------------*/
157 
173 WSB_EXPORT WSB_Result
175  WSB_RightsEnabler** rights_enabler);
176 
177 
184 WSB_EXPORT WSB_Result
186  WSB_UInt32 option_flags);
187 
215 WSB_EXPORT WSB_Result
217  WSB_MediaFile* file,
218  const char** content_ids,
219  WSB_Cardinal content_ids_count,
220  const void* license_data,
221  WSB_Size license_data_size);
222 
261 WSB_EXPORT WSB_Result
263  const char* content_id,
264  const char* sla_url,
265  const void* license_data,
266  WSB_Size license_data_size);
267 
273 WSB_EXPORT WSB_Result
275 
278 #if defined(__cplusplus)
279 }
280 #endif
281 
282 #endif /* _WSB_RIGHTS_ENABLER_H_ */
WSB_EXPORT WSB_Result WSB_RightsEnabler_SetOptions(WSB_RightsEnabler *rights_enabler, WSB_UInt32 option_flags)
Sets the options flags (WSB_RIGHTSENABLER_OPTION_FLAG*).
WSB_EXPORT WSB_Result WSB_RightsEnabler_Destroy(WSB_RightsEnabler *rights_enabler)
Releases an instance of a WSB_RightsEnabler object.
This struct pairs a listener instance value with a function pointer for receiving events...
Definition: WsbRightsEnabler.h:148
void * instance
Definition: WsbRightsEnabler.h:149
WSB_RightsEnabler_Event base
Definition: WsbRightsEnabler.h:139
Event data for reporting that a service transaction has been initiated in an attempt to obtain rights...
Definition: WsbRightsEnabler.h:138
Definition: WsbRightsEnabler.h:71
WSB_RightsEnabler_TransactionType transaction_type
Definition: WsbRightsEnabler.h:140
WSB_Boolean
Boolean type used for variables that can be true (WSB_TRUE) or false (WSB_FALSE). ...
Definition: WsbTypes.h:71
Definition: WsbRightsEnabler.h:62
Definition: WsbRightsEnabler.h:61
const void * license_data
Definition: WsbRightsEnabler.h:124
Definition: WsbRightsEnabler.h:81
WSB_Result processing_result
Definition: WsbRightsEnabler.h:123
Definition: WsbRightsEnabler.h:72
const char * url
Definition: WsbRightsEnabler.h:107
WSB_RightsEnabler_TransactionType
Identifiers for transactions.
Definition: WsbRightsEnabler.h:70
struct WSB_MediaFile WSB_MediaFile
A WSB_MediaFile object represents information about a media file.
Definition: WsbMediaFile.h:37
WSB_RightsEnabler_ContinuationType
Constants used by listener to direct Rights Enabler on whether or not to continue to search for licen...
Definition: WsbRightsEnabler.h:79
WSB_RightsEnabler_EventType type
Definition: WsbRightsEnabler.h:93
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableMediaFile(WSB_RightsEnabler *rights_enabler, WSB_MediaFile *file, const char **content_ids, WSB_Cardinal content_ids_count, const void *license_data, WSB_Size license_data_size)
Tries all available avenues to obtain a working license for the content with the specified content ID...
struct WSB_RightsEnabler WSB_RightsEnabler
A WSB_RightsEnabler object can be used to do everything possible to obtain a valid license for conten...
Definition: WsbRightsEnabler.h:38
WSB_Size license_data_size
Definition: WsbRightsEnabler.h:125
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
SHI_ActionResult * action_result
Definition: WsbRightsEnabler.h:127
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
WSB_RightsEnabler_Event base
Definition: WsbRightsEnabler.h:122
WSB_Boolean is_granted
Definition: WsbRightsEnabler.h:126
Definition: WsbRightsEnabler.h:80
WSB_RightsEnabler_Event base
Definition: WsbRightsEnabler.h:106
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
Wasabi Media File API.
Event data for reporting a license that was found and evaluated.
Definition: WsbRightsEnabler.h:121
Definition: WsbRightsEnabler.h:60
Structure used as the base for all event structures.
Definition: WsbRightsEnabler.h:92
struct SHI_ActionResult SHI_ActionResult
A SHI_ActionResult object represents the result returned by several different SHI_Action methods...
Definition: ShiAction.h:444
WSB_EXPORT WSB_Result WSB_RightsEnabler_Create(WSB_RightsEnabler_EventListener listener, WSB_RightsEnabler **rights_enabler)
Creates an instance of a WSB_RightsEnabler object.
WSB_RightsEnabler_EventType
Identifiers for event types.
Definition: WsbRightsEnabler.h:59
Event data for reporting that the Rights Enabler has been directed to a service for obtaining needed ...
Definition: WsbRightsEnabler.h:105
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableContentId(WSB_RightsEnabler *rights_enabler, const char *content_id, const char *sla_url, const void *license_data, WSB_Size license_data_size)
Tries all available avenues to obtain a working license for the content with the specified content ID...
Wasabi Result.
Generic Data Objects.
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104