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_IBUS_IBUS_CONFIG_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_CONFIG_CLIENT_H_ |
6 #define CHROMEOS_DBUS_IBUS_IBUS_CONFIG_CLIENT_H_ | 6 #define CHROMEOS_DBUS_IBUS_IBUS_CONFIG_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... | |
23 namespace ibus { | 23 namespace ibus { |
24 class IBusComponent; | 24 class IBusComponent; |
25 } // namespace ibus | 25 } // namespace ibus |
26 | 26 |
27 class IBusInputContextClient; | 27 class IBusInputContextClient; |
28 | 28 |
29 // A class to make the actual DBus calls for IBusConfig service. | 29 // A class to make the actual DBus calls for IBusConfig service. |
30 class CHROMEOS_EXPORT IBusConfigClient { | 30 class CHROMEOS_EXPORT IBusConfigClient { |
31 public: | 31 public: |
32 typedef base::Callback<void()> ErrorCallback; | 32 typedef base::Callback<void()> ErrorCallback; |
33 typedef base::Callback<void()> OnIBusConfigReady; | |
33 virtual ~IBusConfigClient(); | 34 virtual ~IBusConfigClient(); |
34 | 35 |
36 // Initializes IBusConfig asynchronously. |on_ready| will be called if it is | |
37 // ready. | |
38 virtual void AsyncInitialize(const OnIBusConfigReady& on_ready) = 0; | |
satorux1
2012/11/28 06:43:12
-> InitializeAsync()
Async usually comes at the e
Seigo Nonaka
2012/11/28 07:00:37
Sure, done.
On 2012/11/28 06:43:12, satorux1 wrote
| |
39 | |
35 // Requests the IBusConfig to set a string value. | 40 // Requests the IBusConfig to set a string value. |
36 virtual void SetStringValue(const std::string& section, | 41 virtual void SetStringValue(const std::string& section, |
37 const std::string& key, | 42 const std::string& key, |
38 const std::string& value, | 43 const std::string& value, |
39 const ErrorCallback& error_callback) = 0; | 44 const ErrorCallback& error_callback) = 0; |
40 | 45 |
41 // Requests the IBusConfig to set a integer value. | 46 // Requests the IBusConfig to set a integer value. |
42 virtual void SetIntValue(const std::string& section, | 47 virtual void SetIntValue(const std::string& section, |
43 const std::string& key, | 48 const std::string& key, |
44 int value, | 49 int value, |
(...skipping 20 matching lines...) Expand all Loading... | |
65 protected: | 70 protected: |
66 // Create() should be used instead. | 71 // Create() should be used instead. |
67 IBusConfigClient(); | 72 IBusConfigClient(); |
68 | 73 |
69 private: | 74 private: |
70 DISALLOW_COPY_AND_ASSIGN(IBusConfigClient); | 75 DISALLOW_COPY_AND_ASSIGN(IBusConfigClient); |
71 }; | 76 }; |
72 | 77 |
73 } // namespace chromeos | 78 } // namespace chromeos |
74 | 79 |
75 #endif // CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ | 80 #endif // CHROMEOS_DBUS_IBUS_IBUS_CONFIG_CLIENT_H_ |
OLD | NEW |