OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
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_CRYPTO_DECRYPTOR_CLIENT_H_ | |
6 #define MEDIA_CRYPTO_DECRYPTOR_CLIENT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "media/crypto/aes_decryptor.h" | |
12 | |
13 namespace media { | |
14 | |
15 // Interface used by a decryptor to fire key events. | |
16 // See: http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted- media.html#event-summary | |
17 class DecryptorClient { | |
18 public: | |
19 virtual ~DecryptorClient() {} | |
ddorwin
2012/06/11 21:02:40
You can make this private (and non-virtual) and pr
xhwang
2012/06/12 19:01:15
Good to know! Done.
| |
20 | |
21 virtual void KeyAdded(const std::string& key_system, | |
scherkus (not reviewing)
2012/06/12 03:15:58
docs everywhere
xhwang
2012/06/12 19:01:15
Done.
| |
22 const std::string& session_id) = 0; | |
23 | |
24 // Signals that a key error happened. The |system_code| is key system | |
25 // dependent. For clear key system, the |system_code| is always zero. | |
26 virtual void KeyError(const std::string& key_system, | |
27 const std::string& session_id, | |
28 AesDecryptor::KeyError error_code, | |
29 int system_code) = 0; | |
30 | |
31 virtual void KeyMessage(const std::string& key_system, | |
32 const std::string& session_id, | |
33 scoped_array<uint8> message, | |
34 int message_length, | |
35 const std::string& default_url) = 0; | |
36 | |
37 virtual void KeyNeeded(const std::string& key_system, | |
ddorwin
2012/06/11 21:02:40
The proposal uses NeedKey.
xhwang
2012/06/12 19:01:15
Done.
| |
38 const std::string& session_id, | |
39 scoped_array<uint8> init_data, | |
40 int init_data_length) = 0; | |
41 }; | |
42 | |
43 } // namespace media | |
44 | |
45 #endif // MEDIA_CRYPTO_DECRYPTOR_CLIENT_H_ | |
OLD | NEW |