Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
WsbResults.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Result Codes
4 |
5 | $Id: WsbResults.h 14593 2018-07-24 02:02:16Z hwa $
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) 2005-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_RESULTS_H_
22 #define _WSB_RESULTS_H_
23 
24 /*----------------------------------------------------------------------
25 | macros
26 +---------------------------------------------------------------------*/
27 #define WSB_SUCCESS 0
28 #define WSB_FAILURE (-1)
29 
30 #define WSB_FAILED(_result) ((_result) != WSB_SUCCESS)
31 #define WSB_SUCCEEDED(_result) ((_result) == WSB_SUCCESS)
32 #define WSB_CHECK_POINTER_SEVERE(_p) do { \
33  if ((_p) == NULL) { \
34  NPT_CHECK_SEVERE(WSB_ERROR_OUT_OF_MEMORY); \
35  } \
36 } while(0)
37 #define WSB_CHECK_POINTER_LABEL_SEVERE(_p, _result, _label) do { \
38  if ((_p) == NULL) { \
39  _result = WSB_ERROR_OUT_OF_MEMORY; \
40  NPT_CHECK_LABEL_SEVERE(_result, _label); \
41  } \
42 } while(0)
43 
44 /*----------------------------------------------------------------------
45 | error code bases
46 +---------------------------------------------------------------------*/
47 #if !defined(WSB_ERROR_BASE)
48 #define WSB_ERROR_BASE (-100000)
49 #endif
50 
51 /* error codes bases for the external API */
52 #define WSB_ERROR_BASE_GENERAL (WSB_ERROR_BASE - 0 )
53 /* general error codes */
54 #define WSB_ERROR_OUT_OF_MEMORY (WSB_ERROR_BASE_GENERAL - 0)
55 #define WSB_ERROR_OUT_OF_RESOURCES (WSB_ERROR_BASE_GENERAL - 1)
56 #define WSB_ERROR_INTERNAL (WSB_ERROR_BASE_GENERAL - 2)
57 #define WSB_ERROR_INVALID_PARAMETERS (WSB_ERROR_BASE_GENERAL - 3)
58 #define WSB_ERROR_INVALID_STATE (WSB_ERROR_BASE_GENERAL - 4)
59 #define WSB_ERROR_NOT_IMPLEMENTED (WSB_ERROR_BASE_GENERAL - 5)
60 #define WSB_ERROR_OUT_OF_RANGE (WSB_ERROR_BASE_GENERAL - 6)
61 #define WSB_ERROR_ACCESS_DENIED (WSB_ERROR_BASE_GENERAL - 7)
62 #define WSB_ERROR_INVALID_SYNTAX (WSB_ERROR_BASE_GENERAL - 8)
63 #define WSB_ERROR_NOT_SUPPORTED (WSB_ERROR_BASE_GENERAL - 9)
64 #define WSB_ERROR_INVALID_FORMAT (WSB_ERROR_BASE_GENERAL - 10)
65 #define WSB_ERROR_NOT_ENOUGH_SPACE (WSB_ERROR_BASE_GENERAL - 11)
66 #define WSB_ERROR_NO_SUCH_ITEM (WSB_ERROR_BASE_GENERAL - 12)
67 #define WSB_ERROR_NO_SUCH_INTERFACE (WSB_ERROR_BASE_GENERAL - 13)
68 #define WSB_ERROR_NOT_AVAILABLE (WSB_ERROR_BASE_GENERAL - 14)
69 #define WSB_ERROR_TIMEOUT (WSB_ERROR_BASE_GENERAL - 15)
70 #define WSB_ERROR_RUNTIME_NOT_INITED (WSB_ERROR_BASE_GENERAL - 16)
71 #define WSB_ERROR_INVALID_PATH (WSB_ERROR_BASE_GENERAL - 17)
72 #define WSB_ERROR_CANNOT_OPEN_FILE (WSB_ERROR_BASE_GENERAL - 18)
73 #define WSB_ERROR_EOS (WSB_ERROR_BASE_GENERAL - 19)
74 #define WSB_ERROR_INCOMPLETE_MEDIA (WSB_ERROR_BASE_GENERAL - 20)
75 #define WSB_ERROR_STREAM_MISSING (WSB_ERROR_BASE_GENERAL - 21)
76 #define WSB_ERROR_MIMETYPE_NOT_SUPPORTED (WSB_ERROR_BASE_GENERAL - 22)
77 #define WSB_ERROR_CANCELED (WSB_ERROR_BASE_GENERAL - 23)
78 #define WSB_ERROR_INVALID_URL (WSB_ERROR_BASE_GENERAL - 24)
79 #define WSB_ERROR_OBSOLETE (WSB_ERROR_BASE_GENERAL - 25)
80 #define WSB_ERROR_MISSING_VERSION (WSB_ERROR_BASE_GENERAL - 26)
81 #define WSB_ERROR_INVALID_VERSION (WSB_ERROR_BASE_GENERAL - 27)
82 
83 #define WSB_ERROR_BASE_NETWORK (WSB_ERROR_BASE - 60)
84 #define WSB_ERROR_BASE_DRM_PLUGIN (WSB_ERROR_BASE - 100)
85 #define WSB_ERROR_BASE_DOWNLOAD_MANAGER (WSB_ERROR_BASE - 200)
86 #define WSB_ERROR_BASE_METADATA_HELPER (WSB_ERROR_BASE - 300)
87 #define WSB_ERROR_BASE_LICENSE_STORE (WSB_ERROR_BASE - 400)
88 #define WSB_ERROR_BASE_MEDIA_SOURCE_SERVER (WSB_ERROR_BASE - 500)
89 
90 /* network error codes */
91 #define WSB_ERROR_NETWORK_FAILURE (WSB_ERROR_BASE_NETWORK - 0)
92 #define WSB_ERROR_NETWORK_RESOURCE_NOT_FOUND (WSB_ERROR_BASE_NETWORK - 1)
93 #define WSB_ERROR_NETWORK_CONNECTION_REFUSED (WSB_ERROR_BASE_NETWORK - 2)
94 #define WSB_ERROR_NETWORK_DISCONNECTED (WSB_ERROR_BASE_NETWORK - 3)
95 #define WSB_ERROR_NETWORK_HOST_UNKNOWN (WSB_ERROR_BASE_NETWORK - 4)
96 #define WSB_ERROR_NETWORK_PERMISSION_DENIED (WSB_ERROR_BASE_NETWORK - 5)
97 #define WSB_ERROR_NETWORK_SERVER_FAILURE (WSB_ERROR_BASE_NETWORK - 6)
98 #define WSB_ERROR_NETWORK_PROTOCOL_FAILURE (WSB_ERROR_BASE_NETWORK - 7)
99 
100 /* drm error codes */
101 #define WSB_ERROR_BASE_DRM (WSB_ERROR_BASE - 600)
102 #define WSB_ERROR_DRM_INIT (WSB_ERROR_BASE_DRM - 0)
103 #define WSB_ERROR_DRM_NO_LICENSE (WSB_ERROR_BASE_DRM - 1)
104 #define WSB_ERROR_DRM_NO_SILENT_HEADER (WSB_ERROR_BASE_DRM - 2)
105 #define WSB_ERROR_DRM_NO_RENEWAL_URL (WSB_ERROR_BASE_DRM - 3)
106 #define WSB_ERROR_DRM_ACQUIRE_TOKEN (WSB_ERROR_BASE_DRM - 4)
107 #define WSB_ERROR_DRM_PROCESS_TOKEN (WSB_ERROR_BASE_DRM - 5)
108 #define WSB_ERROR_DRM_EVAL_LICENSE (WSB_ERROR_BASE_DRM - 6)
109 #define WSB_ERROR_DRM_DENY_RIGHTS (WSB_ERROR_BASE_DRM - 7)
110 #define WSB_ERROR_DRM_GET_KEY (WSB_ERROR_BASE_DRM - 8)
111 #define WSB_ERROR_DRM_UNHANDLED_CALLBACK (WSB_ERROR_BASE_DRM - 9)
112 #define WSB_ERROR_DRM_UNHANDLED_OBLIGATION (WSB_ERROR_BASE_DRM - 10)
113 #define WSB_ERROR_DRM_CLIENT_SYSTEM_ERROR (WSB_ERROR_BASE_DRM - 11)
114 #define WSB_ERROR_DRM_INVALID_URL (WSB_ERROR_BASE_DRM - 12)
115 #define WSB_ERROR_DRM_SERVER_UNREACHABLE (WSB_ERROR_BASE_DRM - 13)
116 #define WSB_ERROR_DRM_DENIED_BY_SERVER (WSB_ERROR_BASE_DRM - 14)
117 #define WSB_ERROR_DRM_BAD_SERVER_RESPONSE (WSB_ERROR_BASE_DRM - 15)
118 #define WSB_ERROR_DRM_BAD_CONTENT_FORMAT (WSB_ERROR_BASE_DRM - 16)
119 #define WSB_ERROR_DRM_LICENSE_UNSUPPORTED (WSB_ERROR_BASE_DRM - 17)
120 #define WSB_ERROR_DRM_BAD_LICENSE_FORMAT (WSB_ERROR_BASE_DRM - 18)
121 #define WSB_ERROR_DRM_MISSING_CREDENTIALS (WSB_ERROR_BASE_DRM - 19)
122 #define WSB_ERROR_DRM_LICENSE_EXPIRED (WSB_ERROR_BASE_DRM - 20)
123 #define WSB_ERROR_DRM_PLAY_COUNT_EXCEEDED (WSB_ERROR_BASE_DRM - 21)
124 #define WSB_ERROR_DRM_SUBSCRIPTION_EXPIRED (WSB_ERROR_BASE_DRM - 22)
125 #define WSB_ERROR_DRM_UNKNOWN (WSB_ERROR_BASE_DRM - 23)
126 #define WSB_ERROR_DRM_HARD_CODED_KEYS (WSB_ERROR_BASE_DRM - 24)
127 #define WSB_ERROR_DRM_INSUFFICIENT_LICENSE_NO_WUDO (WSB_ERROR_BASE_DRM - 25)
128 #define WSB_ERROR_DRM_DEVICE_ROOTED_OR_JAILBROKEN (WSB_ERROR_BASE_DRM - 26)
129 #define WSB_ERROR_DRM_ROOTED_DEVICE_LICENSE_CONTROL (WSB_ERROR_BASE_DRM - 27)
130 
131 /* directshow filter error code base */
132 #define WSB_ERROR_BASE_DS_FILTER (WSB_ERROR_BASE - 700)
133 
134 /* gstreamer element error code base */
135 #define WSB_ERROR_BASE_GST_ELEMENT (WSB_ERROR_BASE - 800)
136 
137 /* Adaptive Streaming (Smth) error codes */
138 #define WSB_ERROR_BASE_SMTH (WSB_ERROR_BASE - 1000)
139 
140 /* Action Result Info error codes */
141 #define WSB_ERROR_BASE_ARI (WSB_ERROR_BASE - 1100)
142 
143 /* Http Live Streaming (Hls) error codes */
144 #define WSB_ERROR_BASE_HLS (WSB_ERROR_BASE - 1200)
145 
146 /* MPEG-Dynamic Adaptive Streaming over HTTP (Dash) error codes */
147 #define WSB_ERROR_BASE_DASH (WSB_ERROR_BASE - 1300)
148 
149 /* Output Control error codes */
150 #define WSB_ERROR_BASE_OC (WSB_ERROR_BASE - 1400)
151 #define WSB_ERROR_OC_FAILED_SEC_CLASS (WSB_ERROR_BASE_OC - 0)
152 #define WSB_ERROR_OC_NOT_SUBJECT_TO_SEC_CLASS (WSB_ERROR_BASE_OC - 1)
153 #define WSB_ERROR_OC_PREDICATE_NESTING_LEVEL (WSB_ERROR_BASE_OC - 2)
154 #define WSB_ERROR_OC_HDCP_SRM_PARSE (WSB_ERROR_BASE_OC - 3)
155 #define WSB_ERROR_OC_HDCP_SRM_NOT_SUPPORTED (WSB_ERROR_BASE_OC - 4)
156 #define WSB_ERROR_OC_EARLIER_HDCP_SRM_VERSION (WSB_ERROR_BASE_OC - 5)
157 #define WSB_ERROR_OC_HDCP_SRM_UPDATE (WSB_ERROR_BASE_OC - 6)
158 
159 /* Media Download error codes */
160 #define WSB_ERROR_BASE_MEDIA_DOWNLOAD (WSB_ERROR_BASE - 1500)
161 #define WSB_ERROR_MEDIA_DOWNLOAD_DB (WSB_ERROR_BASE_MEDIA_DOWNLOAD - 1)
162 
163 /* Media Adapter error codes */
164 #define WSB_ERROR_BASE_MEDIA_ADAPTER (WSB_ERROR_BASE - 1600)
165 #define WSB_ERROR_MA_INVALID_HOST_INFO (WSB_ERROR_BASE_MEDIA_ADAPTER - 0)
166 #define WSB_ERROR_MA_NOT_SUPPORTED_OS (WSB_ERROR_BASE_MEDIA_ADAPTER - 1)
167 #define WSB_ERROR_MA_NOT_SUPPORTED_MEDIA (WSB_ERROR_BASE_MEDIA_ADAPTER - 2)
168 #define WSB_ERROR_MA_NO_NATIVE_SUPPORT (WSB_ERROR_BASE_MEDIA_ADAPTER - 3)
169 #define WSB_ERROR_MA_NOT_PACKAGED_FOR_NATIVE (WSB_ERROR_BASE_MEDIA_ADAPTER - 4)
170 #define WSB_ERROR_MA_INVALID_URL_SCHEME (WSB_ERROR_BASE_MEDIA_ADAPTER - 5)
171 #define WSB_ERROR_MA_INVALID_TOKEN (WSB_ERROR_BASE_MEDIA_ADAPTER - 6)
172 #define WSB_ERROR_MA_NOT_SUPPORTED_FLAG (WSB_ERROR_BASE_MEDIA_ADAPTER - 7)
173 #define WSB_ERROR_MA_QUERY_VERSION (WSB_ERROR_BASE_MEDIA_ADAPTER - 8)
174 #define WSB_ERROR_MA_QUERY_DRM (WSB_ERROR_BASE_MEDIA_ADAPTER - 9)
175 #define WSB_ERROR_MA_SECURITY_LEVEL (WSB_ERROR_BASE_MEDIA_ADAPTER - 10)
176 
177 /* Extended Persistent License (EPL) to Stream Access Statement (SAS) Builder
178  (ESB) error codes */
179 #define WSB_ERROR_BASE_ESB (WSB_ERROR_BASE - 1700)
180 #define WSB_ERROR_ESB_INTERNAL (WSB_ERROR_BASE_ESB - 0)
181 #define WSB_ERROR_ESB_SIGN_EXT_TYPE (WSB_ERROR_BASE_ESB - 1)
182 #define WSB_ERROR_ESB_SIGN_EXT_HMAC_SIZE (WSB_ERROR_BASE_ESB - 2)
183 #define WSB_ERROR_ESB_SIGN_EXT_VERIFY (WSB_ERROR_BASE_ESB - 3)
184 #define WSB_ERROR_ESB_NO_OCT_PUB_KEY (WSB_ERROR_BASE_ESB - 4)
185 #define WSB_ERROR_ESB_INVALID_EXPIRATION (WSB_ERROR_BASE_ESB - 5)
186 #define WSB_ERROR_ESB_EPL_VERSION (WSB_ERROR_BASE_ESB - 10)
187 #define WSB_ERROR_ESB_EPL_EXT_COUNT (WSB_ERROR_BASE_ESB - 11)
188 #define WSB_ERROR_ESB_EPL_DUPLICATE_EXT (WSB_ERROR_BASE_ESB - 12)
189 #define WSB_ERROR_ESB_EPL_SIGN_EXT_POS (WSB_ERROR_BASE_ESB - 13)
190 #define WSB_ERROR_ESB_EPL_EXPIRED (WSB_ERROR_BASE_ESB - 14)
191 #define WSB_ERROR_ESB_EPL_KEY_MISSING (WSB_ERROR_BASE_ESB - 15)
192 #define WSB_ERROR_ESB_EPL_MULTI_KEYS (WSB_ERROR_BASE_ESB - 16)
193 #define WSB_ERROR_ESB_EPL_SIZE (WSB_ERROR_BASE_ESB - 17)
194 #define WSB_ERROR_ESB_GKO_VERSION (WSB_ERROR_BASE_ESB - 20)
195 #define WSB_ERROR_ESB_GKO_EXT_COUNT (WSB_ERROR_BASE_ESB - 21)
196 #define WSB_ERROR_ESB_GKO_UNKNOWN_EXT (WSB_ERROR_BASE_ESB - 22)
197 #define WSB_ERROR_ESB_GKO_DUPLICATE_EXT (WSB_ERROR_BASE_ESB - 23)
198 #define WSB_ERROR_ESB_GKO_SIGN_EXT_POS (WSB_ERROR_BASE_ESB - 24)
199 #define WSB_ERROR_ESB_GKO_EXPIRED (WSB_ERROR_BASE_ESB - 25)
200 #define WSB_ERROR_ESB_GKO_KEY_MISSING (WSB_ERROR_BASE_ESB - 26)
201 #define WSB_ERROR_ESB_GKO_MULTI_KEYS (WSB_ERROR_BASE_ESB - 27)
202 #define WSB_ERROR_ESB_GKO_SIZE (WSB_ERROR_BASE_ESB - 28)
203 #define WSB_ERROR_ESB_GKO_GRP_ID_MISSING (WSB_ERROR_BASE_ESB - 29)
204 #define WSB_ERROR_ESB_EMM_TARGET_ADDR (WSB_ERROR_BASE_ESB - 40)
205 #define WSB_ERROR_ESB_EMM_SECTION_LEN (WSB_ERROR_BASE_ESB - 41)
206 #define WSB_ERROR_ESB_EMM_PAYLOAD_TYPE (WSB_ERROR_BASE_ESB - 42)
207 #define WSB_ERROR_ESB_EMM_GRP_TARGET_GRP (WSB_ERROR_BASE_ESB - 43)
208 #define WSB_ERROR_ESB_EMM_VERIFY (WSB_ERROR_BASE_ESB - 44)
209 
210 /* Media AES Decrypter (MAD) error codes */
211 #define WSB_ERROR_BASE_MAD (WSB_ERROR_BASE - 1800)
212 #define WSB_ERROR_MAD_INVALID_TS_SYNC_BYTE (WSB_ERROR_BASE_MAD - 0)
213 #define WSB_ERROR_MAD_INVALID_CONTENT_ID (WSB_ERROR_BASE_MAD - 1)
214 #define WSB_ERROR_MAD_INCOMPLETE_KSMT (WSB_ERROR_BASE_MAD - 2)
215 #define WSB_ERROR_MAD_NEED_UPDATE (WSB_ERROR_BASE_MAD - 3)
216 
217 /* standard error codes */
218 /* these are special codes to convey an errno */
219 /* the error code is (WSB_ERROR_BASE_ERRNO - errno) */
220 /* where errno is the positive integer from errno.h */
221 #define WSB_ERROR_BASE_ERRNO (WSB_ERROR_BASE - 2000)
222 #define WSB_ERROR_ERRNO(e) (WSB_ERROR_BASE_ERRNO - (e))
223 
224 #endif /* _WSB_RESULTS_H_ */