# Path: telepathy/interfaces.py
# CONN_MGR_INTERFACE = CONNECTION_MANAGER
# CONN_INTERFACE = CONNECTION
# CHANNEL_INTERFACE = CHANNEL
# CHANNEL_HANDLER_INTERFACE = CHANNEL_HANDLER
# CONN_INTERFACE_ALIASING = CONNECTION_INTERFACE_ALIASING
# CONN_INTERFACE_AVATARS = CONNECTION_INTERFACE_AVATARS
# CONN_INTERFACE_CAPABILITIES = CONNECTION_INTERFACE_CAPABILITIES
# CONN_INTERFACE_PRESENCE = CONNECTION_INTERFACE_PRESENCE
# CONN_INTERFACE_RENAMING = CONNECTION_INTERFACE_RENAMING
# 
# Path: telepathy/constants.py
# CONNECTION_HANDLE_TYPE_NONE = HANDLE_TYPE_NONE
# CONNECTION_HANDLE_TYPE_CONTACT = HANDLE_TYPE_CONTACT
# CONNECTION_HANDLE_TYPE_ROOM = HANDLE_TYPE_ROOM
# CONNECTION_HANDLE_TYPE_LIST = HANDLE_TYPE_LIST
# CONNECTION_HANDLE_TYPE_USER_CONTACT_GROUP = HANDLE_TYPE_GROUP
# 
# Path: telepathy/_generated/Debug.py
# class Debug(dbus.service.Object):
#     """\
#       An interface for providing debug messages.
# 
#       This interface is primarily provided by one object per
#       service, at the path /org/freedesktop/Telepathy/debug.
#     """
# 
#     @dbus.service.method('org.freedesktop.Telepathy.Debug', in_signature='', out_signature='a(dsus)')
#     def GetMessages(self):
#         """
#         Retrieve buffered debug messages. An implementation could have a
#         limit on how many message it keeps and so the array returned from
#         this method should not be assumed to be all of the messages in
#         the lifetime of the service.
#       
#         """
#         raise NotImplementedError
#   
#     @dbus.service.signal('org.freedesktop.Telepathy.Debug', signature='dsus')
#     def NewDebugMessage(self, time, domain, level, message):
#         """
#         Emitted when a debug messages is generated if the
#         Enabled property is set to TRUE.
#       
#         """
#         pass
# 
# Path: telepathy/server/properties.py
# class DBusProperties(dbus.service.Interface):
#     def __init__(self):
#         if not getattr(self, '_interfaces', None):
#             self._interfaces = set()
# 
#         self._interfaces.add(dbus.PROPERTIES_IFACE)
# 
#         if not getattr(self, '_immutable_properties', None):
#             self._immutable_properties = dict()
# 
#         if not getattr(self, '_prop_getters', None):
#             self._prop_getters = {}
#             self._prop_setters = {}
# 
#     def _implement_property_get(self, iface, dict):
#         self._prop_getters.setdefault(iface, {}).update(dict)
# 
#     def _implement_property_set(self, iface, dict):
#         self._prop_setters.setdefault(iface, {}).update(dict)
# 
#     def _add_immutable_properties(self, props):
#         self._immutable_properties.update(props)
# 
#     def get_immutable_properties(self):
#         props = dict()
#         for prop, iface in list(self._immutable_properties.items()):
#             props[iface + '.' + prop] = self._prop_getters[iface][prop]()
#         return props
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v')
#     def Get(self, interface_name, property_name):
#         if interface_name in self._prop_getters \
#             and property_name in self._prop_getters[interface_name]:
#                 return self._prop_getters[interface_name][property_name]()
#         else:
#             raise telepathy.errors.InvalidArgument()
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ssv', out_signature='')
#     def Set(self, interface_name, property_name, value):
#         if interface_name in self._prop_setters \
#             and property_name in self._prop_setters[interface_name]:
#                 self._prop_setters[interface_name][property_name](value)
#         else:
#             raise telepathy.errors.PermissionDenied()
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}')
#     def GetAll(self, interface_name):
#         if interface_name in self._prop_getters:
#             r = {}
#             for k, v in list(self._prop_getters[interface_name].items()):
#                 r[k] = v()
#             return r
#         else:
#             raise telepathy.errors.InvalidArgument()


from telepathy.interfaces import DEBUG
from telepathy.constants import (DEBUG_LEVEL_ERROR,
                                 DEBUG_LEVEL_CRITICAL,
                                 DEBUG_LEVEL_WARNING,
                                 DEBUG_LEVEL_INFO,
                                 DEBUG_LEVEL_DEBUG)
from telepathy._generated.Debug import Debug as _Debug
from telepathy.server.properties import DBusProperties
import dbus.service
import logging
import sys
import time
# telepathy-python - Base classes defining the interfaces of the Telepathy framework
#
# Copyright (C) 2009 Collabora Limited
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA




