/usr/lib/python2.7/dist-packages/framework/subsystems/opimd/type_manager.py is in fso-frameworkd 0.10.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Open PIM Daemon
(C) 2009 by Sebastian Krzyszkowiak <seba.dos1@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 *
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 re
import logging
logger = logging.getLogger('opimd')
#----------------------------------------------------------------------------#
_DBUS_PATH_TYPES = DBUS_PATH_BASE_FSO + '/Types'
_DIN_TYPES = DIN_BASE_FSO + '.Types'
#Consist of type and python type (latter is for internal use)
#Allowed: int, str, unicode, float (and long?).
# unicode should be used for all user related strings that may have unicode
# in, even phonenumber
_TYPES = {
'objectpath': str,
'phonenumber': unicode,
'number': float,
'integer': int,
'address': unicode,
'email': unicode,
'name': unicode,
'date': int,
'uri': unicode,
'photo': unicode,
'text': unicode,
'longtext': unicode,
'boolean': int,
'timezone': unicode,
'entryid': int,
'generic': unicode
}
#----------------------------------------------------------------------------#
class TypeManager(DBusFBObject):
#----------------------------------------------------------------------------#
Types = _TYPES
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 self.Types
|