1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_DRM_V1_4_TYPES_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_DRM_V1_4_TYPES_H
3
4 #include <android/hardware/drm/1.2/types.h>
5
6 #include <hidl/HidlSupport.h>
7 #include <hidl/MQDescriptor.h>
8 #include <utils/NativeHandle.h>
9 #include <utils/misc.h>
10
11 namespace android {
12 namespace hardware {
13 namespace drm {
14 namespace V1_4 {
15
16 // Forward declaration for forward reference support:
17 enum class LogPriority : uint32_t;
18 struct LogMessage;
19 enum class Status : uint32_t;
20
21 enum class LogPriority : uint32_t {
22 UNKNOWN = 0u,
23 DEFAULT = 1u /* ::android::hardware::drm::V1_4::LogPriority.UNKNOWN implicitly + 1 */,
24 VERBOSE = 2u /* ::android::hardware::drm::V1_4::LogPriority.DEFAULT implicitly + 1 */,
25 DEBUG = 3u /* ::android::hardware::drm::V1_4::LogPriority.VERBOSE implicitly + 1 */,
26 INFO = 4u /* ::android::hardware::drm::V1_4::LogPriority.DEBUG implicitly + 1 */,
27 WARN = 5u /* ::android::hardware::drm::V1_4::LogPriority.INFO implicitly + 1 */,
28 ERROR = 6u /* ::android::hardware::drm::V1_4::LogPriority.WARN implicitly + 1 */,
29 FATAL = 7u /* ::android::hardware::drm::V1_4::LogPriority.ERROR implicitly + 1 */,
30 };
31
32 /**
33 * Returned by getLogMessages to report error diagnostics to the
34 * app.
35 *
36 * The |message| field is for informational purposes only, and
37 * NOT meant to be parsed programmatically when handling errors.
38 * For programmatic error handling, please check the return |Status|
39 * of APIs instead.
40 */
41 struct LogMessage final {
42 /**
43 * Epoch time in milliseconds.
44 */
45 int64_t timeMs __attribute__ ((aligned(8)));
46 ::android::hardware::drm::V1_4::LogPriority priority __attribute__ ((aligned(4)));
47 ::android::hardware::hidl_string message __attribute__ ((aligned(8)));
48 };
49
50 static_assert(offsetof(::android::hardware::drm::V1_4::LogMessage, timeMs) == 0, "wrong offset");
51 static_assert(offsetof(::android::hardware::drm::V1_4::LogMessage, priority) == 8, "wrong offset");
52 static_assert(offsetof(::android::hardware::drm::V1_4::LogMessage, message) == 16, "wrong offset");
53 static_assert(sizeof(::android::hardware::drm::V1_4::LogMessage) == 32, "wrong size");
54 static_assert(__alignof(::android::hardware::drm::V1_4::LogMessage) == 8, "wrong alignment");
55
56 enum class Status : uint32_t {
57 /**
58 * The DRM plugin must return OK when an operation completes without any
59 * errors.
60 */
61 OK = 0u,
62 /**
63 * The DRM plugin must return ERROR_DRM_NO_LICENSE, when decryption is
64 * attempted and no license keys have been provided.
65 */
66 ERROR_DRM_NO_LICENSE = 1u /* ::android::hardware::drm::V1_0::Status.OK implicitly + 1 */,
67 /**
68 * ERROR_DRM_LICENSE_EXPIRED must be returned when an attempt is made
69 * to use a license and the keys in that license have expired.
70 */
71 ERROR_DRM_LICENSE_EXPIRED = 2u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_NO_LICENSE implicitly + 1 */,
72 /**
73 * The DRM plugin must return ERROR_DRM_SESSION_NOT_OPENED when an
74 * attempt is made to use a session that has not been opened.
75 */
76 ERROR_DRM_SESSION_NOT_OPENED = 3u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_LICENSE_EXPIRED implicitly + 1 */,
77 /**
78 * The DRM plugin must return ERROR_DRM_CANNOT_HANDLE when an unsupported
79 * data format or operation is attempted.
80 */
81 ERROR_DRM_CANNOT_HANDLE = 4u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_SESSION_NOT_OPENED implicitly + 1 */,
82 /**
83 * ERROR_DRM_INVALID_STATE must be returned when the device is in a state
84 * where it is not able to perform decryption.
85 */
86 ERROR_DRM_INVALID_STATE = 5u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_CANNOT_HANDLE implicitly + 1 */,
87 /**
88 * The DRM plugin must return BAD_VALUE whenever an illegal parameter is
89 * passed to one of the interface functions.
90 */
91 BAD_VALUE = 6u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_INVALID_STATE implicitly + 1 */,
92 /**
93 * The DRM plugin must return ERROR_DRM_NOT_PROVISIONED from getKeyRequest,
94 * openSession or provideKeyResponse when the device has not yet been
95 * provisioned.
96 */
97 ERROR_DRM_NOT_PROVISIONED = 7u /* ::android::hardware::drm::V1_0::Status.BAD_VALUE implicitly + 1 */,
98 /**
99 * ERROR_DRM_RESOURCE_BUSY must be returned when resources, such as drm
100 * sessions or secure buffers are not available to perform a requested
101 * operation because they are already in use.
102 */
103 ERROR_DRM_RESOURCE_BUSY = 8u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_NOT_PROVISIONED implicitly + 1 */,
104 /**
105 * The DRM Plugin must return ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION
106 * when the output protection level enabled on the device is not
107 * sufficient to meet the requirements in the license policy. HDCP is an
108 * example of a form of output protection.
109 */
110 ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION = 9u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_RESOURCE_BUSY implicitly + 1 */,
111 /**
112 * The DRM Plugin must return ERROR_DRM_DEVICE_REVOKED from
113 * provideProvisionResponse and provideKeyResponse if the response indicates
114 * that the device has been revoked. Device revocation means that the device
115 * is no longer permitted to play content.
116 */
117 ERROR_DRM_DEVICE_REVOKED = 10u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION implicitly + 1 */,
118 /**
119 * The DRM Plugin must return ERROR_DRM_DECRYPT if the CryptoPlugin
120 * decrypt operation fails.
121 */
122 ERROR_DRM_DECRYPT = 11u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_DEVICE_REVOKED implicitly + 1 */,
123 /**
124 * ERROR_DRM_UNKNOWN must be returned when a fatal failure occurs and no
125 * other defined error is appropriate.
126 */
127 ERROR_DRM_UNKNOWN = 12u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_DECRYPT implicitly + 1 */,
128 /**
129 * The drm HAL module must return ERROR_DRM_INSUFFICIENT_SECURITY
130 * from the crypto plugin decrypt method when the security level
131 * of the device is not sufficient to meet the requirements in the
132 * license policy.
133 */
134 ERROR_DRM_INSUFFICIENT_SECURITY = 13u /* ::android::hardware::drm::V1_0::Status.ERROR_DRM_UNKNOWN implicitly + 1 */,
135 /**
136 * The drm HAL module must return ERROR_FRAME_TOO_LARGE from the
137 * decrypt method when the frame being decrypted into the secure
138 * output buffer exceeds the size of the buffer.
139 */
140 ERROR_DRM_FRAME_TOO_LARGE = 14u /* ::android::hardware::drm::V1_2::Status.ERROR_DRM_INSUFFICIENT_SECURITY implicitly + 1 */,
141 /**
142 * This error must be returned from any session method when an
143 * attempt is made to use the session after the crypto hardware
144 * state has been invalidated. Some devices are not able to
145 * retain crypto session state across device suspend/resume which
146 * results in invalid session state.
147 */
148 ERROR_DRM_SESSION_LOST_STATE = 15u /* ::android::hardware::drm::V1_2::Status.ERROR_DRM_FRAME_TOO_LARGE implicitly + 1 */,
149 /**
150 * The drm HAL module must return this error if client
151 * applications using the hal are temporarily exceeding the
152 * capacity of available crypto resources such that a retry of
153 * the operation is likely to succeed.
154 */
155 ERROR_DRM_RESOURCE_CONTENTION = 16u /* ::android::hardware::drm::V1_2::Status.ERROR_DRM_SESSION_LOST_STATE implicitly + 1 */,
156 /**
157 * queueSecureInput buffer called with 0 subsamples.
158 */
159 CANNOT_DECRYPT_ZERO_SUBSAMPLES = 17u /* ::android::hardware::drm::V1_2::Status.ERROR_DRM_RESOURCE_CONTENTION implicitly + 1 */,
160 /**
161 * An error happened within the crypto library used by the drm plugin.
162 */
163 CRYPTO_LIBRARY_ERROR = 18u /* ::android::hardware::drm::V1_4::Status.CANNOT_DECRYPT_ZERO_SUBSAMPLES implicitly + 1 */,
164 /**
165 * Non-specific error reported by the device OEM subsystem.
166 */
167 GENERAL_OEM_ERROR = 19u /* ::android::hardware::drm::V1_4::Status.CRYPTO_LIBRARY_ERROR implicitly + 1 */,
168 /**
169 * Unexpected internal failure in the drm/crypto plugin.
170 */
171 GENERAL_PLUGIN_ERROR = 20u /* ::android::hardware::drm::V1_4::Status.GENERAL_OEM_ERROR implicitly + 1 */,
172 /**
173 * The init data parameter passed to getKeyRequest is empty or invalid.
174 */
175 INIT_DATA_INVALID = 21u /* ::android::hardware::drm::V1_4::Status.GENERAL_PLUGIN_ERROR implicitly + 1 */,
176 /**
177 * Either the key was not loaded from the license before attempting the
178 * operation, or the key ID parameter provided by the app is incorrect.
179 */
180 KEY_NOT_LOADED = 22u /* ::android::hardware::drm::V1_4::Status.INIT_DATA_INVALID implicitly + 1 */,
181 /**
182 * The license response was empty, fields are missing or otherwise unable
183 * to be parsed.
184 */
185 LICENSE_PARSE_ERROR = 23u /* ::android::hardware::drm::V1_4::Status.KEY_NOT_LOADED implicitly + 1 */,
186 /**
187 * The operation (e.g. to renew or persist a license) is prohibited by the
188 * license policy.
189 */
190 LICENSE_POLICY_ERROR = 24u /* ::android::hardware::drm::V1_4::Status.LICENSE_PARSE_ERROR implicitly + 1 */,
191 /**
192 * Failed to generate a release request because a field in the stored
193 * license is empty or malformed.
194 */
195 LICENSE_RELEASE_ERROR = 25u /* ::android::hardware::drm::V1_4::Status.LICENSE_POLICY_ERROR implicitly + 1 */,
196 /**
197 * The license server detected an error in the license request.
198 */
199 LICENSE_REQUEST_REJECTED = 26u /* ::android::hardware::drm::V1_4::Status.LICENSE_RELEASE_ERROR implicitly + 1 */,
200 /**
201 * Failed to restore an offline license because a field is empty or
202 * malformed.
203 */
204 LICENSE_RESTORE_ERROR = 27u /* ::android::hardware::drm::V1_4::Status.LICENSE_REQUEST_REJECTED implicitly + 1 */,
205 /**
206 * License is in an invalid state for the attempted operation.
207 */
208 LICENSE_STATE_ERROR = 28u /* ::android::hardware::drm::V1_4::Status.LICENSE_RESTORE_ERROR implicitly + 1 */,
209 /**
210 * Certificate is malformed or is of the wrong type.
211 */
212 MALFORMED_CERTIFICATE = 29u /* ::android::hardware::drm::V1_4::Status.LICENSE_STATE_ERROR implicitly + 1 */,
213 /**
214 * Failure in the media framework.
215 */
216 MEDIA_FRAMEWORK_ERROR = 30u /* ::android::hardware::drm::V1_4::Status.MALFORMED_CERTIFICATE implicitly + 1 */,
217 /**
218 * Certificate has not been set.
219 */
220 MISSING_CERTIFICATE = 31u /* ::android::hardware::drm::V1_4::Status.MEDIA_FRAMEWORK_ERROR implicitly + 1 */,
221 /**
222 * There was an error loading the provisioned certificate.
223 */
224 PROVISIONING_CERTIFICATE_ERROR = 32u /* ::android::hardware::drm::V1_4::Status.MISSING_CERTIFICATE implicitly + 1 */,
225 /**
226 * Required steps where not performed before provisioning was attempted.
227 */
228 PROVISIONING_CONFIGURATION_ERROR = 33u /* ::android::hardware::drm::V1_4::Status.PROVISIONING_CERTIFICATE_ERROR implicitly + 1 */,
229 /**
230 * The provisioning response was empty, fields are missing or otherwise
231 * unable to be parsed.
232 */
233 PROVISIONING_PARSE_ERROR = 34u /* ::android::hardware::drm::V1_4::Status.PROVISIONING_CONFIGURATION_ERROR implicitly + 1 */,
234 /**
235 * The provisioning server detected an error in the provisioning request.
236 */
237 PROVISIONING_REQUEST_REJECTED = 35u /* ::android::hardware::drm::V1_4::Status.PROVISIONING_PARSE_ERROR implicitly + 1 */,
238 /**
239 * Provisioning failed in a way that is likely to succeed on a subsequent
240 * attempt.
241 */
242 RETRYABLE_PROVISIONING_ERROR = 36u /* ::android::hardware::drm::V1_4::Status.PROVISIONING_REQUEST_REJECTED implicitly + 1 */,
243 /**
244 * Failed to generate a secure stop request because a field in the stored
245 * license is empty or malformed.
246 */
247 SECURE_STOP_RELEASE_ERROR = 37u /* ::android::hardware::drm::V1_4::Status.RETRYABLE_PROVISIONING_ERROR implicitly + 1 */,
248 /**
249 * The plugin was unable to read data from the filesystem.
250 */
251 STORAGE_READ_FAILURE = 38u /* ::android::hardware::drm::V1_4::Status.SECURE_STOP_RELEASE_ERROR implicitly + 1 */,
252 /**
253 * The plugin was unable to write data to the filesystem.
254 */
255 STORAGE_WRITE_FAILURE = 39u /* ::android::hardware::drm::V1_4::Status.STORAGE_READ_FAILURE implicitly + 1 */,
256 };
257
258 //
259 // type declarations for package
260 //
261
262 template<typename>
263 static inline std::string toString(uint32_t o);
264 static inline std::string toString(::android::hardware::drm::V1_4::LogPriority o);
265 static inline void PrintTo(::android::hardware::drm::V1_4::LogPriority o, ::std::ostream* os);
266 constexpr uint32_t operator|(const ::android::hardware::drm::V1_4::LogPriority lhs, const ::android::hardware::drm::V1_4::LogPriority rhs) {
267 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
268 }
269 constexpr uint32_t operator|(const uint32_t lhs, const ::android::hardware::drm::V1_4::LogPriority rhs) {
270 return static_cast<uint32_t>(lhs | static_cast<uint32_t>(rhs));
271 }
272 constexpr uint32_t operator|(const ::android::hardware::drm::V1_4::LogPriority lhs, const uint32_t rhs) {
273 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | rhs);
274 }
275 constexpr uint32_t operator&(const ::android::hardware::drm::V1_4::LogPriority lhs, const ::android::hardware::drm::V1_4::LogPriority rhs) {
276 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
277 }
278 constexpr uint32_t operator&(const uint32_t lhs, const ::android::hardware::drm::V1_4::LogPriority rhs) {
279 return static_cast<uint32_t>(lhs & static_cast<uint32_t>(rhs));
280 }
281 constexpr uint32_t operator&(const ::android::hardware::drm::V1_4::LogPriority lhs, const uint32_t rhs) {
282 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & rhs);
283 }
284 constexpr uint32_t &operator|=(uint32_t& v, const ::android::hardware::drm::V1_4::LogPriority e) {
285 v |= static_cast<uint32_t>(e);
286 return v;
287 }
288 constexpr uint32_t &operator&=(uint32_t& v, const ::android::hardware::drm::V1_4::LogPriority e) {
289 v &= static_cast<uint32_t>(e);
290 return v;
291 }
292
293 static inline std::string toString(const ::android::hardware::drm::V1_4::LogMessage& o);
294 static inline void PrintTo(const ::android::hardware::drm::V1_4::LogMessage& o, ::std::ostream*);
295 static inline bool operator==(const ::android::hardware::drm::V1_4::LogMessage& lhs, const ::android::hardware::drm::V1_4::LogMessage& rhs);
296 static inline bool operator!=(const ::android::hardware::drm::V1_4::LogMessage& lhs, const ::android::hardware::drm::V1_4::LogMessage& rhs);
297
298 template<typename>
299 static inline std::string toString(uint32_t o);
300 static inline std::string toString(::android::hardware::drm::V1_4::Status o);
301 static inline void PrintTo(::android::hardware::drm::V1_4::Status o, ::std::ostream* os);
302 constexpr uint32_t operator|(const ::android::hardware::drm::V1_4::Status lhs, const ::android::hardware::drm::V1_4::Status rhs) {
303 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
304 }
305 constexpr uint32_t operator|(const uint32_t lhs, const ::android::hardware::drm::V1_4::Status rhs) {
306 return static_cast<uint32_t>(lhs | static_cast<uint32_t>(rhs));
307 }
308 constexpr uint32_t operator|(const ::android::hardware::drm::V1_4::Status lhs, const uint32_t rhs) {
309 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | rhs);
310 }
311 constexpr uint32_t operator&(const ::android::hardware::drm::V1_4::Status lhs, const ::android::hardware::drm::V1_4::Status rhs) {
312 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
313 }
314 constexpr uint32_t operator&(const uint32_t lhs, const ::android::hardware::drm::V1_4::Status rhs) {
315 return static_cast<uint32_t>(lhs & static_cast<uint32_t>(rhs));
316 }
317 constexpr uint32_t operator&(const ::android::hardware::drm::V1_4::Status lhs, const uint32_t rhs) {
318 return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & rhs);
319 }
320 constexpr uint32_t &operator|=(uint32_t& v, const ::android::hardware::drm::V1_4::Status e) {
321 v |= static_cast<uint32_t>(e);
322 return v;
323 }
324 constexpr uint32_t &operator&=(uint32_t& v, const ::android::hardware::drm::V1_4::Status e) {
325 v &= static_cast<uint32_t>(e);
326 return v;
327 }
328
329 //
330 // type header definitions for package
331 //
332
333 template<>
334 inline std::string toString<::android::hardware::drm::V1_4::LogPriority>(uint32_t o) {
335 using ::android::hardware::details::toHexString;
336 std::string os;
337 ::android::hardware::hidl_bitfield<::android::hardware::drm::V1_4::LogPriority> flipped = 0;
338 bool first = true;
339 if ((o & ::android::hardware::drm::V1_4::LogPriority::UNKNOWN) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::UNKNOWN)) {
340 os += (first ? "" : " | ");
341 os += "UNKNOWN";
342 first = false;
343 flipped |= ::android::hardware::drm::V1_4::LogPriority::UNKNOWN;
344 }
345 if ((o & ::android::hardware::drm::V1_4::LogPriority::DEFAULT) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::DEFAULT)) {
346 os += (first ? "" : " | ");
347 os += "DEFAULT";
348 first = false;
349 flipped |= ::android::hardware::drm::V1_4::LogPriority::DEFAULT;
350 }
351 if ((o & ::android::hardware::drm::V1_4::LogPriority::VERBOSE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::VERBOSE)) {
352 os += (first ? "" : " | ");
353 os += "VERBOSE";
354 first = false;
355 flipped |= ::android::hardware::drm::V1_4::LogPriority::VERBOSE;
356 }
357 if ((o & ::android::hardware::drm::V1_4::LogPriority::DEBUG) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::DEBUG)) {
358 os += (first ? "" : " | ");
359 os += "DEBUG";
360 first = false;
361 flipped |= ::android::hardware::drm::V1_4::LogPriority::DEBUG;
362 }
363 if ((o & ::android::hardware::drm::V1_4::LogPriority::INFO) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::INFO)) {
364 os += (first ? "" : " | ");
365 os += "INFO";
366 first = false;
367 flipped |= ::android::hardware::drm::V1_4::LogPriority::INFO;
368 }
369 if ((o & ::android::hardware::drm::V1_4::LogPriority::WARN) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::WARN)) {
370 os += (first ? "" : " | ");
371 os += "WARN";
372 first = false;
373 flipped |= ::android::hardware::drm::V1_4::LogPriority::WARN;
374 }
375 if ((o & ::android::hardware::drm::V1_4::LogPriority::ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::ERROR)) {
376 os += (first ? "" : " | ");
377 os += "ERROR";
378 first = false;
379 flipped |= ::android::hardware::drm::V1_4::LogPriority::ERROR;
380 }
381 if ((o & ::android::hardware::drm::V1_4::LogPriority::FATAL) == static_cast<uint32_t>(::android::hardware::drm::V1_4::LogPriority::FATAL)) {
382 os += (first ? "" : " | ");
383 os += "FATAL";
384 first = false;
385 flipped |= ::android::hardware::drm::V1_4::LogPriority::FATAL;
386 }
387 if (o != flipped) {
388 os += (first ? "" : " | ");
389 os += toHexString(o & (~flipped));
390 }os += " (";
391 os += toHexString(o);
392 os += ")";
393 return os;
394 }
395
toString(::android::hardware::drm::V1_4::LogPriority o)396 static inline std::string toString(::android::hardware::drm::V1_4::LogPriority o) {
397 using ::android::hardware::details::toHexString;
398 if (o == ::android::hardware::drm::V1_4::LogPriority::UNKNOWN) {
399 return "UNKNOWN";
400 }
401 if (o == ::android::hardware::drm::V1_4::LogPriority::DEFAULT) {
402 return "DEFAULT";
403 }
404 if (o == ::android::hardware::drm::V1_4::LogPriority::VERBOSE) {
405 return "VERBOSE";
406 }
407 if (o == ::android::hardware::drm::V1_4::LogPriority::DEBUG) {
408 return "DEBUG";
409 }
410 if (o == ::android::hardware::drm::V1_4::LogPriority::INFO) {
411 return "INFO";
412 }
413 if (o == ::android::hardware::drm::V1_4::LogPriority::WARN) {
414 return "WARN";
415 }
416 if (o == ::android::hardware::drm::V1_4::LogPriority::ERROR) {
417 return "ERROR";
418 }
419 if (o == ::android::hardware::drm::V1_4::LogPriority::FATAL) {
420 return "FATAL";
421 }
422 std::string os;
423 os += toHexString(static_cast<uint32_t>(o));
424 return os;
425 }
426
PrintTo(::android::hardware::drm::V1_4::LogPriority o,::std::ostream * os)427 static inline void PrintTo(::android::hardware::drm::V1_4::LogPriority o, ::std::ostream* os) {
428 *os << toString(o);
429 }
430
toString(const::android::hardware::drm::V1_4::LogMessage & o)431 static inline std::string toString(const ::android::hardware::drm::V1_4::LogMessage& o) {
432 using ::android::hardware::toString;
433 std::string os;
434 os += "{";
435 os += ".timeMs = ";
436 os += ::android::hardware::toString(o.timeMs);
437 os += ", .priority = ";
438 os += ::android::hardware::drm::V1_4::toString(o.priority);
439 os += ", .message = ";
440 os += ::android::hardware::toString(o.message);
441 os += "}"; return os;
442 }
443
PrintTo(const::android::hardware::drm::V1_4::LogMessage & o,::std::ostream * os)444 static inline void PrintTo(const ::android::hardware::drm::V1_4::LogMessage& o, ::std::ostream* os) {
445 *os << toString(o);
446 }
447
448 static inline bool operator==(const ::android::hardware::drm::V1_4::LogMessage& lhs, const ::android::hardware::drm::V1_4::LogMessage& rhs) {
449 if (lhs.timeMs != rhs.timeMs) {
450 return false;
451 }
452 if (lhs.priority != rhs.priority) {
453 return false;
454 }
455 if (lhs.message != rhs.message) {
456 return false;
457 }
458 return true;
459 }
460
461 static inline bool operator!=(const ::android::hardware::drm::V1_4::LogMessage& lhs, const ::android::hardware::drm::V1_4::LogMessage& rhs){
462 return !(lhs == rhs);
463 }
464
465 template<>
466 inline std::string toString<::android::hardware::drm::V1_4::Status>(uint32_t o) {
467 using ::android::hardware::details::toHexString;
468 std::string os;
469 ::android::hardware::hidl_bitfield<::android::hardware::drm::V1_4::Status> flipped = 0;
470 bool first = true;
471 if ((o & ::android::hardware::drm::V1_4::Status::OK) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::OK)) {
472 os += (first ? "" : " | ");
473 os += "OK";
474 first = false;
475 flipped |= ::android::hardware::drm::V1_4::Status::OK;
476 }
477 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_NO_LICENSE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_NO_LICENSE)) {
478 os += (first ? "" : " | ");
479 os += "ERROR_DRM_NO_LICENSE";
480 first = false;
481 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_NO_LICENSE;
482 }
483 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_LICENSE_EXPIRED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_LICENSE_EXPIRED)) {
484 os += (first ? "" : " | ");
485 os += "ERROR_DRM_LICENSE_EXPIRED";
486 first = false;
487 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_LICENSE_EXPIRED;
488 }
489 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_NOT_OPENED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_NOT_OPENED)) {
490 os += (first ? "" : " | ");
491 os += "ERROR_DRM_SESSION_NOT_OPENED";
492 first = false;
493 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_NOT_OPENED;
494 }
495 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_CANNOT_HANDLE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_CANNOT_HANDLE)) {
496 os += (first ? "" : " | ");
497 os += "ERROR_DRM_CANNOT_HANDLE";
498 first = false;
499 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_CANNOT_HANDLE;
500 }
501 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_INVALID_STATE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_INVALID_STATE)) {
502 os += (first ? "" : " | ");
503 os += "ERROR_DRM_INVALID_STATE";
504 first = false;
505 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_INVALID_STATE;
506 }
507 if ((o & ::android::hardware::drm::V1_4::Status::BAD_VALUE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::BAD_VALUE)) {
508 os += (first ? "" : " | ");
509 os += "BAD_VALUE";
510 first = false;
511 flipped |= ::android::hardware::drm::V1_4::Status::BAD_VALUE;
512 }
513 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_NOT_PROVISIONED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_NOT_PROVISIONED)) {
514 os += (first ? "" : " | ");
515 os += "ERROR_DRM_NOT_PROVISIONED";
516 first = false;
517 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_NOT_PROVISIONED;
518 }
519 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_BUSY) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_BUSY)) {
520 os += (first ? "" : " | ");
521 os += "ERROR_DRM_RESOURCE_BUSY";
522 first = false;
523 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_BUSY;
524 }
525 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION)) {
526 os += (first ? "" : " | ");
527 os += "ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION";
528 first = false;
529 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION;
530 }
531 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_DEVICE_REVOKED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_DEVICE_REVOKED)) {
532 os += (first ? "" : " | ");
533 os += "ERROR_DRM_DEVICE_REVOKED";
534 first = false;
535 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_DEVICE_REVOKED;
536 }
537 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_DECRYPT) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_DECRYPT)) {
538 os += (first ? "" : " | ");
539 os += "ERROR_DRM_DECRYPT";
540 first = false;
541 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_DECRYPT;
542 }
543 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_UNKNOWN) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_UNKNOWN)) {
544 os += (first ? "" : " | ");
545 os += "ERROR_DRM_UNKNOWN";
546 first = false;
547 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_UNKNOWN;
548 }
549 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_SECURITY) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_SECURITY)) {
550 os += (first ? "" : " | ");
551 os += "ERROR_DRM_INSUFFICIENT_SECURITY";
552 first = false;
553 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_SECURITY;
554 }
555 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_FRAME_TOO_LARGE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_FRAME_TOO_LARGE)) {
556 os += (first ? "" : " | ");
557 os += "ERROR_DRM_FRAME_TOO_LARGE";
558 first = false;
559 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_FRAME_TOO_LARGE;
560 }
561 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_LOST_STATE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_LOST_STATE)) {
562 os += (first ? "" : " | ");
563 os += "ERROR_DRM_SESSION_LOST_STATE";
564 first = false;
565 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_LOST_STATE;
566 }
567 if ((o & ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_CONTENTION) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_CONTENTION)) {
568 os += (first ? "" : " | ");
569 os += "ERROR_DRM_RESOURCE_CONTENTION";
570 first = false;
571 flipped |= ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_CONTENTION;
572 }
573 if ((o & ::android::hardware::drm::V1_4::Status::CANNOT_DECRYPT_ZERO_SUBSAMPLES) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::CANNOT_DECRYPT_ZERO_SUBSAMPLES)) {
574 os += (first ? "" : " | ");
575 os += "CANNOT_DECRYPT_ZERO_SUBSAMPLES";
576 first = false;
577 flipped |= ::android::hardware::drm::V1_4::Status::CANNOT_DECRYPT_ZERO_SUBSAMPLES;
578 }
579 if ((o & ::android::hardware::drm::V1_4::Status::CRYPTO_LIBRARY_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::CRYPTO_LIBRARY_ERROR)) {
580 os += (first ? "" : " | ");
581 os += "CRYPTO_LIBRARY_ERROR";
582 first = false;
583 flipped |= ::android::hardware::drm::V1_4::Status::CRYPTO_LIBRARY_ERROR;
584 }
585 if ((o & ::android::hardware::drm::V1_4::Status::GENERAL_OEM_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::GENERAL_OEM_ERROR)) {
586 os += (first ? "" : " | ");
587 os += "GENERAL_OEM_ERROR";
588 first = false;
589 flipped |= ::android::hardware::drm::V1_4::Status::GENERAL_OEM_ERROR;
590 }
591 if ((o & ::android::hardware::drm::V1_4::Status::GENERAL_PLUGIN_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::GENERAL_PLUGIN_ERROR)) {
592 os += (first ? "" : " | ");
593 os += "GENERAL_PLUGIN_ERROR";
594 first = false;
595 flipped |= ::android::hardware::drm::V1_4::Status::GENERAL_PLUGIN_ERROR;
596 }
597 if ((o & ::android::hardware::drm::V1_4::Status::INIT_DATA_INVALID) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::INIT_DATA_INVALID)) {
598 os += (first ? "" : " | ");
599 os += "INIT_DATA_INVALID";
600 first = false;
601 flipped |= ::android::hardware::drm::V1_4::Status::INIT_DATA_INVALID;
602 }
603 if ((o & ::android::hardware::drm::V1_4::Status::KEY_NOT_LOADED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::KEY_NOT_LOADED)) {
604 os += (first ? "" : " | ");
605 os += "KEY_NOT_LOADED";
606 first = false;
607 flipped |= ::android::hardware::drm::V1_4::Status::KEY_NOT_LOADED;
608 }
609 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_PARSE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_PARSE_ERROR)) {
610 os += (first ? "" : " | ");
611 os += "LICENSE_PARSE_ERROR";
612 first = false;
613 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_PARSE_ERROR;
614 }
615 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_POLICY_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_POLICY_ERROR)) {
616 os += (first ? "" : " | ");
617 os += "LICENSE_POLICY_ERROR";
618 first = false;
619 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_POLICY_ERROR;
620 }
621 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_RELEASE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_RELEASE_ERROR)) {
622 os += (first ? "" : " | ");
623 os += "LICENSE_RELEASE_ERROR";
624 first = false;
625 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_RELEASE_ERROR;
626 }
627 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_REQUEST_REJECTED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_REQUEST_REJECTED)) {
628 os += (first ? "" : " | ");
629 os += "LICENSE_REQUEST_REJECTED";
630 first = false;
631 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_REQUEST_REJECTED;
632 }
633 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_RESTORE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_RESTORE_ERROR)) {
634 os += (first ? "" : " | ");
635 os += "LICENSE_RESTORE_ERROR";
636 first = false;
637 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_RESTORE_ERROR;
638 }
639 if ((o & ::android::hardware::drm::V1_4::Status::LICENSE_STATE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::LICENSE_STATE_ERROR)) {
640 os += (first ? "" : " | ");
641 os += "LICENSE_STATE_ERROR";
642 first = false;
643 flipped |= ::android::hardware::drm::V1_4::Status::LICENSE_STATE_ERROR;
644 }
645 if ((o & ::android::hardware::drm::V1_4::Status::MALFORMED_CERTIFICATE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::MALFORMED_CERTIFICATE)) {
646 os += (first ? "" : " | ");
647 os += "MALFORMED_CERTIFICATE";
648 first = false;
649 flipped |= ::android::hardware::drm::V1_4::Status::MALFORMED_CERTIFICATE;
650 }
651 if ((o & ::android::hardware::drm::V1_4::Status::MEDIA_FRAMEWORK_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::MEDIA_FRAMEWORK_ERROR)) {
652 os += (first ? "" : " | ");
653 os += "MEDIA_FRAMEWORK_ERROR";
654 first = false;
655 flipped |= ::android::hardware::drm::V1_4::Status::MEDIA_FRAMEWORK_ERROR;
656 }
657 if ((o & ::android::hardware::drm::V1_4::Status::MISSING_CERTIFICATE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::MISSING_CERTIFICATE)) {
658 os += (first ? "" : " | ");
659 os += "MISSING_CERTIFICATE";
660 first = false;
661 flipped |= ::android::hardware::drm::V1_4::Status::MISSING_CERTIFICATE;
662 }
663 if ((o & ::android::hardware::drm::V1_4::Status::PROVISIONING_CERTIFICATE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::PROVISIONING_CERTIFICATE_ERROR)) {
664 os += (first ? "" : " | ");
665 os += "PROVISIONING_CERTIFICATE_ERROR";
666 first = false;
667 flipped |= ::android::hardware::drm::V1_4::Status::PROVISIONING_CERTIFICATE_ERROR;
668 }
669 if ((o & ::android::hardware::drm::V1_4::Status::PROVISIONING_CONFIGURATION_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::PROVISIONING_CONFIGURATION_ERROR)) {
670 os += (first ? "" : " | ");
671 os += "PROVISIONING_CONFIGURATION_ERROR";
672 first = false;
673 flipped |= ::android::hardware::drm::V1_4::Status::PROVISIONING_CONFIGURATION_ERROR;
674 }
675 if ((o & ::android::hardware::drm::V1_4::Status::PROVISIONING_PARSE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::PROVISIONING_PARSE_ERROR)) {
676 os += (first ? "" : " | ");
677 os += "PROVISIONING_PARSE_ERROR";
678 first = false;
679 flipped |= ::android::hardware::drm::V1_4::Status::PROVISIONING_PARSE_ERROR;
680 }
681 if ((o & ::android::hardware::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED)) {
682 os += (first ? "" : " | ");
683 os += "PROVISIONING_REQUEST_REJECTED";
684 first = false;
685 flipped |= ::android::hardware::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED;
686 }
687 if ((o & ::android::hardware::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR)) {
688 os += (first ? "" : " | ");
689 os += "RETRYABLE_PROVISIONING_ERROR";
690 first = false;
691 flipped |= ::android::hardware::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR;
692 }
693 if ((o & ::android::hardware::drm::V1_4::Status::SECURE_STOP_RELEASE_ERROR) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::SECURE_STOP_RELEASE_ERROR)) {
694 os += (first ? "" : " | ");
695 os += "SECURE_STOP_RELEASE_ERROR";
696 first = false;
697 flipped |= ::android::hardware::drm::V1_4::Status::SECURE_STOP_RELEASE_ERROR;
698 }
699 if ((o & ::android::hardware::drm::V1_4::Status::STORAGE_READ_FAILURE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::STORAGE_READ_FAILURE)) {
700 os += (first ? "" : " | ");
701 os += "STORAGE_READ_FAILURE";
702 first = false;
703 flipped |= ::android::hardware::drm::V1_4::Status::STORAGE_READ_FAILURE;
704 }
705 if ((o & ::android::hardware::drm::V1_4::Status::STORAGE_WRITE_FAILURE) == static_cast<uint32_t>(::android::hardware::drm::V1_4::Status::STORAGE_WRITE_FAILURE)) {
706 os += (first ? "" : " | ");
707 os += "STORAGE_WRITE_FAILURE";
708 first = false;
709 flipped |= ::android::hardware::drm::V1_4::Status::STORAGE_WRITE_FAILURE;
710 }
711 if (o != flipped) {
712 os += (first ? "" : " | ");
713 os += toHexString(o & (~flipped));
714 }os += " (";
715 os += toHexString(o);
716 os += ")";
717 return os;
718 }
719
toString(::android::hardware::drm::V1_4::Status o)720 static inline std::string toString(::android::hardware::drm::V1_4::Status o) {
721 using ::android::hardware::details::toHexString;
722 if (o == ::android::hardware::drm::V1_4::Status::OK) {
723 return "OK";
724 }
725 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_NO_LICENSE) {
726 return "ERROR_DRM_NO_LICENSE";
727 }
728 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_LICENSE_EXPIRED) {
729 return "ERROR_DRM_LICENSE_EXPIRED";
730 }
731 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_NOT_OPENED) {
732 return "ERROR_DRM_SESSION_NOT_OPENED";
733 }
734 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_CANNOT_HANDLE) {
735 return "ERROR_DRM_CANNOT_HANDLE";
736 }
737 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_INVALID_STATE) {
738 return "ERROR_DRM_INVALID_STATE";
739 }
740 if (o == ::android::hardware::drm::V1_4::Status::BAD_VALUE) {
741 return "BAD_VALUE";
742 }
743 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_NOT_PROVISIONED) {
744 return "ERROR_DRM_NOT_PROVISIONED";
745 }
746 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_BUSY) {
747 return "ERROR_DRM_RESOURCE_BUSY";
748 }
749 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION) {
750 return "ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION";
751 }
752 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_DEVICE_REVOKED) {
753 return "ERROR_DRM_DEVICE_REVOKED";
754 }
755 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_DECRYPT) {
756 return "ERROR_DRM_DECRYPT";
757 }
758 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_UNKNOWN) {
759 return "ERROR_DRM_UNKNOWN";
760 }
761 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_SECURITY) {
762 return "ERROR_DRM_INSUFFICIENT_SECURITY";
763 }
764 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_FRAME_TOO_LARGE) {
765 return "ERROR_DRM_FRAME_TOO_LARGE";
766 }
767 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_LOST_STATE) {
768 return "ERROR_DRM_SESSION_LOST_STATE";
769 }
770 if (o == ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_CONTENTION) {
771 return "ERROR_DRM_RESOURCE_CONTENTION";
772 }
773 if (o == ::android::hardware::drm::V1_4::Status::CANNOT_DECRYPT_ZERO_SUBSAMPLES) {
774 return "CANNOT_DECRYPT_ZERO_SUBSAMPLES";
775 }
776 if (o == ::android::hardware::drm::V1_4::Status::CRYPTO_LIBRARY_ERROR) {
777 return "CRYPTO_LIBRARY_ERROR";
778 }
779 if (o == ::android::hardware::drm::V1_4::Status::GENERAL_OEM_ERROR) {
780 return "GENERAL_OEM_ERROR";
781 }
782 if (o == ::android::hardware::drm::V1_4::Status::GENERAL_PLUGIN_ERROR) {
783 return "GENERAL_PLUGIN_ERROR";
784 }
785 if (o == ::android::hardware::drm::V1_4::Status::INIT_DATA_INVALID) {
786 return "INIT_DATA_INVALID";
787 }
788 if (o == ::android::hardware::drm::V1_4::Status::KEY_NOT_LOADED) {
789 return "KEY_NOT_LOADED";
790 }
791 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_PARSE_ERROR) {
792 return "LICENSE_PARSE_ERROR";
793 }
794 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_POLICY_ERROR) {
795 return "LICENSE_POLICY_ERROR";
796 }
797 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_RELEASE_ERROR) {
798 return "LICENSE_RELEASE_ERROR";
799 }
800 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_REQUEST_REJECTED) {
801 return "LICENSE_REQUEST_REJECTED";
802 }
803 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_RESTORE_ERROR) {
804 return "LICENSE_RESTORE_ERROR";
805 }
806 if (o == ::android::hardware::drm::V1_4::Status::LICENSE_STATE_ERROR) {
807 return "LICENSE_STATE_ERROR";
808 }
809 if (o == ::android::hardware::drm::V1_4::Status::MALFORMED_CERTIFICATE) {
810 return "MALFORMED_CERTIFICATE";
811 }
812 if (o == ::android::hardware::drm::V1_4::Status::MEDIA_FRAMEWORK_ERROR) {
813 return "MEDIA_FRAMEWORK_ERROR";
814 }
815 if (o == ::android::hardware::drm::V1_4::Status::MISSING_CERTIFICATE) {
816 return "MISSING_CERTIFICATE";
817 }
818 if (o == ::android::hardware::drm::V1_4::Status::PROVISIONING_CERTIFICATE_ERROR) {
819 return "PROVISIONING_CERTIFICATE_ERROR";
820 }
821 if (o == ::android::hardware::drm::V1_4::Status::PROVISIONING_CONFIGURATION_ERROR) {
822 return "PROVISIONING_CONFIGURATION_ERROR";
823 }
824 if (o == ::android::hardware::drm::V1_4::Status::PROVISIONING_PARSE_ERROR) {
825 return "PROVISIONING_PARSE_ERROR";
826 }
827 if (o == ::android::hardware::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED) {
828 return "PROVISIONING_REQUEST_REJECTED";
829 }
830 if (o == ::android::hardware::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR) {
831 return "RETRYABLE_PROVISIONING_ERROR";
832 }
833 if (o == ::android::hardware::drm::V1_4::Status::SECURE_STOP_RELEASE_ERROR) {
834 return "SECURE_STOP_RELEASE_ERROR";
835 }
836 if (o == ::android::hardware::drm::V1_4::Status::STORAGE_READ_FAILURE) {
837 return "STORAGE_READ_FAILURE";
838 }
839 if (o == ::android::hardware::drm::V1_4::Status::STORAGE_WRITE_FAILURE) {
840 return "STORAGE_WRITE_FAILURE";
841 }
842 std::string os;
843 os += toHexString(static_cast<uint32_t>(o));
844 return os;
845 }
846
PrintTo(::android::hardware::drm::V1_4::Status o,::std::ostream * os)847 static inline void PrintTo(::android::hardware::drm::V1_4::Status o, ::std::ostream* os) {
848 *os << toString(o);
849 }
850
851
852 } // namespace V1_4
853 } // namespace drm
854 } // namespace hardware
855 } // namespace android
856
857 //
858 // global type declarations for package
859 //
860
861 namespace android {
862 namespace hardware {
863 namespace details {
864 #pragma clang diagnostic push
865 #pragma clang diagnostic ignored "-Wc++17-extensions"
866 template<> inline constexpr std::array<::android::hardware::drm::V1_4::LogPriority, 8> hidl_enum_values<::android::hardware::drm::V1_4::LogPriority> = {
867 ::android::hardware::drm::V1_4::LogPriority::UNKNOWN,
868 ::android::hardware::drm::V1_4::LogPriority::DEFAULT,
869 ::android::hardware::drm::V1_4::LogPriority::VERBOSE,
870 ::android::hardware::drm::V1_4::LogPriority::DEBUG,
871 ::android::hardware::drm::V1_4::LogPriority::INFO,
872 ::android::hardware::drm::V1_4::LogPriority::WARN,
873 ::android::hardware::drm::V1_4::LogPriority::ERROR,
874 ::android::hardware::drm::V1_4::LogPriority::FATAL,
875 };
876 #pragma clang diagnostic pop
877 } // namespace details
878 } // namespace hardware
879 } // namespace android
880
881 namespace android {
882 namespace hardware {
883 namespace details {
884 #pragma clang diagnostic push
885 #pragma clang diagnostic ignored "-Wc++17-extensions"
886 template<> inline constexpr std::array<::android::hardware::drm::V1_4::Status, 40> hidl_enum_values<::android::hardware::drm::V1_4::Status> = {
887 ::android::hardware::drm::V1_4::Status::OK,
888 ::android::hardware::drm::V1_4::Status::ERROR_DRM_NO_LICENSE,
889 ::android::hardware::drm::V1_4::Status::ERROR_DRM_LICENSE_EXPIRED,
890 ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_NOT_OPENED,
891 ::android::hardware::drm::V1_4::Status::ERROR_DRM_CANNOT_HANDLE,
892 ::android::hardware::drm::V1_4::Status::ERROR_DRM_INVALID_STATE,
893 ::android::hardware::drm::V1_4::Status::BAD_VALUE,
894 ::android::hardware::drm::V1_4::Status::ERROR_DRM_NOT_PROVISIONED,
895 ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_BUSY,
896 ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION,
897 ::android::hardware::drm::V1_4::Status::ERROR_DRM_DEVICE_REVOKED,
898 ::android::hardware::drm::V1_4::Status::ERROR_DRM_DECRYPT,
899 ::android::hardware::drm::V1_4::Status::ERROR_DRM_UNKNOWN,
900 ::android::hardware::drm::V1_4::Status::ERROR_DRM_INSUFFICIENT_SECURITY,
901 ::android::hardware::drm::V1_4::Status::ERROR_DRM_FRAME_TOO_LARGE,
902 ::android::hardware::drm::V1_4::Status::ERROR_DRM_SESSION_LOST_STATE,
903 ::android::hardware::drm::V1_4::Status::ERROR_DRM_RESOURCE_CONTENTION,
904 ::android::hardware::drm::V1_4::Status::CANNOT_DECRYPT_ZERO_SUBSAMPLES,
905 ::android::hardware::drm::V1_4::Status::CRYPTO_LIBRARY_ERROR,
906 ::android::hardware::drm::V1_4::Status::GENERAL_OEM_ERROR,
907 ::android::hardware::drm::V1_4::Status::GENERAL_PLUGIN_ERROR,
908 ::android::hardware::drm::V1_4::Status::INIT_DATA_INVALID,
909 ::android::hardware::drm::V1_4::Status::KEY_NOT_LOADED,
910 ::android::hardware::drm::V1_4::Status::LICENSE_PARSE_ERROR,
911 ::android::hardware::drm::V1_4::Status::LICENSE_POLICY_ERROR,
912 ::android::hardware::drm::V1_4::Status::LICENSE_RELEASE_ERROR,
913 ::android::hardware::drm::V1_4::Status::LICENSE_REQUEST_REJECTED,
914 ::android::hardware::drm::V1_4::Status::LICENSE_RESTORE_ERROR,
915 ::android::hardware::drm::V1_4::Status::LICENSE_STATE_ERROR,
916 ::android::hardware::drm::V1_4::Status::MALFORMED_CERTIFICATE,
917 ::android::hardware::drm::V1_4::Status::MEDIA_FRAMEWORK_ERROR,
918 ::android::hardware::drm::V1_4::Status::MISSING_CERTIFICATE,
919 ::android::hardware::drm::V1_4::Status::PROVISIONING_CERTIFICATE_ERROR,
920 ::android::hardware::drm::V1_4::Status::PROVISIONING_CONFIGURATION_ERROR,
921 ::android::hardware::drm::V1_4::Status::PROVISIONING_PARSE_ERROR,
922 ::android::hardware::drm::V1_4::Status::PROVISIONING_REQUEST_REJECTED,
923 ::android::hardware::drm::V1_4::Status::RETRYABLE_PROVISIONING_ERROR,
924 ::android::hardware::drm::V1_4::Status::SECURE_STOP_RELEASE_ERROR,
925 ::android::hardware::drm::V1_4::Status::STORAGE_READ_FAILURE,
926 ::android::hardware::drm::V1_4::Status::STORAGE_WRITE_FAILURE,
927 };
928 #pragma clang diagnostic pop
929 } // namespace details
930 } // namespace hardware
931 } // namespace android
932
933
934 #endif // HIDL_GENERATED_ANDROID_HARDWARE_DRM_V1_4_TYPES_H
935