summaryrefslogtreecommitdiffstats
path: root/ibus/interface
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-05-29 21:20:39 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-05-29 21:20:39 +0800
commit0c249dc5ccad40182e2bc6fa54cc9101a3ee4c30 (patch)
treebaaad4ed30f36c8701ad036fe6adaac380011aca /ibus/interface
parentaf1638a9d44f234f0d39ec2b1140c670b968c3d1 (diff)
Add two lack files.
Diffstat (limited to 'ibus/interface')
-rw-r--r--ibus/interface/ienginefactory.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/ibus/interface/ienginefactory.py b/ibus/interface/ienginefactory.py
new file mode 100644
index 0000000..a89a8c6
--- /dev/null
+++ b/ibus/interface/ienginefactory.py
@@ -0,0 +1,32 @@
+import dbus.service
+from ibus.common import \
+ IBUS_ENGINE_FACTORY_IFACE
+
+class IEngineFactory (dbus.service.Object):
+ # define method decorator.
+ method = lambda **args: \
+ dbus.service.method (dbus_interface = IBUS_ENGINE_FACTORY_IFACE, \
+ **args)
+
+ # define async method decorator.
+ async_method = lambda **args: \
+ dbus.service.method (dbus_interface = IBUS_ENGINE_FACTORY_IFACE, \
+ async_callbacks = ("reply_cb", "error_cb"), \
+ **args)
+ # Return a array. [name, language, icon_path, authors, credits]
+ @method (out_signature = "as")
+ def GetInfo (self): pass
+
+ # Factory should allocate all resources in this method
+ @method ()
+ def Initialize (self): pass
+
+ # Factory should free all allocated resources in this method
+ @method ()
+ def Uninitialize (self): pass
+
+ # Create an input context and return the id of the context.
+ # If failed, it will return "" or None.
+ @method (out_signature = "o")
+ def CreateEngine (self): pass
+