OOSecurePlayerDrmWorkflow.h
1 //
2 // Copyright (c) 2015 Brightcove, Inc. All rights reserved.
3 //
4 
5 #import <Foundation/Foundation.h>
6 #import <OoyalaSDK/OOOoyalaError.h>
7 #import <SecurePlayer/SecurePlayer.h>
8 
9 @class DxDrmManager;
11 
12 @protocol OOSecurePlayerDrmWorkflowDelegate <NSObject>
13 -(void) onDrmWorkflowStarted;
14 -(void)onDrmWorkflowError:(OOOoyalaErrorCode)ooyalaErrorCode;
15 -(void) onDrmWorkflowSuccess;
16 
17 -(void) onPersonalizationStarted;
18 -(void) onPersonalizationError;
19 -(void) onPersonalizationSuccess;
20 
21 -(void) onDownloadFileStarted;
22 -(void) onDownloadFileError;
23 -(void) onDownloadFileSuccess;
24 
25 -(void) onAcquireRightsStarted;
26 -(void) onAcquireRightsError:(NSError *)error;
27 -(void) onAcquireRightsSuccess;
28 @end
29 
33 typedef void(^OOPersonalizationDelegate)(DxDrmManagerStatus);
34 
35 @interface OOSecurePlayerDrmWorkflow : NSObject
36 @property (nonatomic, readonly) NSURL *url;
37 
42 +(NSString*) calculatePersonalizationURLWithPcode:(NSString*)pcode;
43 
53 +(void) startPersonalizationWithDxDrmManager:(DxDrmManager*)dxDrmManager
54  onQueue:(dispatch_queue_t)queue
55  appVersion:(NSString*)appVersion
56  sessionId:(NSString*)sessionId
58  delegate:(OOPersonalizationDelegate)delegate;
59 
60 -(instancetype) init __attribute__((unavailable("use initWithDxDrmManager")));
61 -(instancetype) initWithDxDrmManager:(DxDrmManager*)dxDrmManager
63  pcode:(NSString*)pcode
64  authToken:(NSString*)authToken
65  customDrmData:(NSString*)customDrmData
66  delegate:(id<OOSecurePlayerDrmWorkflowDelegate>)delegate;
67 -(void)startWorkflow;
68 -(BOOL) isFileDrmEnabled;
69 -(BOOL) areRightsValid;
70 -(void) deleteDownload;
71 @end
void deleteDownload()
Definition: OOSecurePlayerDrmWorkflow.m:158
NSString * sessionId
Definition: OOSecurePlayerDrmWorkflow.m:23
id< OOSecurePlayerDrmWorkflowDelegate > delegate
Definition: OOSecurePlayerDrmWorkflow.m:21
(unavailable("use initWithDxDrmManager" __attribute__()
NSString * appVersion
Definition: OOSecurePlayerDrmWorkflow.m:25
BOOL isFileDrmEnabled()
Definition: OOSecurePlayerDrmWorkflow.m:248
Definition: OOSecurePlayerDrmWorkflow.h:35
NSURL * url
Definition: OOSecurePlayerDrmWorkflow.h:36
OOSecurePlayerDrmWorkflowUtil * workflowUtil
Definition: OOSecurePlayerDrmWorkflow.m:18
id init()
Definition: OOSecurePlayerDrmWorkflow.m:79
void startWorkflow()
Definition: OOSecurePlayerDrmWorkflow.m:153
NSString * authToken
Definition: OOSecurePlayerDrmWorkflow.m:19
BOOL areRightsValid()
Definition: OOSecurePlayerDrmWorkflow.m:255
DxDrmManager * dxDrmManager
Definition: OOSecurePlayerDrmWorkflow.m:17
NSString * personalizationServerUrl
Definition: OOSecurePlayerDrmWorkflow.m:24
Definition: OOSecurePlayerDrmWorkflowUtil.h:11
NSString * customDrmData
Definition: OOSecurePlayerDrmWorkflow.m:20
DxDrmManager supplies an interface to perform DRM (Digital Rights Management) operations.
Definition: DxDrmManager.h:45