Chromium Code Reviews| Index: media/base/cdm_key_information.h |
| diff --git a/media/base/cdm_key_information.h b/media/base/cdm_key_information.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bc80072d674c2492b82432239cc7102f29d5e048 |
| --- /dev/null |
| +++ b/media/base/cdm_key_information.h |
| @@ -0,0 +1,46 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_BASE_CDM_KEY_INFORMATION_H_ |
| +#define MEDIA_BASE_CDM_KEY_INFORMATION_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "media/base/media_export.h" |
| + |
| +namespace media { |
| + |
| +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.
|
| + public: |
| + enum KeyStatus { |
| + USABLE = 0, |
| + INTERNAL_ERROR = 1, |
| + EXPIRED = 2, |
| + OUTPUT_NOT_ALLOWED = 3 |
| + }; |
| + |
| + CdmKeyInformation(const std::string& key_id, |
| + KeyStatus status, |
| + uint32 system_code); |
| + CdmKeyInformation(const uint8* key_id_data, |
| + uint32 key_id_length, |
| + KeyStatus status, |
| + 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.
|
| + 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.
|
| + |
| + const std::vector<uint8>& KeyId() const { return key_id_; } |
| + KeyStatus Status() const { return status_; } |
| + 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.
|
| + |
| + private: |
| + std::vector<uint8> key_id_; |
| + KeyStatus status_; |
| + 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.
|
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_CDM_KEY_INFORMATION_H_ |