| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 6 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 bool result, | 48 bool result, |
| 49 const std::string& data)> DataMethodCallback; | 49 const std::string& data)> DataMethodCallback; |
| 50 | 50 |
| 51 virtual ~CryptohomeClient(); | 51 virtual ~CryptohomeClient(); |
| 52 | 52 |
| 53 // Factory function, creates a new instance and returns ownership. | 53 // Factory function, creates a new instance and returns ownership. |
| 54 // For normal usage, access the singleton via DBusThreadManager::Get(). | 54 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 55 static CryptohomeClient* Create(DBusClientImplementationType type, | 55 static CryptohomeClient* Create(DBusClientImplementationType type, |
| 56 dbus::Bus* bus); | 56 dbus::Bus* bus); |
| 57 | 57 |
| 58 // Returns the sanitized |username| that the stub implementation would return. |
| 59 static std::string GetStubSanitizedUsername(const std::string& username); |
| 60 |
| 58 // Sets AsyncCallStatus signal handlers. | 61 // Sets AsyncCallStatus signal handlers. |
| 59 // |handler| is called when results for AsyncXXX methods are returned. | 62 // |handler| is called when results for AsyncXXX methods are returned. |
| 60 // Cryptohome service will process the calls in a first-in-first-out manner | 63 // Cryptohome service will process the calls in a first-in-first-out manner |
| 61 // when they are made in parallel. | 64 // when they are made in parallel. |
| 62 virtual void SetAsyncCallStatusHandlers( | 65 virtual void SetAsyncCallStatusHandlers( |
| 63 const AsyncCallStatusHandler& handler, | 66 const AsyncCallStatusHandler& handler, |
| 64 const AsyncCallStatusWithDataHandler& data_handler) = 0; | 67 const AsyncCallStatusWithDataHandler& data_handler) = 0; |
| 65 | 68 |
| 66 // Resets AsyncCallStatus signal handlers. | 69 // Resets AsyncCallStatus signal handlers. |
| 67 virtual void ResetAsyncCallStatusHandlers() = 0; | 70 virtual void ResetAsyncCallStatusHandlers() = 0; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 // Create() should be used instead. | 332 // Create() should be used instead. |
| 330 CryptohomeClient(); | 333 CryptohomeClient(); |
| 331 | 334 |
| 332 private: | 335 private: |
| 333 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); | 336 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); |
| 334 }; | 337 }; |
| 335 | 338 |
| 336 } // namespace chromeos | 339 } // namespace chromeos |
| 337 | 340 |
| 338 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 341 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
| OLD | NEW |