OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PROXIMITY_AUTH_MESSENGER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_H |
7 | 7 |
8 namespace cryptauth { | 8 namespace cryptauth { |
9 class SecureContext; | 9 class SecureContext; |
10 } | 10 } |
(...skipping 24 matching lines...) Expand all Loading... |
35 // TODO(isherman): Add params for the RSA private key and crypto delegate. | 35 // TODO(isherman): Add params for the RSA private key and crypto delegate. |
36 virtual void RequestDecryption(const std::string& challenge) = 0; | 36 virtual void RequestDecryption(const std::string& challenge) = 0; |
37 | 37 |
38 // Sends a simple request to the remote device to unlock the screen. | 38 // Sends a simple request to the remote device to unlock the screen. |
39 // OnUnlockResponse is called for each observer when the response is returned. | 39 // OnUnlockResponse is called for each observer when the response is returned. |
40 virtual void RequestUnlock() = 0; | 40 virtual void RequestUnlock() = 0; |
41 | 41 |
42 // Returns the SecureContext instance used by the messenger. Ownership of the | 42 // Returns the SecureContext instance used by the messenger. Ownership of the |
43 // SecureContext is not passed. | 43 // SecureContext is not passed. |
44 virtual cryptauth::SecureContext* GetSecureContext() const = 0; | 44 virtual cryptauth::SecureContext* GetSecureContext() const = 0; |
| 45 |
| 46 // Returns the underlying raw connection. Note that you should use |
| 47 // |GetSecureContext()| instead if you want to send and receive messages |
| 48 // securely. |
| 49 virtual cryptauth::Connection* GetConnection() const = 0; |
45 }; | 50 }; |
46 | 51 |
47 } // namespace proximity_auth | 52 } // namespace proximity_auth |
48 | 53 |
49 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_H | 54 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_H |
OLD | NEW |