Wasabi ExpressPlay SDK for Desktop Systems  1.10
ShiEngine.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Sushi - DRM Engine
4 |
5 | $Id: ShiEngine.h 7930 2014-06-25 11:05:10Z jebaseelir $
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_ENGINE_H_
22 #define _SHI_ENGINE_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "ShiResults.h"
28 #include "ShiTypes.h"
29 #include "ShiInterfaces.h"
30 #include "ShiList.h"
31 #include "ShiLicense.h"
32 #include "ShiService.h"
33 #include "ShiProperties.h"
34 
35 /*----------------------------------------------------------------------
36 | error codes
37 +---------------------------------------------------------------------*/
38 #define SHI_ERROR_ENGINE_NOT_PERSONALIZED (SHI_ERROR_BASE_API_ENGINE - 0)
39 #define SHI_ERROR_ENGINE_INVALID_TEMPLATE (SHI_ERROR_BASE_API_ENGINE - 1)
40 #define SHI_ERROR_ENGINE_POST_VACUUM (SHI_ERROR_BASE_API_ENGINE - 2)
41 #define SHI_ERROR_ENGINE_NO_CONFIG_TOKEN (SHI_ERROR_BASE_API_ENGINE - 3)
42 #define SHI_ERROR_ENGINE_ALREADY_PERSONALIZED (SHI_ERROR_BASE_API_ENGINE - 4)
43 
44 /*----------------------------------------------------------------------
45 | constants
46 +---------------------------------------------------------------------*/
53 #define SHI_ENGINE_PROP_VERSION "Version"
54 #define SHI_ENGINE_PROP_BUILD_DATE "BuildDate"
55 #define SHI_ENGINE_PROP_IS_PERSONALIZED "IsPersonalized"
56 #define SHI_ENGINE_PROP_PERSONALITY "Personality"
57 #define SHI_ENGINE_PROP_HTTP_PROXY_HOST_NAME "HttpProxyHostname"
58 #define SHI_ENGINE_PROP_HTTP_PROXY_PORT "HttpProxyPort"
59 #define SHI_ENGINE_PROP_HTTP_PROXY_ENABLED "HttpProxyEnabled"
60 #define SHI_ENGINE_PROP_HTTP_PROXY_SYSTEM_DEFAULT "HttpProxySystemDefault"
61 #define SHI_ENGINE_PROP_HTTPS_PROXY_HOST_NAME "HttpsProxyHostname"
62 #define SHI_ENGINE_PROP_HTTPS_PROXY_PORT "HttpsProxyPort"
63 #define SHI_ENGINE_PROP_HTTP_CONNECTION_TIMEOUT "HttpConnectionTimeout"
64 #define SHI_ENGINE_PROP_HTTP_IO_TIMEOUT "HttpIOTimeout"
65 #define SHI_ENGINE_PROP_PREFERRED_LANGUAGES "PreferredLanguages"
66 #define SHI_ENGINE_PROP_CACHE_POLICY "CachePolicy"
67 #define SHI_ENGINE_PROP_NEMO "Nemo"
72 typedef enum {
76 
80 #define SHI_ENGINE_VACUUM_FLAG_NODES (1)
81 #define SHI_ENGINE_VACUUM_FLAG_LINKS (2)
82 #define SHI_ENGINE_VACUUM_FLAG_SEASHELL (4)
83 #define SHI_ENGINE_VACUUM_FLAG_DONT_SAVE_RECENT_LINK (8)
84 #define SHI_ENGINE_VACUUM_FLAG_WIPE (16)
86 /*----------------------------------------------------------------------
87 | types
88 +---------------------------------------------------------------------*/
89 
92 typedef enum {
104 
108 typedef struct {
109  const char* name;
113 
117 typedef struct {
121 
126 typedef struct {
132  const void* cookie;
133 
144 
152 typedef struct {
154  const void* data;
157 
160 
164 typedef struct {
168 
186  SHI_EngineEventType type,
187  const SHI_EngineEvent* event);
188 };
189 
195 typedef struct {
199 
211  SHI_Result (*GetPersonality) (SHI_Data** perso_data);
218  SHI_Result (*GetNode) (const char* node_id,
219  SHI_Data** node_data);
230  SHI_Result (*SaveNode) (const char* node_id,
231  const char* node_type,
232  const char* node_name,
233  const char* service_id,
234  const char* data,
235  SHI_UInt32 data_size);
244  SHI_Result (*SaveLink) (const char* link_id,
245  const char* context,
246  const char* data,
247  SHI_UInt32 data_size);
250 
251 /*----------------------------------------------------------------------
252 | interfaces
253 +---------------------------------------------------------------------*/
254 #if defined(__cplusplus)
255 extern "C" {
256 #endif
257 
269 typedef struct SHI_Engine SHI_Engine;
270 
282 void*
284 
296 
307 
341  const char* token,
342  SHI_Size token_size,
343  const void* cookie);
344 
373  const char* token,
374  SHI_Size token_size,
375  const void* cookie);
376 
388 
411 SHI_Result
413  const char* token,
414  SHI_Size token_size,
415  const void* cookie);
416 
445 SHI_Result
447  const char* token,
448  SHI_Size token_size,
449  const void* cookie,
450  SHI_RegistrationDataManager* registration_data_manager);
451 
463 SHI_Result
465 
481  const char* service_id,
482  SHI_List** users);
483 
502  const char* service_id,
503  const char* user_id,
504  SHI_List** subscriptions);
505 
518 SHI_Result
519 SHI_Engine_CreateLicense(SHI_Engine* self, SHI_License** license);
520 
537 SHI_Result
539  const char* service_id,
540  SHI_UInt32 last_update,
541  const void* cookie);
542 
555 SHI_Result
557  SHI_Flags vacuum_options);
558 
575  const char* object_id,
576  SHI_Attribute** details);
577 
589  const char* object_id);
590 
603  SHI_Data** id_array);
604 
617  SHI_Data** id_array);
618 
633  const char* uri_template,
634  SHI_Data** uri);
635 
649 SHI_Result
650 SHI_Engine_Create(const SHI_EngineConfig* config, SHI_Engine** engine);
651 
653 #if defined(__cplusplus)
654 }
655 #endif
656 
657 #endif /* _SHI_ENGINE_H_ */