Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
WsbKeyManager.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Key Manager API
4 |
5 | $Id: WsbKeyManager.h 10793 2014-06-25 12:46:08Z jebaseelir $
6 | Original author: Julien Boeuf
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) 2010-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_KEY_MANAGER_H_
22 #define _WSB_KEY_MANAGER_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 
29 /*----------------------------------------------------------------------
30 | types
31 +---------------------------------------------------------------------*/
37 
38 typedef enum {
43 
44 typedef struct {
46  const void* parameters;
48 
49 /*----------------------------------------------------------------------
50 | prototypes
51 +---------------------------------------------------------------------*/
52 #if defined(__cplusplus)
53 extern "C" {
54 #endif
55 
67 WSB_EXPORT WSB_Result
69 
79 WSB_EXPORT WSB_Result
81  WSB_KeyManager** manager);
82 
89 WSB_EXPORT WSB_ContentKeyFormatInfo
91 
106 WSB_EXPORT WSB_Result
108  WSB_UInt32 track_id,
109  const char* track_content_id,
110  const WSB_Byte* key_data,
111  WSB_Size key_data_size);
112 
126 WSB_EXPORT WSB_Result
128  const char* file_content_id,
129  const WSB_Byte* key_data,
130  WSB_Size key_data_size);
156 WSB_EXPORT WSB_Result
158  const char* key_name,
159  WSB_Byte* key_data,
160  WSB_Size* key_data_size);
161 
166 WSB_EXPORT WSB_Result
168 
172 WSB_EXPORT WSB_Result
174 
177 #if defined(__cplusplus)
178 }
179 #endif
180 
181 #endif /* _WSB_KEY_MANAGER_H_ */
182 
WSB_EXPORT WSB_ContentKeyFormatInfo WSB_KeyManager_GetContentKeyFormatInfo(WSB_KeyManager *self)
Gets the content key format info.
Definition: WsbKeyManager.h:44
WSB_ContentKeyFormat format
Definition: WsbKeyManager.h:45
WSB_EXPORT WSB_Result WSB_KeyManager_Destroy(WSB_KeyManager *self)
Destroys the WSB_KeyManager object.
Definition: WsbKeyManager.h:40
WSB_EXPORT WSB_Result WSB_KeyManager_Clear(WSB_KeyManager *self)
Clears the WSB_KeyManager object, making it available to hold the keys for a different media file...
const void * parameters
NULL except when format is WSB_CONTENT_KEY_FORMAT_SKB_CUSTOM.
Definition: WsbKeyManager.h:46
WSB_ContentKeyFormat
Definition: WsbKeyManager.h:38
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
Definition: WsbKeyManager.h:39
WSB_EXPORT WSB_Result WSB_KeyManager_GetKeyByName(const WSB_KeyManager *self, const char *key_name, WSB_Byte *key_data, WSB_Size *key_data_size)
Gets the key for a given key name.
WSB_UInt8 WSB_Byte
An 8-bit byte.
Definition: WsbTypes.h:132
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
struct WSB_KeyManager WSB_KeyManager
A WSB_KeyManager object can be used to register (set) and get content keys for a playback session...
Definition: EmbProcessor.h:237
WSB_EXPORT WSB_Result WSB_KeyManager_SetTrackKey(WSB_KeyManager *self, WSB_UInt32 track_id, const char *track_content_id, const WSB_Byte *key_data, WSB_Size key_data_size)
Sets the key for a track.
Definition: WsbKeyManager.h:41
Wasabi Result.
WSB_EXPORT WSB_Result WSB_KeyManager_Create(WSB_KeyManager **manager)
Creates an instance of a WSB_KeyManager object.
WSB_EXPORT WSB_Result WSB_KeyManager_SetFileKey(WSB_KeyManager *self, const char *file_content_id, const WSB_Byte *key_data, WSB_Size key_data_size)
Sets the key for the file.
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104
WSB_EXPORT WSB_Result WSB_KeyManager_CreateEx(WSB_ContentKeyFormatInfo format_info, WSB_KeyManager **manager)
Creates an instance of a WSB_KeyManager object.