Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
ShiAction.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Sushi - Action
4 |
5 | $Id: ShiAction.h 7984 2015-03-01 07:11:46Z hwa $
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_ACTION_H_
22 #define _SHI_ACTION_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "ShiResults.h"
28 #include "ShiTypes.h"
29 #include "ShiList.h"
30 #include "ShiAttributes.h"
31 #include "ShiLicenseInfo.h"
32 
33 /*----------------------------------------------------------------------
34 | constants
35 +---------------------------------------------------------------------*/
39 #define SHI_ACTION_CALLBACK_IS_MANDATORY 0x00000001
40 #define SHI_ACTION_CALLBACK_IS_RESET 0x00010000
41 
45 #define SHI_ACTION_OBLIGATION_IS_MANDATORY 0x00000001
46 
50 #define SHI_ACTION_RESULT_MUST_ACCEPT 0x00000001
51 #define SHI_ACTION_RESULT_HAS_OBLIGATIONS 0x00000002
52 #define SHI_ACTION_RESULT_HAS_CALLBACKS 0x00000004
53 
58 #define SHI_ACTION_PLAY "Play"
59 
70 #define SHI_ACTION_EXPORT "Export"
71 
72 /*
73  * Predefined export modes.
74  */
75 #define SHI_ACTION_EXPORT_MODE_DONT_KNOW "DontKnow"
76 #define SHI_ACTION_EXPORT_MODE_RENDER "Render"
77 #define SHI_ACTION_EXPORT_MODE_COPY "Copy"
78 #define SHI_ACTION_EXPORT_MODE_MOVE "Move"
79 
80 /*
81  * Predefined export target systems ID used when exporting to
82  * audio CD (also known as CD Burning).
83  */
84 #define SHI_ACTION_EXPORT_SYSTEM_AUDIO_CD "CleartextPcmAudio"
85 
86 #define SHI_DATA_POINTER_TYPE_ID_CALLBACK 1
87 #define SHI_DATA_POINTER_TYPE_ID_OBLIGATION 2
88 
89 /*----------------------------------------------------------------------
90 | types
91 +---------------------------------------------------------------------*/
95 typedef struct {
96  const char* target_system;
98  const char* export_mode;
102 
106 typedef enum {
115 
122 
136 
140 typedef struct {
147 
152 
158  const void* parameters;
160 
164 typedef enum {
169 
173 #define SHI_MEDIA_ZONE_FLAG_METER 1
174 #define SHI_MEDIA_ZONE_FLAG_INCLUDE_SPLICE 2
175 
180 typedef struct {
185 
190 
196 
202 typedef struct {
206 
212 typedef struct {
220 
225 typedef enum {
228 
231 
239 
243 typedef struct {
248  const char* metering_tag;
250 
254 typedef enum {
263 
272 
280 
288 
297 
306 
316 
320 typedef struct {
327 
332 
341 
348  const void* parameters;
350 
354 typedef struct {
360 
364 typedef struct {
372 
376 typedef struct {
386 
390 typedef struct {
397 
401 typedef struct {
405 
422 typedef struct {
427 
428 /*----------------------------------------------------------------------
429 | interfaces
430 +---------------------------------------------------------------------*/
431 #if defined(__cplusplus)
432 extern "C" {
433 #endif
434 
445 
457 void*
459 
471 
489 
505 SHI_Result
507 
519 SHI_Result
521 
533 SHI_Result
535 
552 
563 
575 typedef struct SHI_Action SHI_Action;
576 
588 void*
590 
602 
616 SHI_Result
617 SHI_Action_Describe(SHI_Action* self, SHI_LicenseInfo** description);
618 
634 
653 
682 SHI_Result
684  SHI_UInt32 callback_handle,
685  const void* arguments,
686  SHI_ActionResult** result);
687 
702 SHI_Result
705  const void* parameters);
706 
708 #if defined(__cplusplus)
709 }
710 #endif
711 
712 #endif /* _SHI_ACTION_H_ */
#define SHI_PUBLIC_API
Definition: ShiTypes.h:52
Parameters for metering events of type SHI_ACTION_METERING_ZONE_COMPLETED.
Definition: ShiAction.h:243
unsigned int SHI_UInt32
32-bit (or more) unsigned integer
Definition: ShiTypes.h:27
SHI_PUBLIC_API void * SHI_Action_GetInterface(SHI_Action *self, SHI_InterfaceId iface_id)
Obtains a pointer to a SHI_Action object with a different interface.
SHI_MediaZoneType type
Zone type.
Definition: ShiAction.h:189
const void * parameters
Pointer to a parameters structure for the obligation, or NULL if this obligation has no parameters...
Definition: ShiAction.h:158
SHI_PUBLIC_API SHI_Result SHI_Action_Destroy(SHI_Action *self)
Destroys this action object.
const char * export_mode
Unique identifier for the DRM system to which the export is done.
Definition: ShiAction.h:98
Definition: ShiAction.h:165
Result codes.
Parameters for a SHI_ACTION_EXPORT action.
Definition: ShiAction.h:95
SHI_Cardinal zone_count
Definition: ShiAction.h:203
SHI_PUBLIC_API SHI_Result SHI_ActionResult_GetDetails(SHI_ActionResult *self, SHI_Attribute **details)
Returns details for this action result object.
SHI_MediaZoneInfo * zones
Definition: ShiAction.h:204
SHI_PUBLIC_API SHI_Result SHI_Action_Describe(SHI_Action *self, SHI_LicenseInfo **description)
Gets a description for this action.
SHI_PUBLIC_API SHI_Result SHI_ActionResult_Release(SHI_ActionResult *self)
Releases this action result object.
OnTime callback.
Definition: ShiAction.h:262
SHI_Flags flags
Flags (see flags for SHI_ActionResultInfo) above.
Definition: ShiAction.h:425
Parameters for callbacks of type SHI_ACTION_CALLBACK_TYPE_ON_TIMECODE.
Definition: ShiAction.h:376
SHI_UInt32 seconds
Duration in seconds after which the application needs to invoke the callback.
Definition: ShiAction.h:370
struct SHI_Attribute SHI_Attribute
SHI_Attribute objects represent named values that can be arranged in a tree structure.
Definition: ShiAttributes.h:110
SHI_ActionCallbackType
Possible SHI_ActionCallback type values.
Definition: ShiAction.h:254
OnTimeElapsed callback.
Definition: ShiAction.h:271
SHI_UInt32 handle
Handle for this callback.
Definition: ShiAction.h:326
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
Parameters for callbacks of type SHI_ACTION_CALLBACK_TYPE_ON_TIME_ELAPSED.
Definition: ShiAction.h:364
Definition: ShiAction.h:166
SHI_UInt32 zone_id
Id of a media zone.
Definition: ShiAction.h:395
SHI_PUBLIC_API SHI_Result SHI_Action_Perform(SHI_Action *self, SHI_ActionResult **result)
Determines whether this action is allowed by its license.
SHI_ActionCallbackType type
Type of the callback.
Definition: ShiAction.h:340
SHI_Boolean is_granted
Indicates whether the action is granted or not.
Definition: ShiAction.h:423
Obligations of this type are obligations for which this API does not provide a specific representatio...
Definition: ShiAction.h:134
Obligations of this type are metering obligations.
Definition: ShiAction.h:114
SHI_MediaZoneType
Media zone types.
Definition: ShiAction.h:164
Parameters for callbacks of type SHI_ACTION_CALLBACK_TYPE_ON_ZONE_COMPLETED.
Definition: ShiAction.h:390
SHI_UInt32 range
Definition: ShiAction.h:403
SHI_DateTime time
Time at which the application must invoke the callback.
Definition: ShiAction.h:358
SHI_PUBLIC_API SHI_Result SHI_Action_Callback(SHI_Action *self, SHI_UInt32 callback_handle, const void *arguments, SHI_ActionResult **result)
Invokes a callback on this action.
OnTimecode callback.
Definition: ShiAction.h:305
const char * metering_tag
Metering tag for the zone that was just completed.
Definition: ShiAction.h:248
SHI_PUBLIC_API void * SHI_ActionResult_GetInterface(SHI_ActionResult *self, SHI_InterfaceId iface_id)
Obtains a pointer to a SHI_ActionResult object with a different interface.
Parameters for media zones.
Definition: ShiAction.h:202
Arguments for callbacks of type SHI_ACTION_CALLBACK_TYPE_ON_SEEK.
Definition: ShiAction.h:401
Parameters for generic obligations.
Definition: ShiAction.h:212
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
When playback is stopped or paused.
Definition: ShiAction.h:230
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_Flags flags
Flags for this callback (e.g., SHI_ACTION_CALLBACK_IS_MANDATORY).
Definition: ShiAction.h:331
SHI_UInt32 SHI_InterfaceId
Definition: ShiInterfaces.h:33
Parameters for callbacks of type SHI_ACTION_CALLBACK_TYPE_ON_TIME.
Definition: ShiAction.h:354
OnPlay callback.
Definition: ShiAction.h:279
const char * target_system
Definition: ShiAction.h:96
SHI_ActionMeteringEventType
The different types of metering events that may be logged by calls to SHI_ActionLogMeteringEvent.
Definition: ShiAction.h:225
SHI_UInt32 id
Zone identifier.
Definition: ShiAction.h:184
OnStop callback.
Definition: ShiAction.h:287
SHI_PUBLIC_API SHI_Result SHI_ActionResult_GetObligations(SHI_ActionResult *self, SHI_List **obligations)
Returns a list of obligations for this action result object.
SHI_Boolean
Boolean type used for variables that can be true (SHI_TRUE) or false (SHI_FALSE). ...
Definition: ShiTypes.h:62
SHI_ActionObligationType type
Type of the obligation.
Definition: ShiAction.h:146
SHI_Flags flags
Zone flags: or'ed combination of zero or more SHI_MEDIA_ZONE_FLAG_XXX flags.
Definition: ShiAction.h:194
Obligation returned by SHI_ActionResult_GetObligations.
Definition: ShiAction.h:140
A date and time.
Definition: ShiTypes.h:128
SHI_Flags flags
Flags for this obligation (e.g., SHI_ACTION_OBLIGATION_IS_MANDATORY).
Definition: ShiAction.h:151
Information for a zone returned in a SHI_ActionMediaZonesObligation obligation.
Definition: ShiAction.h:180
When playback is started.
Definition: ShiAction.h:227
Obligations of this type are media zones obligations.
Definition: ShiAction.h:121
SHI_ActionObligationType
Possible SHI_ActionObligation type values.
Definition: ShiAction.h:106
const void * parameters
Pointer to a parameters structure for the callback, or NULL if this callback has no parameters...
Definition: ShiAction.h:348
struct SHI_List SHI_List
Definition: ShiList.h:80
Callback returned by SHI_ActionResult_GetCallbacks.
Definition: ShiAction.h:320
Definition: ShiAction.h:167
Generic Lists.
struct SHI_ActionResult SHI_ActionResult
A SHI_ActionResult object represents the result returned by several different SHI_Action methods...
Definition: ShiAction.h:444
Common data types.
SHI_UInt32 offset
Definition: ShiAction.h:402
OnZoneCompleted callback.
Definition: ShiAction.h:314
Attributes.
When a Media Zone has been completely played and validated.
Definition: ShiAction.h:237
SHI_PUBLIC_API SHI_Boolean SHI_ActionResult_IsFromMs3(SHI_ActionResult *self)
Returns boolean status on whether this action result object is associated with Marlin MS3...
SHI_PUBLIC_API SHI_Result SHI_ActionResult_GetCallbacks(SHI_ActionResult *self, SHI_List **callbacks)
Returns a list of callbacks for this action result object.
SHI_PUBLIC_API SHI_Result SHI_Action_LogMeteringEvent(SHI_Action *self, SHI_ActionMeteringEventType type, const void *parameters)
Logs a playback metering event.
SHI_UInt32 SHI_Flags
Type used to represent a bit pattern signifying a combination of flags that can be on or off...
Definition: ShiTypes.h:84
SHI_PUBLIC_API SHI_Result SHI_Action_Check(SHI_Action *self, SHI_ActionResult **result)
Checks whether this action would be granted or denied if SHI_ActionPerform were called, without actually calling the method and thereby triggering potential side effects.
int SHI_Result
Signed integer value representing a function or method result (return value).
Definition: ShiTypes.h:74
Information about an action result.
Definition: ShiAction.h:422
OnSeek callback.
Definition: ShiAction.h:296
SHI_Boolean is_permanent
Indicates whether this info is permanent or not.
Definition: ShiAction.h:424
SHI_PUBLIC_API SHI_Result SHI_ActionResult_GetInfo(SHI_ActionResult *self, SHI_ActionResultInfo *info)
Returns information about this action result object.
SHI_PUBLIC_API SHI_Result SHI_ActionResult_Accept(SHI_ActionResult *self)
Accepts the action result.
SHI_UInt32 timecode
Timecode at which the application must invoke the callback.
Definition: ShiAction.h:384
SHI_Attribute * attribute
The details of the generic obligation expressed as an attribute tree.
Definition: ShiAction.h:218