OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
xhwang
2015/01/02 21:55:07
Happy new year!
jrummell
2015/01/05 22:17:59
Thanks. Same to you.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_CDM_KEY_INFORMATION_H_ | |
6 #define MEDIA_BASE_CDM_KEY_INFORMATION_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "media/base/media_export.h" | |
13 | |
14 namespace media { | |
15 | |
16 class MEDIA_EXPORT CdmKeyInformation { | |
xhwang
2015/01/02 21:55:07
It seems this can be a struct, then you don't need
jrummell
2015/01/05 22:17:59
Done.
| |
17 public: | |
18 enum KeyStatus { | |
19 USABLE = 0, | |
20 INTERNAL_ERROR = 1, | |
21 EXPIRED = 2, | |
22 OUTPUT_NOT_ALLOWED = 3 | |
23 }; | |
24 | |
25 CdmKeyInformation(const std::string& key_id, | |
26 KeyStatus status, | |
27 uint32 system_code); | |
28 CdmKeyInformation(const uint8* key_id_data, | |
29 uint32 key_id_length, | |
30 KeyStatus status, | |
31 uint32 system_code); | |
xhwang
2015/01/02 21:55:07
See comment below, you don't need a version of cto
jrummell
2015/01/05 22:17:59
Simplified to a struct.
| |
32 virtual ~CdmKeyInformation(); | |
xhwang
2015/01/02 21:55:07
It seems this is not a base class - no need to use
jrummell
2015/01/05 22:17:59
Done.
| |
33 | |
34 const std::vector<uint8>& KeyId() const { return key_id_; } | |
35 KeyStatus Status() const { return status_; } | |
36 uint32 SystemCode() const { return system_code_; } | |
xhwang
2015/01/02 21:55:07
For accessor, use key_id()/status()/system_code().
jrummell
2015/01/05 22:17:59
Not needed now that this is a struct.
| |
37 | |
38 private: | |
39 std::vector<uint8> key_id_; | |
40 KeyStatus status_; | |
41 uint32 system_code_; | |
xhwang
2015/01/02 21:55:07
If you have only one ctor that takes std::vector<u
jrummell
2015/01/05 22:17:59
Now a struct.
| |
42 }; | |
43 | |
44 } // namespace media | |
45 | |
46 #endif // MEDIA_BASE_CDM_KEY_INFORMATION_H_ | |
OLD | NEW |