LEVELS = {
        logging.ERROR:   DEBUG_LEVEL_ERROR,
        logging.FATAL:   DEBUG_LEVEL_CRITICAL,
        logging.WARNING: DEBUG_LEVEL_WARNING,

# Path: telepathy/interfaces.py
# CONN_MGR_INTERFACE = CONNECTION_MANAGER
# CONN_INTERFACE = CONNECTION
# CHANNEL_INTERFACE = CHANNEL
# CHANNEL_HANDLER_INTERFACE = CHANNEL_HANDLER
# CONN_INTERFACE_ALIASING = CONNECTION_INTERFACE_ALIASING
# CONN_INTERFACE_AVATARS = CONNECTION_INTERFACE_AVATARS
# CONN_INTERFACE_CAPABILITIES = CONNECTION_INTERFACE_CAPABILITIES
# CONN_INTERFACE_PRESENCE = CONNECTION_INTERFACE_PRESENCE
# CONN_INTERFACE_RENAMING = CONNECTION_INTERFACE_RENAMING
# 
# Path: telepathy/constants.py
# CONNECTION_HANDLE_TYPE_NONE = HANDLE_TYPE_NONE
# CONNECTION_HANDLE_TYPE_CONTACT = HANDLE_TYPE_CONTACT
# CONNECTION_HANDLE_TYPE_ROOM = HANDLE_TYPE_ROOM
# CONNECTION_HANDLE_TYPE_LIST = HANDLE_TYPE_LIST
# CONNECTION_HANDLE_TYPE_USER_CONTACT_GROUP = HANDLE_TYPE_GROUP
# 
# Path: telepathy/_generated/Debug.py
# class Debug(dbus.service.Object):
#     """\
#       An interface for providing debug messages.
# 
#       This interface is primarily provided by one object per
#       service, at the path /org/freedesktop/Telepathy/debug.
#     """
# 
#     @dbus.service.method('org.freedesktop.Telepathy.Debug', in_signature='', out_signature='a(dsus)')
#     def GetMessages(self):
#         """
#         Retrieve buffered debug messages. An implementation could have a
#         limit on how many message it keeps and so the array returned from
#         this method should not be assumed to be all of the messages in
#         the lifetime of the service.
#       
#         """
#         raise NotImplementedError
#   
#     @dbus.service.signal('org.freedesktop.Telepathy.Debug', signature='dsus')
#     def NewDebugMessage(self, time, domain, level, message):
#         """
#         Emitted when a debug messages is generated if the
#         Enabled property is set to TRUE.
#       
#         """
#         pass
# 
# Path: telepathy/server/properties.py
# class DBusProperties(dbus.service.Interface):
#     def __init__(self):
#         if not getattr(self, '_interfaces', None):
#             self._interfaces = set()
# 
#         self._interfaces.add(dbus.PROPERTIES_IFACE)
# 
#         if not getattr(self, '_immutable_properties', None):
#             self._immutable_properties = dict()
# 
#         if not getattr(self, '_prop_getters', None):
#             self._prop_getters = {}
#             self._prop_setters = {}
# 
#     def _implement_property_get(self, iface, dict):
#         self._prop_getters.setdefault(iface, {}).update(dict)
# 
#     def _implement_property_set(self, iface, dict):
#         self._prop_setters.setdefault(iface, {}).update(dict)
# 
#     def _add_immutable_properties(self, props):
#         self._immutable_properties.update(props)
# 
#     def get_immutable_properties(self):
#         props = dict()
#         for prop, iface in list(self._immutable_properties.items()):
#             props[iface + '.' + prop] = self._prop_getters[iface][prop]()
#         return props
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v')
#     def Get(self, interface_name, property_name):
#         if interface_name in self._prop_getters \
#             and property_name in self._prop_getters[interface_name]:
#                 return self._prop_getters[interface_name][property_name]()
#         else:
#             raise telepathy.errors.InvalidArgument()
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ssv', out_signature='')
#     def Set(self, interface_name, property_name, value):
#         if interface_name in self._prop_setters \
#             and property_name in self._prop_setters[interface_name]:
#                 self._prop_setters[interface_name][property_name](value)
#         else:
#             raise telepathy.errors.PermissionDenied()
# 
#     @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}')
#     def GetAll(self, interface_name):
#         if interface_name in self._prop_getters:
#             r = {}
#             for k, v in list(self._prop_getters[interface_name].items()):
#                 r[k] = v()
#             return r
#         else:
#             raise telepathy.errors.InvalidArgument()


# Path: telepathy/server/debug.py
from telepathy.interfaces import DEBUG
from telepathy.constants import (DEBUG_LEVEL_ERROR,
                                 DEBUG_LEVEL_CRITICAL,
                                 DEBUG_LEVEL_WARNING,
                                 DEBUG_LEVEL_INFO,
                                 DEBUG_LEVEL_DEBUG)
from telepathy._generated.Debug import Debug as _Debug
from telepathy.server.properties import DBusProperties
import dbus.service
import logging
import sys
import time

# telepathy-python - Base classes defining the interfaces of the Telepathy framework
#
# Copyright (C) 2009 Collabora Limited
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA




LEVELS = {
        logging.ERROR:   DEBUG_LEVEL_ERROR,
        logging.FATAL:   DEBUG_LEVEL_CRITICAL,
        logging.WARNING: DEBUG_LEVEL_WARNING,

        logging.INFO:    DEBUG_LEVEL_INFO,