Remove empty line.
[ibus-anthy.git] / engine / factory.py
blob3380416ce33755eab8869ff7a44f42cfb5550488
1 # vim:set noet ts=4:
2 # -*- coding: utf-8 -*-
4 # ibus-anthy - The Anthy engine for IBus
6 # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 from ibus import interface
23 import engine
25 FACTORY_PATH = "/com/redhat/IBus/engines/Anthy/Factory"
26 ENGINE_PATH = "/com/redhat/IBus/engines/Anthy/Engine/%d"
28 class DemoEngineFactory (interface.IEngineFactory):
29 NAME = "Anthy"
30 LANG = "ja"
31 ICON = "ibus-anthy"
32 AUTHORS = "Huang Peng <shawn.p.huang@gmail.com>"
33 CREDITS = "GPLv2"
35 def __init__ (self, dbusconn):
36 interface.IEngineFactory.__init__ (self, dbusconn, object_path = FACTORY_PATH)
37 self._dbusconn = dbusconn
38 self._max_engine_id = 1
40 def GetInfo (self):
41 return [
42 self.NAME,
43 self.LANG,
44 self.ICON,
45 self.AUTHORS,
46 self.CREDITS
49 def CreateEngine (self):
50 engine_path = ENGINE_PATH % self._max_engine_id
51 self._max_engine_id += 1
52 return engine.Engine (self._dbusconn, engine_path)