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_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ |
6 #define CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ | 6 #define CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 #include "chromeos/dbus/dbus_client_implementation_type.h" | |
14 #include "dbus/object_path.h" | 13 #include "dbus/object_path.h" |
15 | 14 |
16 namespace dbus { | 15 namespace dbus { |
17 class Bus; | 16 class Bus; |
18 } // namespace dbus | 17 } // namespace dbus |
19 | 18 |
20 namespace chromeos { | 19 namespace chromeos { |
21 | 20 |
22 class IBusComponent; | 21 class IBusComponent; |
23 | 22 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const ErrorCallback& error_callback) = 0; | 57 const ErrorCallback& error_callback) = 0; |
59 | 58 |
60 // Requests the ibus-daemon to exit daemon process. If |option| is | 59 // Requests the ibus-daemon to exit daemon process. If |option| is |
61 // RESTART_IBUS_DAEMON, ibus-daemon will be relaunched. If |option| is | 60 // RESTART_IBUS_DAEMON, ibus-daemon will be relaunched. If |option| is |
62 // SHUT_DOWN_IBUS_DAEMON, ibus-daemon will not be relaunched. The | 61 // SHUT_DOWN_IBUS_DAEMON, ibus-daemon will not be relaunched. The |
63 // |error_callback| is called if an error occurs. | 62 // |error_callback| is called if an error occurs. |
64 virtual void Exit(ExitOption option, const ErrorCallback& error_callback) = 0; | 63 virtual void Exit(ExitOption option, const ErrorCallback& error_callback) = 0; |
65 | 64 |
66 // Factory function, creates a new instance and returns ownership. | 65 // Factory function, creates a new instance and returns ownership. |
67 // For normal usage, access the singleton via DBusThreadManager::Get(). | 66 // For normal usage, access the singleton via DBusThreadManager::Get(). |
68 static CHROMEOS_EXPORT IBusClient* Create(DBusClientImplementationType type, | 67 static CHROMEOS_EXPORT IBusClient* Create(); |
69 dbus::Bus* bus); | |
70 | 68 |
71 protected: | 69 protected: |
72 // Create() should be used instead. | 70 // Create() should be used instead. |
73 IBusClient(); | 71 IBusClient(); |
74 | 72 |
75 private: | 73 private: |
76 DISALLOW_COPY_AND_ASSIGN(IBusClient); | 74 DISALLOW_COPY_AND_ASSIGN(IBusClient); |
77 }; | 75 }; |
78 | 76 |
79 } // namespace chromeos | 77 } // namespace chromeos |
80 | 78 |
81 #endif // CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ | 79 #endif // CHROMEOS_DBUS_IBUS_IBUS_CLIENT_H_ |
OLD | NEW |