[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Sebastian Krzyszkowiak seba.dos1 at gmail.com
Sat Aug 6 08:18:45 UTC 2011


The following commit has been merged in the debian branch:
commit 5b3c423aabf6a2fd32b4e908d75ee24c7169dc88
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Sat Dec 5 20:35:01 2009 +0100

    opimd: introduce Type Manager

diff --git a/framework/subsystems/opimd/opimd.py b/framework/subsystems/opimd/opimd.py
index 5c7871b..399425b 100644
--- a/framework/subsystems/opimd/opimd.py
+++ b/framework/subsystems/opimd/opimd.py
@@ -64,6 +64,8 @@ from backend_manager import BackendManager
 
 from domain_manager import DomainManager
 
+from type_manager import TypeManager
+
 INIT = False
 
 #----------------------------------------------------------------------------#
@@ -86,6 +88,7 @@ def factory( prefix, subsystem ):
 
     DomainManager.init()
     backend_manager = BackendManager()
+    type_manager = TypeManager()
 
     dbus_objects = []
 
@@ -95,6 +98,7 @@ def factory( prefix, subsystem ):
         dbus_objects.append(dbus_obj)
 
     dbus_objects.append(backend_manager)
+    dbus_objects.append(type_manager)
 
     INIT = True
 
diff --git a/framework/subsystems/opimd/type_manager.py b/framework/subsystems/opimd/type_manager.py
new file mode 100644
index 0000000..c25f56a
--- /dev/null
+++ b/framework/subsystems/opimd/type_manager.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+Open PIM Daemon
+
+(C) 2009 by Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
+GPLv2 or later
+
+Type manager
+"""
+
+DBUS_BUS_NAME_FSO = "org.freesmartphone.opimd"
+DBUS_PATH_BASE_FSO = "/org/freesmartphone/PIM"
+DIN_BASE_FSO = "org.freesmartphone.PIM"
+
+from domain_manager import DomainManager
+from helpers import *
+
+import framework.patterns.tasklet as tasklet
+from framework.config import config, busmap
+
+from dbus.service import FallbackObject as DBusFBObject
+from dbus.service import signal as dbus_signal
+from dbus.service import method as dbus_method
+
+import logging
+logger = logging.getLogger('opimd')
+
+#----------------------------------------------------------------------------#
+
+_DBUS_PATH_TYPES = DBUS_PATH_BASE_FSO + '/Types'
+_DIN_TYPES = DIN_BASE_FSO + '.Types'
+
+_TYPES = ['phonenumber', 'address', 'email', 'name', 'date', 'generic']
+
+#----------------------------------------------------------------------------#
+class TypeManager(DBusFBObject):
+#----------------------------------------------------------------------------#
+
+    def __init__(self):
+        """Initializes the type manager"""
+
+        # Initialize the D-Bus-Interface
+        DBusFBObject.__init__( self, conn=busmap["opimd"], object_path=_DBUS_PATH_TYPES )
+
+        # Still necessary?
+        self.interface = _DIN_TYPES
+        self.path = _DBUS_PATH_TYPES
+
+    @dbus_method(_DIN_TYPES, "", "as")
+    def List(self):
+        return _TYPES

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list