summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/ibus/ibus_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/dbus/ibus/ibus_client.h')
-rw-r--r--chromeos/dbus/ibus/ibus_client.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromeos/dbus/ibus/ibus_client.h b/chromeos/dbus/ibus/ibus_client.h
index 565df0f..78502d5 100644
--- a/chromeos/dbus/ibus/ibus_client.h
+++ b/chromeos/dbus/ibus/ibus_client.h
@@ -30,6 +30,10 @@ class IBusInputContextClient;
// callbacks.
class CHROMEOS_EXPORT IBusClient {
public:
+ enum ExitOption {
+ RESTART_IBUS_DAEMON,
+ SHUT_DOWN_IBUS_DAEMON
+ };
typedef base::Callback<void(const dbus::ObjectPath&)>
CreateInputContextCallback;
typedef base::Callback<void()> RegisterComponentCallback;
@@ -52,6 +56,17 @@ class CHROMEOS_EXPORT IBusClient {
const RegisterComponentCallback& callback,
const ErrorCallback& error_callback) = 0;
+ // Requests the ibus-daemon to set global engine. If failed, |error_callback|
+ // is called.
+ virtual void SetGlobalEngine(const std::string& engine_name,
+ const ErrorCallback& error_callback) = 0;
+
+ // Requests the ibus-daemon to exit daemon process. If |option| is
+ // RESTART_IBUS_DAEMON, ibus-daemon will be relaunched. If |option| is
+ // SHUT_DOWN_IBUS_DAEMON, ibus-daemon will not be relaunched. The
+ // |error_callback| is called if an error occures.
+ virtual void Exit(ExitOption option, const ErrorCallback& error_callback) = 0;
+
// Factory function, creates a new instance and returns ownership.
// For normal usage, access the singleton via DBusThreadManager::Get().
static CHROMEOS_EXPORT IBusClient* Create(DBusClientImplementationType type,