| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_CDM_KEY_INFORMATION_H_ | 5 #ifndef MEDIA_BASE_CDM_KEY_INFORMATION_H_ |
| 6 #define MEDIA_BASE_CDM_KEY_INFORMATION_H_ | 6 #define MEDIA_BASE_CDM_KEY_INFORMATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | |
| 12 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 13 | 12 |
| 14 namespace media { | 13 namespace media { |
| 15 | 14 |
| 16 struct MEDIA_EXPORT CdmKeyInformation { | 15 struct MEDIA_EXPORT CdmKeyInformation { |
| 17 enum KeyStatus { | 16 enum KeyStatus { |
| 18 USABLE = 0, | 17 USABLE = 0, |
| 19 INTERNAL_ERROR = 1, | 18 INTERNAL_ERROR = 1, |
| 20 EXPIRED = 2, | 19 EXPIRED = 2, |
| 21 OUTPUT_RESTRICTED = 3, | 20 OUTPUT_RESTRICTED = 3, |
| 22 OUTPUT_DOWNSCALED = 4, | 21 OUTPUT_DOWNSCALED = 4, |
| 23 KEY_STATUS_PENDING = 5, | 22 KEY_STATUS_PENDING = 5, |
| 24 RELEASED = 6, | 23 RELEASED = 6, |
| 25 KEY_STATUS_MAX = RELEASED | 24 KEY_STATUS_MAX = RELEASED |
| 26 }; | 25 }; |
| 27 | 26 |
| 28 // Default constructor needed for passing this type through IPC. Regular | 27 // Default constructor needed for passing this type through IPC. Regular |
| 29 // code should use one of the other constructors. | 28 // code should use one of the other constructors. |
| 30 CdmKeyInformation(); | 29 CdmKeyInformation(); |
| 31 CdmKeyInformation(const std::vector<uint8>& key_id, | 30 CdmKeyInformation(const std::vector<uint8_t>& key_id, |
| 32 KeyStatus status, | 31 KeyStatus status, |
| 33 uint32 system_code); | 32 uint32_t system_code); |
| 34 CdmKeyInformation(const std::string& key_id, | 33 CdmKeyInformation(const std::string& key_id, |
| 35 KeyStatus status, | 34 KeyStatus status, |
| 36 uint32 system_code); | 35 uint32_t system_code); |
| 37 CdmKeyInformation(const uint8* key_id_data, | 36 CdmKeyInformation(const uint8_t* key_id_data, |
| 38 size_t key_id_length, | 37 size_t key_id_length, |
| 39 KeyStatus status, | 38 KeyStatus status, |
| 40 uint32 system_code); | 39 uint32_t system_code); |
| 41 ~CdmKeyInformation(); | 40 ~CdmKeyInformation(); |
| 42 | 41 |
| 43 std::vector<uint8> key_id; | 42 std::vector<uint8_t> key_id; |
| 44 KeyStatus status; | 43 KeyStatus status; |
| 45 uint32 system_code; | 44 uint32_t system_code; |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 } // namespace media | 47 } // namespace media |
| 49 | 48 |
| 50 #endif // MEDIA_BASE_CDM_KEY_INFORMATION_H_ | 49 #endif // MEDIA_BASE_CDM_KEY_INFORMATION_H_ |
| OLD | NEW |