From c55f389c6ee8358a65ce3aff901f348d32a0e835 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 8 Jan 2014 14:47:12 +0000 Subject: [PATCH] Adapt for merge of Contacts into Connection, and deletion of Requests This also resyncs constants.py, servicetest.py with my current Gabble branch. --- configure.ac | 4 +- src/idle-connection.c | 69 ++++++++++++++++++------------- src/idle-connection.h | 2 - src/idle-contact-info.c | 20 --------- tests/twisted/channels/requests-create.py | 2 - tests/twisted/cm/protocol.py | 1 - tests/twisted/constants.py | 42 +++++++++++++++---- tests/twisted/contacts.py | 1 - tests/twisted/servicetest.py | 41 ++++++++++++++---- 9 files changed, 110 insertions(+), 72 deletions(-) diff --git a/configure.ac b/configure.ac index 506747a..a77c60f 100644 --- a/configure.ac +++ b/configure.ac @@ -96,8 +96,8 @@ PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.51, dbus-glib-1 >= 0.51]) AC_DEFINE([TP_SEAL_ENABLE], [], [Prevent to use sealed variables]) AC_DEFINE([TP_DISABLE_SINGLE_INCLUDE], [], [Disable single header include]) -AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_22, [Ignore post 0.22 deprecations]) -AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_22, [Prevent post 0.22 APIs]) +AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_1_0, [Ignore post 1.0 deprecations]) +AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_1_0, [Prevent post 1.0 APIs]) PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib-1 >= 0.99.5, telepathy-glib-1-dbus >= 0.99.5]) dnl Check for code generation tools diff --git a/src/idle-connection.c b/src/idle-connection.c index 80dcbb2..fb08399 100644 --- a/src/idle-connection.c +++ b/src/idle-connection.c @@ -65,7 +65,6 @@ G_DEFINE_TYPE_WITH_CODE(IdleConnection, idle_connection, TP_TYPE_BASE_CONNECTION G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING1, _aliasing_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO1, idle_contact_info_iface_init); G_IMPLEMENT_INTERFACE(IDLE_TYPE_SVC_CONNECTION_INTERFACE_RENAMING, _renaming_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS, tp_contacts_mixin_iface_init); ); typedef struct _IdleOutputPendingMsg IdleOutputPendingMsg; @@ -233,10 +232,6 @@ static void idle_connection_add_queue_timeout (IdleConnection *self); static void idle_connection_clear_queue_timeout (IdleConnection *self); static void _send_with_priority(IdleConnection *conn, const gchar *msg, guint priority); -static void conn_aliasing_fill_contact_attributes ( - GObject *obj, - const GArray *contacts, - GHashTable *attributes_hash); static void idle_connection_init(IdleConnection *obj) { IdleConnectionPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE (obj, IDLE_TYPE_CONNECTION, IdleConnectionPrivate); @@ -245,9 +240,6 @@ static void idle_connection_init(IdleConnection *obj) { priv->sconn_connected = FALSE; priv->msg_queue = g_queue_new(); priv->aliases = g_hash_table_new_full (NULL, NULL, NULL, g_free); - - tp_contacts_mixin_init ((GObject *) obj, G_STRUCT_OFFSET (IdleConnection, contacts)); - tp_base_connection_register_with_contacts_mixin ((TpBaseConnection *) obj); } static void @@ -257,9 +249,6 @@ idle_connection_constructed (GObject *object) self->parser = g_object_new (IDLE_TYPE_PARSER, "connection", self, NULL); idle_contact_info_init (self); - tp_contacts_mixin_add_contact_attributes_iface (object, - TP_IFACE_CONNECTION_INTERFACE_ALIASING1, - conn_aliasing_fill_contact_attributes); } static void idle_connection_set_property(GObject *obj, guint prop_id, const GValue *value, GParamSpec *pspec) { @@ -436,7 +425,6 @@ static void idle_connection_finalize (GObject *object) { idle_output_pending_msg_free(msg); g_queue_free(priv->msg_queue); - tp_contacts_mixin_finalize (object); G_OBJECT_CLASS(idle_connection_parent_class)->finalize(object); } @@ -445,8 +433,6 @@ static const gchar * interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_ALIASING1, TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1, IDLE_IFACE_CONNECTION_INTERFACE_RENAMING, - TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, NULL}; const gchar * const *idle_connection_get_implemented_interfaces (void) { @@ -469,6 +455,11 @@ get_interfaces_always_present (TpBaseConnection *base) return interfaces; } +static void idle_connection_fill_contact_attributes (TpBaseConnection *base, + const gchar *dbus_interface, + TpHandle handle, + TpContactAttributeMap *attributes); + static void idle_connection_class_init(IdleConnectionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); TpBaseConnectionClass *parent_class = TP_BASE_CONNECTION_CLASS(klass); @@ -491,6 +482,7 @@ static void idle_connection_class_init(IdleConnectionClass *klass) { parent_class->shut_down = _iface_shut_down; parent_class->start_connecting = _iface_start_connecting; parent_class->get_interfaces_always_present = get_interfaces_always_present; + parent_class->fill_contact_attributes = idle_connection_fill_contact_attributes; param_spec = g_param_spec_string("nickname", "IRC nickname", "The nickname to be visible to others in IRC.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_NICKNAME, param_spec); @@ -525,7 +517,6 @@ static void idle_connection_class_init(IdleConnectionClass *klass) { param_spec = g_param_spec_boolean("password-prompt", "Password prompt", "Whether the connection should pop up a SASL channel if no password is given", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT); g_object_class_install_property(object_class, PROP_PASSWORD_PROMPT, param_spec); - tp_contacts_mixin_class_init (object_class, G_STRUCT_OFFSET (IdleConnectionClass, contacts)); idle_contact_info_class_init(klass); /* This is a hack to make the test suite run in finite time. */ @@ -1316,28 +1307,28 @@ gimme_an_alias (IdleConnection *self, return tp_handle_inspect (repo, handle); } -static void -conn_aliasing_fill_contact_attributes ( - GObject *obj, - const GArray *contacts, - GHashTable *attributes_hash) +static gboolean +conn_aliasing_fill_contact_attributes (IdleConnection *self, + const gchar *dbus_interface, + TpHandle handle, + TpContactAttributeMap *attributes) { - IdleConnection *self = IDLE_CONNECTION (obj); - TpHandleRepoIface *repo = tp_base_connection_get_handles ( - TP_BASE_CONNECTION (self), TP_HANDLE_TYPE_CONTACT); - guint i; - - for (i = 0; i < contacts->len; i++) + if (!tp_strdiff (dbus_interface, TP_IFACE_CONNECTION_INTERFACE_ALIASING1)) { - TpHandle handle = g_array_index (contacts, TpHandle, i); + TpHandleRepoIface *repo = tp_base_connection_get_handles ( + TP_BASE_CONNECTION (self), TP_HANDLE_TYPE_CONTACT); const gchar *alias = gimme_an_alias (self, repo, handle); g_assert (alias != NULL); - tp_contacts_mixin_set_contact_attribute (attributes_hash, + tp_contact_attribute_map_take_sliced_gvalue (attributes, handle, TP_IFACE_CONNECTION_INTERFACE_ALIASING1"/alias", tp_g_value_slice_new_string (alias)); + + return TRUE; } + + return FALSE; } static void idle_connection_request_aliases(TpSvcConnectionInterfaceAliasing1 *iface, const GArray *handles, DBusGMethodInvocation *context) { @@ -1519,3 +1510,25 @@ static void _renaming_iface_init(gpointer g_iface, gpointer iface_data) { #undef IMPLEMENT } +static void +idle_connection_fill_contact_attributes (TpBaseConnection *base, + const gchar *dbus_interface, + TpHandle handle, + TpContactAttributeMap *attributes) +{ + IdleConnection *self = IDLE_CONNECTION (base); + + if (conn_aliasing_fill_contact_attributes (self, + dbus_interface, handle, attributes)) + return; + + /* We don't cache contact info, so we just never put /info into the + * attributes hash. This is spec-compliant: it says the attribute should be + * omitted if unknown. */ + if (!tp_strdiff (dbus_interface, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1)) + return; + + TP_BASE_CONNECTION_CLASS (idle_connection_parent_class)-> + fill_contact_attributes (base, dbus_interface, handle, attributes); +} diff --git a/src/idle-connection.h b/src/idle-connection.h index bd5f903..3b151ab 100644 --- a/src/idle-connection.h +++ b/src/idle-connection.h @@ -36,12 +36,10 @@ typedef struct _IdleConnectionPrivate IdleConnectionPrivate; struct _IdleConnectionClass { TpBaseConnectionClass parent_class; - TpContactsMixinClass contacts; }; struct _IdleConnection { TpBaseConnection parent; - TpContactsMixin contacts; IdleParser *parser; GQueue *contact_info_requests; IdleConnectionPrivate *priv; diff --git a/src/idle-contact-info.c b/src/idle-contact-info.c index 6634dd5..72a44d6 100644 --- a/src/idle-contact-info.c +++ b/src/idle-contact-info.c @@ -493,22 +493,6 @@ void idle_contact_info_class_init (IdleConnectionClass *klass) { props); } -static void -idle_contact_info_fill_contact_attributes ( - GObject *obj, - const GArray *contacts, - GHashTable *attributes_hash) -{ - /* We don't cache contact info, so we just never put /info into the - * attributes hash. This is spec-compliant: we don't implement - * GetContactInfo, and the spec says the attribute should be the same as the - * value returned by that method (or omitted if unknown). This function - * exists at all to make ContactInfo show up in ContactAttributeInterfaces - * (otherwise tp-glib might be justified in falling back to - * GetContactInfo(), which we know will fail). - */ -} - void idle_contact_info_init (IdleConnection *conn) { conn->contact_info_requests = g_queue_new(); @@ -526,10 +510,6 @@ void idle_contact_info_init (IdleConnection *conn) { idle_parser_add_handler(conn->parser, IDLE_PARSER_NUMERIC_NOSUCHSERVER, _no_such_server_handler, conn); idle_parser_add_handler(conn->parser, IDLE_PARSER_NUMERIC_TRYAGAIN, _try_again_handler, conn); - - tp_contacts_mixin_add_contact_attributes_iface ((GObject *) conn, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1, - idle_contact_info_fill_contact_attributes); } void idle_contact_info_iface_init(gpointer g_iface, gpointer iface_data) { diff --git a/tests/twisted/channels/requests-create.py b/tests/twisted/channels/requests-create.py index edbd106..90ee8a1 100644 --- a/tests/twisted/channels/requests-create.py +++ b/tests/twisted/channels/requests-create.py @@ -17,8 +17,6 @@ def test(q, bus, conn, stream): props = conn.GetAll(cs.CONN, dbus_interface=cs.PROPERTIES_IFACE) - assertContains(cs.CONN_IFACE_REQUESTS, props['Interfaces']) - nick = 'foo' foo_handle = conn.get_contact_handle_sync(nick) diff --git a/tests/twisted/cm/protocol.py b/tests/twisted/cm/protocol.py index e1b36fb..fcf020a 100644 --- a/tests/twisted/cm/protocol.py +++ b/tests/twisted/cm/protocol.py @@ -34,7 +34,6 @@ def test(q, bus, conn, server): assertEquals('im-irc', proto_props['Icon']) assertContains(cs.CONN_IFACE_ALIASING, proto_props['ConnectionInterfaces']) - assertContains(cs.CONN_IFACE_REQUESTS, proto_props['ConnectionInterfaces']) assertEquals('robot101', unwrap(proto_iface.NormalizeContact('Robot101'))) diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py index a9181ac..d710529 100644 --- a/tests/twisted/constants.py +++ b/tests/twisted/constants.py @@ -33,8 +33,6 @@ CM = PREFIX + ".ConnectionManager" HT_NONE = 0 HT_CONTACT = 1 HT_ROOM = 2 -HT_LIST = 3 -HT_GROUP = 4 CHANNEL = PREFIX + ".Channel" @@ -73,6 +71,15 @@ INITIATOR_HANDLE = CHANNEL + '.InitiatorHandle' INITIATOR_ID = CHANNEL + '.InitiatorID' INTERFACES = CHANNEL + '.Interfaces' +CALL_CONTENTS = CHANNEL_TYPE_CALL + '.Contents' +CALL_CALL_STATE_DETAILS = CHANNEL_TYPE_CALL + '.CallStateDetails' +CALL_CALL_STATE = CHANNEL_TYPE_CALL + '.CallState' +CALL_CALL_FLAGS = CHANNEL_TYPE_CALL + '.CallFlags' +CALL_CALL_STATE_REASON = CHANNEL_TYPE_CALL + '.CallStateReason' +CALL_HARDWARE_STREAMING = CHANNEL_TYPE_CALL + '.HardwareStreaming' +CALL_CALL_MEMBERS = CHANNEL_TYPE_CALL + '.CallMembers' +CALL_MEMBER_IDENTIFIERS = CHANNEL_TYPE_CALL + '.MemberIdentifiers' +CALL_INITIAL_TRANSPORT = CHANNEL_TYPE_CALL + '.InitialTransport' CALL_INITIAL_AUDIO = CHANNEL_TYPE_CALL + '.InitialAudio' CALL_INITIAL_AUDIO_NAME = CHANNEL_TYPE_CALL + '.InitialAudioName' CALL_INITIAL_VIDEO = CHANNEL_TYPE_CALL + '.InitialVideo' @@ -83,7 +90,7 @@ CALL_CONTENT = PREFIX + '.Call1.Content' CALL_CONTENT_IFACE_MEDIA = CALL_CONTENT + '.Interface.Media' CALL_CONTENT_IFACE_DTMF = CALL_CONTENT + '.Interface.DTMF1' -CALL_CONTENT_MEDIADESCRIPTION = CALL_CONTENT + '.MediaDescription' +CALL_CONTENT_MEDIA_DESCRIPTION = CALL_CONTENT + '.MediaDescription' CALL_STREAM = PREFIX + '.Call1.Stream' CALL_STREAM_IFACE_MEDIA = CALL_STREAM + '.Interface.Media' @@ -178,10 +185,11 @@ CONTACT_LIST_STATE_SUCCESS = 3 CONN = PREFIX + ".Connection" CONN_IFACE_AVATARS = CONN + '.Interface.Avatars1' CONN_IFACE_ALIASING = CONN + '.Interface.Aliasing1' -CONN_IFACE_CONTACTS = CONN + '.Interface.Contacts' CONN_IFACE_CONTACT_CAPS = CONN + '.Interface.ContactCapabilities1' CONN_IFACE_CONTACT_INFO = CONN + ".Interface.ContactInfo1" CONN_IFACE_PRESENCE = CONN + '.Interface.Presence1' +CONN_IFACE_RENAMING = CONN + '.Interface.Renaming1' +CONN_IFACE_SIDECARS1 = CONN + '.Interface.Sidecars1' CONN_IFACE_REQUESTS = CONN + '.Interface.Requests' CONN_IFACE_LOCATION = CONN + '.Interface.Location1' CONN_IFACE_GABBLE_DECLOAK = CONN + '.Interface.Gabble.Decloak' @@ -194,12 +202,17 @@ CONN_IFACE_CONTACT_BLOCKING = CONN + '.Interface.ContactBlocking1' CONN_IFACE_ADDRESSING = CONN + '.Interface.Addressing1' CONN_IFACE_SERVICE_POINT = CONN + '.Interface.ServicePoint1' -ATTR_CONTACT_ID = CONN + '/contact-id' +ATTR_ALIAS = CONN_IFACE_ALIASING + '/alias' +ATTR_AVATAR_TOKEN = CONN_IFACE_AVATARS + '/token' +ATTR_CLIENT_TYPES = CONN_IFACE_CLIENT_TYPES + '/client-types' ATTR_CONTACT_CAPABILITIES = CONN_IFACE_CONTACT_CAPS + '/capabilities' +ATTR_CONTACT_ID = CONN + '/contact-id' +ATTR_CONTACT_INFO = CONN_IFACE_CONTACT_INFO + '/info' +ATTR_GROUPS = CONN_IFACE_CONTACT_GROUPS + '/groups' +ATTR_LOCATION = CONN_IFACE_LOCATION + '/location' ATTR_PRESENCE = CONN_IFACE_PRESENCE + '/presence' -ATTR_SUBSCRIBE = CONN_IFACE_CONTACT_LIST + '/subscribe' ATTR_PUBLISH = CONN_IFACE_CONTACT_LIST + '/publish' -ATTR_GROUPS = CONN_IFACE_CONTACT_GROUPS + '/groups' +ATTR_SUBSCRIBE = CONN_IFACE_CONTACT_LIST + '/subscribe' STREAM_HANDLER = PREFIX + '.Media.StreamHandler' @@ -325,7 +338,7 @@ FT_DATE = CHANNEL_TYPE_FILE_TRANSFER + '.Date' FT_AVAILABLE_SOCKET_TYPES = CHANNEL_TYPE_FILE_TRANSFER + '.AvailableSocketTypes' FT_TRANSFERRED_BYTES = CHANNEL_TYPE_FILE_TRANSFER + '.TransferredBytes' FT_INITIAL_OFFSET = CHANNEL_TYPE_FILE_TRANSFER + '.InitialOffset' -FT_FILE_COLLECTION = CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE.FileCollection' +FT_FILE_COLLECTION = CHANNEL_TYPE_FILE_TRANSFER + '.FileCollection' FT_URI = CHANNEL_TYPE_FILE_TRANSFER + '.URI' FT_SERVICE_NAME = CHANNEL_IFACE_FILE_TRANSFER_METADATA + '.ServiceName' FT_METADATA = CHANNEL_IFACE_FILE_TRANSFER_METADATA + '.Metadata' @@ -458,6 +471,12 @@ MT_NOTICE = 2 MT_AUTO_REPLY = 3 MT_DELIVERY_REPORT = 4 +class MessageFlag(object): + TRUNCATED = 1 + NON_TEXT_CONTENT = 2 + SCROLLBACK = 4 + RESCUED = 8 + class SendError(object): UNKNOWN = 0 OFFLINE = 1 @@ -522,7 +541,7 @@ SUBJECT = CHANNEL_IFACE_ROOM + '.Subject' SUBJECT_PRESENT = 1 SUBJECT_CAN_SET = 2 -DEBUG_IFACE = PREFIX + '.Debug' +DEBUG_IFACE = PREFIX + '.Debug1' DEBUG_PATH = PATH_PREFIX + '/debug' SERVICE_POINT_TYPE_NONE = 0 @@ -551,12 +570,17 @@ CR = PREFIX + '.ChannelRequest' CDO = PREFIX + '.ChannelDispatchOperation' CD = PREFIX + '.ChannelDispatcher' +CD_IFACE_MESSAGES1 = PREFIX + '.ChannelDispatcher.Interface.Messages1' CD_IFACE_OP_LIST = PREFIX + '.ChannelDispatcher.Interface.OperationList1' CD_PATH = PATH_PREFIX + '/ChannelDispatcher' MC = PREFIX + '.MissionControl6' MC_PATH = PATH_PREFIX + '/MissionControl6' +DTMF_CURRENTLY_SENDING_TONES = CHANNEL_IFACE_DTMF + '.CurrentlySendingTones' +DTMF_INITIAL_TONES = CHANNEL_IFACE_DTMF + '.InitialTones' +DTMF_DEFERRED_TONES = CHANNEL_IFACE_DTMF + '.DeferredTones' +TESTS = PREFIX + ".Tests" TESTDOT = PREFIX + ".Test." TESTSLASH = PATH_PREFIX + "/Test/" diff --git a/tests/twisted/contacts.py b/tests/twisted/contacts.py index 0642df0..0c1d05a 100644 --- a/tests/twisted/contacts.py +++ b/tests/twisted/contacts.py @@ -11,7 +11,6 @@ def test(q, bus, conn, stream): q.expect('dbus-signal', signal='StatusChanged', args=[0, 1]) interfaces = conn.Properties.Get(cs.CONN, "Interfaces") - assertContains(cs.CONN_IFACE_CONTACTS, interfaces) brillana, miriam = conn.get_contact_handles_sync(["brillana", "miriam"]) diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py index 8a813f5..86212f3 100644 --- a/tests/twisted/servicetest.py +++ b/tests/twisted/servicetest.py @@ -197,7 +197,14 @@ class BaseEventQueue: t = time.time() while True: - event = self.wait([pattern.subqueue]) + try: + event = self.wait([pattern.subqueue]) + except TimeoutError: + self.log('timeout') + self.log('still expecting:') + self.log(' - %r' % pattern) + raise + self._check_forbidden(event) if pattern.match(event): @@ -575,8 +582,7 @@ def sync_dbus(bus, q, proxy): # dbus-glib and thence the application, which means that Ping()ing the # application doesn't ensure that it's processed all D-Bus messages prior # to our ping. - call_async(q, dbus.Interface(proxy, 'org.freedesktop.Telepathy.Tests'), - 'DummySyncDBus') + call_async(q, dbus.Interface(proxy, cs.TESTS), 'DummySyncDBus') q.expect('dbus-error', method='DummySyncDBus') class ProxyWrapper: @@ -620,26 +626,44 @@ def wrap_connection(conn): return ConnWrapper(conn, tp_name_prefix + '.Connection', dict( [('Peer', 'org.freedesktop.DBus.Peer'), + ('Contacts', cs.CONN), # backwards compat with Telepathy 0 ('Aliasing', cs.CONN_IFACE_ALIASING), ('Avatars', cs.CONN_IFACE_AVATARS), - ('Contacts', cs.CONN_IFACE_CONTACTS), ('ContactCapabilities', cs.CONN_IFACE_CONTACT_CAPS), ('ContactInfo', cs.CONN_IFACE_CONTACT_INFO), ('Location', cs.CONN_IFACE_LOCATION), ('Presence', cs.CONN_IFACE_PRESENCE), ('Requests', cs.CONN_IFACE_REQUESTS), - ('Future', tp_name_prefix + '.Connection.FUTURE'), ('MailNotification', cs.CONN_IFACE_MAIL_NOTIFICATION), ('ContactList', cs.CONN_IFACE_CONTACT_LIST), ('ContactGroups', cs.CONN_IFACE_CONTACT_GROUPS), + ('ContactBlocking', cs.CONN_IFACE_CONTACT_BLOCKING), ('PowerSaving', cs.CONN_IFACE_POWER_SAVING), ('Addressing', cs.CONN_IFACE_ADDRESSING), + ('ClientTypes', cs.CONN_IFACE_CLIENT_TYPES), + ('Renaming', cs.CONN_IFACE_RENAMING), + ('Sidecars1', cs.CONN_IFACE_SIDECARS1), ])) +class ChannelWrapper(ProxyWrapper): + def send_msg_sync(self, txt): + message = [ + { 'message-type': cs.MT_NORMAL, }, + { 'content-type': 'text/plain', + 'content': txt + }] + self.Text.SendMessage(message, 0) + def wrap_channel(chan, type_, extra=None): interfaces = { type_: tp_name_prefix + '.Channel.Type.' + type_, + 'Channel': cs.CHANNEL, 'Group': cs.CHANNEL_IFACE_GROUP, + 'Hold': cs.CHANNEL_IFACE_HOLD, + 'RoomConfig1': cs.CHANNEL_IFACE_ROOM_CONFIG, + 'ChatState': cs.CHANNEL_IFACE_CHAT_STATE, + 'Destroyable': cs.CHANNEL_IFACE_DESTROYABLE, + 'Password': cs.CHANNEL_IFACE_PASSWORD, } if extra: @@ -647,11 +671,14 @@ def wrap_channel(chan, type_, extra=None): (name, tp_name_prefix + '.Channel.Interface.' + name) for name in extra])) - return ProxyWrapper(chan, tp_name_prefix + '.Channel', interfaces) + return ChannelWrapper(chan, tp_name_prefix + '.Channel', interfaces) def wrap_content(chan, extra=None): - interfaces = { } + interfaces = { + 'DTMF': cs.CALL_CONTENT_IFACE_DTMF, + 'Media': cs.CALL_CONTENT_IFACE_MEDIA, + } if extra: interfaces.update(dict([ -- 1.8.5.2