Wasabi ExpressPlay SDK for Desktop Systems
1.10
Main Page
Modules
Data Structures
Files
File List
Globals
Client
Source
Interface
Core
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
+---------------------------------------------------------------------*/
38
typedef
struct
WSB_RightsEnabler
WSB_RightsEnabler
;
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
{
60
WSB_RIGHTSENABLER_EVENT_TYPE_GOTO_URL
,
61
WSB_RIGHTSENABLER_EVENT_TYPE_TRANSACTION
,
62
WSB_RIGHTSENABLER_EVENT_TYPE_LICENSE
63
}
WSB_RightsEnabler_EventType
;
64
70
typedef
enum
{
71
WSB_RIGHTSENABLER_TRANSACTION_SLA
,
72
WSB_RIGHTSENABLER_TRANSACTION_RENEW_LINK
73
}
WSB_RightsEnabler_TransactionType
;
74
79
typedef
enum
{
80
WSB_RIGHTSENABLER_HALT_SEARCH
,
81
WSB_RIGHTSENABLER_CONTINUE_SEARCH
82
}
WSB_RightsEnabler_ContinuationType
;
83
84
/*----------------------------------------------------------------------
85
| types
86
+---------------------------------------------------------------------*/
87
92
typedef
struct
{
93
WSB_RightsEnabler_EventType
type
;
94
}
WSB_RightsEnabler_Event
;
95
105
typedef
struct
{
106
WSB_RightsEnabler_Event
base
;
107
const
char
*
url
;
108
}
WSB_RightsEnabler_GotoURLEvent
;
109
121
typedef
struct
{
122
WSB_RightsEnabler_Event
base
;
123
WSB_Result
processing_result
;
124
const
void
*
license_data
;
125
WSB_Size
license_data_size
;
126
WSB_Boolean
is_granted
;
127
SHI_ActionResult*
action_result
;
128
}
WSB_RightsEnabler_LicenseEvent
;
129
138
typedef
struct
{
139
WSB_RightsEnabler_Event
base
;
140
WSB_RightsEnabler_TransactionType
transaction_type
;
141
}
WSB_RightsEnabler_TransactionEvent
;
142
148
typedef
struct
{
149
void
*
instance
;
150
WSB_RightsEnabler_ContinuationType
151
(*handler)(
void
* instance,
const
WSB_RightsEnabler_Event
* event);
152
}
WSB_RightsEnabler_EventListener
;
153
154
/*----------------------------------------------------------------------
155
| functions
156
+---------------------------------------------------------------------*/
157
173
WSB_EXPORT
WSB_Result
174
WSB_RightsEnabler_Create
(
WSB_RightsEnabler_EventListener
listener,
175
WSB_RightsEnabler
** rights_enabler);
176
177
184
WSB_EXPORT
WSB_Result
185
WSB_RightsEnabler_SetOptions
(
WSB_RightsEnabler
* rights_enabler,
186
WSB_UInt32
option_flags);
187
215
WSB_EXPORT
WSB_Result
216
WSB_RightsEnabler_EnableMediaFile
(
WSB_RightsEnabler
* rights_enabler,
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
262
WSB_RightsEnabler_EnableContentId
(
WSB_RightsEnabler
* rights_enabler,
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
274
WSB_RightsEnabler_Destroy
(
WSB_RightsEnabler
* rights_enabler);
275
278
#if defined(__cplusplus)
279
}
280
#endif
281
282
#endif
/* _WSB_RIGHTS_ENABLER_H_ */