Rename gik to ibus.
[ibus.git] / engine / enchant / factory.py
blob80ee24417abc52b8d2b616aeb3ecb6cc552aacc8
1 from ibus import interface
2 import engine
4 FACTORY_PATH = "/com/redhat/IBus/engines/Demo/Factory"
5 ENGINE_PATH = "/com/redhat/IBus/engines/Demo/Engine/%d"
7 class DemoEngineFactory (interface.IEngineFactory):
8 NAME = "Enchant"
9 LANG = "en"
10 ICON = ""
11 AUTHORS = "Huang Peng <shawn.p.huang@gmail.com>"
12 CREDITS = "GPLv2"
14 def __init__ (self, dbusconn):
15 interface.IEngineFactory.__init__ (self, dbusconn, object_path = FACTORY_PATH)
16 self._dbusconn = dbusconn
17 self._max_engine_id = 1
19 def GetInfo (self):
20 return [
21 self.NAME,
22 self.LANG,
23 self.ICON,
24 self.AUTHORS,
25 self.CREDITS
28 def CreateEngine (self):
29 engine_path = ENGINE_PATH % self._max_engine_id
30 self._max_engine_id += 1
31 return engine.DemoEngine (self._dbusconn, engine_path)