# Path: telepathy/errors.py

# 
# 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/server/handle.py
# class NoneHandle(Handle):
#     def __init__(self):
#         Handle.__init__(self, 0, HANDLE_TYPE_NONE, '')


import warnings
from telepathy.errors import NotImplemented
from telepathy.interfaces import (CHANNEL_INTERFACE,
                                  CHANNEL_TYPE_CONTACT_LIST)
from telepathy.constants import HANDLE_TYPE_NONE
from telepathy.server.handle import NoneHandle
        self._fixed_properties = dict()
        self._available_properties = dict()

        self._requestables = list()

    def close(self):
        """Close channel manager and all the existing channels."""
        for channel_type in self._requestable_channels:
            for channels in list(self._channels[channel_type].values()):
                for channel in channels:
                    try:
                        if channel._type != CHANNEL_TYPE_CONTACT_LIST:
                            channel.Close()
                    except:
                        pass
                    try:
                        channel.remove_from_connection()
                    except:
                        pass

    def remove_channel(self, channel):
        "Remove channel from the channel manager"
        for channel_type in self._requestable_channels:
            for handle, channels in list(self._channels[channel_type].items()):
                if channel in channels :
                    channels.remove(channel)

    def _get_type_requested_handle(self, props):
        """Return the type, request and target handle from the requested
        properties"""

# Path: telepathy/errors.py

# 
# 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/server/handle.py
# class NoneHandle(Handle):
#     def __init__(self):
#         Handle.__init__(self, 0, HANDLE_TYPE_NONE, '')


# Path: telepathy/server/channelmanager.py
import warnings
from telepathy.errors import NotImplemented
from telepathy.interfaces import (CHANNEL_INTERFACE,
                                  CHANNEL_TYPE_CONTACT_LIST)
from telepathy.constants import HANDLE_TYPE_NONE
from telepathy.server.handle import NoneHandle

        self._fixed_properties = dict()
        self._available_properties = dict()

        self._requestables = list()

    def close(self):
        """Close channel manager and all the existing channels."""
        for channel_type in self._requestable_channels:
            for channels in list(self._channels[channel_type].values()):
                for channel in channels:
                    try:
                        if channel._type != CHANNEL_TYPE_CONTACT_LIST:
                            channel.Close()
                    except:
                        pass
                    try:
                        channel.remove_from_connection()
                    except:
                        pass

    def remove_channel(self, channel):
        "Remove channel from the channel manager"
        for channel_type in self._requestable_channels:
            for handle, channels in list(self._channels[channel_type].items()):
                if channel in channels :
                    channels.remove(channel)

    def _get_type_requested_handle(self, props):
        """Return the type, request and target handle from the requested
        properties"""

        type = props[CHANNEL_INTERFACE + '.ChannelType']