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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 } // namespace cryptohome | 33 } // namespace cryptohome |
34 | 34 |
35 namespace chromeos { | 35 namespace chromeos { |
36 | 36 |
37 // CryptohomeClient is used to communicate with the Cryptohome service. | 37 // CryptohomeClient is used to communicate with the Cryptohome service. |
38 // All method should be called from the origin thread (UI thread) which | 38 // All method should be called from the origin thread (UI thread) which |
39 // initializes the DBusThreadManager instance. | 39 // initializes the DBusThreadManager instance. |
40 class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { | 40 class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { |
41 public: | 41 public: |
| 42 // Constant that will be passed to AsyncMethodCallback to indicate that |
| 43 // cryptohome is not ready yet. |
| 44 static const int kNotReadyAsyncId; |
| 45 |
42 // A callback to handle AsyncCallStatus signals. | 46 // A callback to handle AsyncCallStatus signals. |
43 typedef base::Callback<void(int async_id, | 47 typedef base::Callback<void(int async_id, |
44 bool return_status, | 48 bool return_status, |
45 int return_code)> | 49 int return_code)> |
46 AsyncCallStatusHandler; | 50 AsyncCallStatusHandler; |
47 // A callback to handle AsyncCallStatusWithData signals. | 51 // A callback to handle AsyncCallStatusWithData signals. |
48 typedef base::Callback<void(int async_id, | 52 typedef base::Callback<void(int async_id, |
49 bool return_status, | 53 bool return_status, |
50 const std::string& data)> | 54 const std::string& data)> |
51 AsyncCallStatusWithDataHandler; | 55 AsyncCallStatusWithDataHandler; |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // Create() should be used instead. | 546 // Create() should be used instead. |
543 CryptohomeClient(); | 547 CryptohomeClient(); |
544 | 548 |
545 private: | 549 private: |
546 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); | 550 DISALLOW_COPY_AND_ASSIGN(CryptohomeClient); |
547 }; | 551 }; |
548 | 552 |
549 } // namespace chromeos | 553 } // namespace chromeos |
550 | 554 |
551 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ | 555 #endif // CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_ |
OLD | NEW |