From 3eec2b7503bddf95bfdaffb5020612024804ed13 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 16 Oct 2013 15:56:14 +0100 Subject: [PATCH] Update for telepathy-glib codegen putting ABI versions in names --- src/connection-contact-info.c | 20 ++++----- src/connection.c | 96 +++++++++++++++++++++---------------------- src/file-transfer-channel.c | 90 ++++++++++++++++++++-------------------- src/ft-manager.c | 58 +++++++++++++------------- src/muc-channel.c | 12 +++--- src/muc-manager.c | 20 ++++----- src/muc-tube-dbus.c | 2 +- src/muc-tube-stream.c | 2 +- src/protocol.c | 4 +- src/roomlist-channel.c | 31 +++++++------- src/roomlist-manager.c | 4 +- src/tube-dbus.c | 39 +++++++++--------- src/tube-stream.c | 47 +++++++++++---------- src/tubes-manager.c | 52 +++++++++++------------ src/write-mgr-file.c | 18 ++++---- 15 files changed, 245 insertions(+), 250 deletions(-) diff --git a/src/connection-contact-info.c b/src/connection-contact-info.c index c49963f..1a83990 100644 --- a/src/connection-contact-info.c +++ b/src/connection-contact-info.c @@ -108,7 +108,7 @@ salut_conn_contact_info_class_init ( tp_dbus_properties_mixin_implement_interface ( G_OBJECT_CLASS (klass), - TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO, + TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO1, salut_conn_contact_info_get_property, NULL, props); @@ -222,7 +222,7 @@ salut_conn_contact_info_fill_contact_attributes ( if (contact_info != NULL) tp_contacts_mixin_set_contact_attribute (attributes_hash, - handle, TP_TOKEN_CONNECTION_INTERFACE_CONTACT_INFO_INFO, + handle, TP_TOKEN_CONNECTION_INTERFACE_CONTACT_INFO1_INFO, tp_g_value_slice_new_take_boxed ( TP_ARRAY_TYPE_CONTACT_INFO_FIELD_LIST, contact_info)); } @@ -235,7 +235,7 @@ void salut_conn_contact_info_init ( { tp_contacts_mixin_add_contact_attributes_iface ( G_OBJECT (self), - TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1, salut_conn_contact_info_fill_contact_attributes); } @@ -247,14 +247,14 @@ salut_conn_contact_info_changed ( { GPtrArray *contact_info = build_contact_info_for_contact (contact); - tp_svc_connection_interface_contact_info_emit_contact_info_changed (self, + tp_svc_connection_interface_contact_info1_emit_contact_info_changed (self, handle, contact_info); g_boxed_free (TP_ARRAY_TYPE_CONTACT_INFO_FIELD_LIST, contact_info); } static void salut_conn_contact_info_request_contact_info ( - TpSvcConnectionInterfaceContactInfo *iface, + TpSvcConnectionInterfaceContactInfo1 *iface, guint handle, DBusGMethodInvocation *context) { @@ -285,7 +285,7 @@ salut_conn_contact_info_request_contact_info ( { GPtrArray *contact_info = build_contact_info_for_contact (contact); - tp_svc_connection_interface_contact_info_return_from_request_contact_info ( + tp_svc_connection_interface_contact_info1_return_from_request_contact_info ( context, contact_info); g_boxed_free (TP_ARRAY_TYPE_CONTACT_INFO_FIELD_LIST, contact_info); } @@ -302,12 +302,12 @@ salut_conn_contact_info_request_contact_info ( static void salut_conn_contact_info_refresh_contact_info ( - TpSvcConnectionInterfaceContactInfo *iface, + TpSvcConnectionInterfaceContactInfo1 *iface, const GArray *contacts, DBusGMethodInvocation *context) { /* This is a no-op on link-local XMPP: everything's always pushed to us. */ - tp_svc_connection_interface_contact_info_return_from_refresh_contact_info (context); + tp_svc_connection_interface_contact_info1_return_from_refresh_contact_info (context); } void @@ -315,9 +315,9 @@ salut_conn_contact_info_iface_init ( gpointer g_iface, gpointer iface_data) { - TpSvcConnectionInterfaceContactInfoClass *klass = g_iface; + TpSvcConnectionInterfaceContactInfo1Class *klass = g_iface; -#define IMPLEMENT(x) tp_svc_connection_interface_contact_info_implement_##x \ +#define IMPLEMENT(x) tp_svc_connection_interface_contact_info1_implement_##x \ (klass, salut_conn_contact_info_##x) IMPLEMENT (request_contact_info); IMPLEMENT (refresh_contact_info); diff --git a/src/connection.c b/src/connection.c index d49541b..07d4c59 100644 --- a/src/connection.c +++ b/src/connection.c @@ -108,22 +108,22 @@ static void salut_conn_future_iface_init (gpointer, gpointer); G_DEFINE_TYPE_WITH_CODE(SalutConnection, salut_connection, TP_TYPE_BASE_CONNECTION, - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING, + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING1, salut_connection_aliasing_service_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_DBUS_PROPERTIES, tp_dbus_properties_mixin_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS, tp_contacts_mixin_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_LIST, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_LIST1, tp_base_contact_list_mixin_list_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE, + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE1, tp_presence_mixin_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_AVATARS, + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CONNECTION_INTERFACE_AVATARS1, salut_connection_avatar_service_iface_init); G_IMPLEMENT_INTERFACE - (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES, + (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1, salut_conn_contact_caps_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO1, salut_conn_contact_info_iface_init); G_IMPLEMENT_INTERFACE (SALUT_TYPE_SVC_CONNECTION_FUTURE, salut_conn_future_iface_init); @@ -397,15 +397,15 @@ salut_connection_constructed (GObject *obj) TP_BASE_CONTACT_LIST (self->priv->contact_manager), base); tp_contacts_mixin_add_contact_attributes_iface (obj, - TP_IFACE_CONNECTION_INTERFACE_AVATARS, + TP_IFACE_CONNECTION_INTERFACE_AVATARS1, salut_connection_avatars_fill_contact_attributes); tp_contacts_mixin_add_contact_attributes_iface (obj, - TP_IFACE_CONNECTION_INTERFACE_ALIASING, + TP_IFACE_CONNECTION_INTERFACE_ALIASING1, salut_connection_aliasing_fill_contact_attributes); tp_contacts_mixin_add_contact_attributes_iface (G_OBJECT (self), - TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1, conn_contact_capabilities_fill_contact_attributes); self->priv->sidecars = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -729,14 +729,14 @@ set_own_status (GObject *obj, } static const gchar *interfaces [] = { - TP_IFACE_CONNECTION_INTERFACE_ALIASING, - TP_IFACE_CONNECTION_INTERFACE_AVATARS, + TP_IFACE_CONNECTION_INTERFACE_ALIASING1, + TP_IFACE_CONNECTION_INTERFACE_AVATARS1, TP_IFACE_CONNECTION_INTERFACE_CONTACTS, - TP_IFACE_CONNECTION_INTERFACE_PRESENCE, + TP_IFACE_CONNECTION_INTERFACE_PRESENCE1, TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1, + TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1, SALUT_IFACE_CONNECTION_FUTURE, #ifdef ENABLE_OLPC SALUT_IFACE_OLPC_BUDDY_INFO, @@ -773,12 +773,12 @@ salut_connection_class_init (SalutConnectionClass *salut_connection_class) TP_BASE_CONNECTION_CLASS(salut_connection_class); GParamSpec *param_spec; static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CONNECTION_INTERFACE_AVATARS, + { TP_IFACE_CONNECTION_INTERFACE_AVATARS1, conn_avatars_properties_getter, NULL, conn_avatars_properties, }, - { TP_IFACE_CONNECTION_INTERFACE_ALIASING, + { TP_IFACE_CONNECTION_INTERFACE_ALIASING1, conn_aliasing_properties_getter, NULL, conn_aliasing_properties, @@ -1350,7 +1350,7 @@ salut_connection_get_alias (SalutConnection *self, TpHandle handle) * */ static void -salut_connection_request_aliases (TpSvcConnectionInterfaceAliasing *iface, +salut_connection_request_aliases (TpSvcConnectionInterfaceAliasing1 *iface, const GArray *contacts, DBusGMethodInvocation *context) { SalutConnection *self = SALUT_CONNECTION (iface); @@ -1380,7 +1380,7 @@ salut_connection_request_aliases (TpSvcConnectionInterfaceAliasing *iface, aliases[i] = salut_connection_get_alias (self, handle); } - tp_svc_connection_interface_aliasing_return_from_request_aliases (context, + tp_svc_connection_interface_aliasing1_return_from_request_aliases (context, aliases); g_free (aliases); @@ -1402,7 +1402,7 @@ salut_connection_aliasing_fill_contact_attributes (GObject *obj, g_value_set_string (val, salut_connection_get_alias (self, handle)); tp_contacts_mixin_set_contact_attribute (attributes_hash, handle, - TP_IFACE_CONNECTION_INTERFACE_ALIASING"/alias", val); + TP_TOKEN_CONNECTION_INTERFACE_ALIASING1_ALIAS, val); } } @@ -1478,7 +1478,7 @@ conn_contact_capabilities_fill_contact_attributes (GObject *obj, g_value_take_boxed (val, array); tp_contacts_mixin_set_contact_attribute (attributes_hash, handle, - TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES"/capabilities", + TP_TOKEN_CONNECTION_INTERFACE_CONTACT_CAPABILITIES1_CAPABILITIES, val); array = NULL; @@ -1490,7 +1490,7 @@ conn_contact_capabilities_fill_contact_attributes (GObject *obj, } static void -salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface, +salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing1 *iface, GHashTable *aliases, DBusGMethodInvocation *context) { SalutConnection *self = SALUT_CONNECTION (iface); @@ -1520,7 +1520,7 @@ salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface, g_error_free (error); return; } - tp_svc_connection_interface_aliasing_return_from_set_aliases (context); + tp_svc_connection_interface_aliasing1_return_from_set_aliases (context); } static void @@ -1536,7 +1536,7 @@ _contact_manager_contact_alias_changed (SalutConnection *self, GUINT_TO_POINTER (handle), (gchar *) salut_contact_get_alias (contact)); - tp_svc_connection_interface_aliasing_emit_aliases_changed (self, aliases); + tp_svc_connection_interface_aliasing1_emit_aliases_changed (self, aliases); g_hash_table_unref (aliases); } @@ -1545,10 +1545,9 @@ static void salut_connection_aliasing_service_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcConnectionInterfaceAliasingClass *klass = - (TpSvcConnectionInterfaceAliasingClass *) g_iface; + TpSvcConnectionInterfaceAliasing1Class *klass = g_iface; -#define IMPLEMENT(x) tp_svc_connection_interface_aliasing_implement_##x \ +#define IMPLEMENT(x) tp_svc_connection_interface_aliasing1_implement_##x \ (klass, salut_connection_##x) IMPLEMENT (request_aliases); IMPLEMENT (set_aliases); @@ -1560,12 +1559,12 @@ static void _contact_manager_contact_avatar_changed (SalutConnection *self, SalutContact *contact, TpHandle handle) { - tp_svc_connection_interface_avatars_emit_avatar_updated (self, + tp_svc_connection_interface_avatars1_emit_avatar_updated (self, (guint)handle, contact->avatar_token); } static void -salut_connection_clear_avatar (TpSvcConnectionInterfaceAvatars *iface, +salut_connection_clear_avatar (TpSvcConnectionInterfaceAvatars1 *iface, DBusGMethodInvocation *context) { SalutConnection *self = SALUT_CONNECTION (iface); @@ -1581,11 +1580,11 @@ salut_connection_clear_avatar (TpSvcConnectionInterfaceAvatars *iface, g_error_free (error); return; } - tp_svc_connection_interface_avatars_return_from_clear_avatar (context); + tp_svc_connection_interface_avatars1_return_from_clear_avatar (context); } static void -salut_connection_set_avatar (TpSvcConnectionInterfaceAvatars *iface, +salut_connection_set_avatar (TpSvcConnectionInterfaceAvatars1 *iface, const GArray *avatar, const gchar *mime_type, DBusGMethodInvocation *context) { @@ -1605,16 +1604,17 @@ salut_connection_set_avatar (TpSvcConnectionInterfaceAvatars *iface, return; } - tp_svc_connection_interface_avatars_emit_avatar_updated (self, + tp_svc_connection_interface_avatars1_emit_avatar_updated (self, self_handle, priv->self->avatar_token); - tp_svc_connection_interface_avatars_return_from_set_avatar (context, + tp_svc_connection_interface_avatars1_return_from_set_avatar (context, priv->self->avatar_token); } static void salut_connection_get_known_avatar_tokens ( - TpSvcConnectionInterfaceAvatars *iface, const GArray *contacts, + TpSvcConnectionInterfaceAvatars1 *iface, + const GArray *contacts, DBusGMethodInvocation *context) { guint i; @@ -1669,7 +1669,7 @@ salut_connection_get_known_avatar_tokens ( g_hash_table_insert (ret, GUINT_TO_POINTER (handle), tokens); } - tp_svc_connection_interface_avatars_return_from_get_known_avatar_tokens ( + tp_svc_connection_interface_avatars1_return_from_get_known_avatar_tokens ( context, ret); g_hash_table_unref (ret); @@ -1717,7 +1717,7 @@ salut_connection_avatars_fill_contact_attributes (GObject *obj, g_value_take_string (val, token); tp_contacts_mixin_set_contact_attribute (attributes_hash, handle, - TP_IFACE_CONNECTION_INTERFACE_AVATARS"/token", val); + TP_TOKEN_CONNECTION_INTERFACE_AVATARS1_TOKEN, val); } } } @@ -1735,7 +1735,7 @@ _request_avatars_cb (SalutContact *contact, guint8 *avatar, gsize size, arr = g_array_sized_new (FALSE, FALSE, sizeof (guint8), size); arr = g_array_append_vals (arr, avatar, size); - tp_svc_connection_interface_avatars_emit_avatar_retrieved ( + tp_svc_connection_interface_avatars1_emit_avatar_retrieved ( (GObject *) user_data, contact->handle, contact->avatar_token, arr, ""); @@ -1744,7 +1744,7 @@ _request_avatars_cb (SalutContact *contact, guint8 *avatar, gsize size, static void salut_connection_request_avatars ( - TpSvcConnectionInterfaceAvatars *iface, + TpSvcConnectionInterfaceAvatars1 *iface, const GArray *contacts, DBusGMethodInvocation *context) { @@ -1783,7 +1783,7 @@ salut_connection_request_avatars ( arr = g_array_append_vals (arr, priv->self->avatar, priv->self->avatar_size); - tp_svc_connection_interface_avatars_emit_avatar_retrieved ( + tp_svc_connection_interface_avatars1_emit_avatar_retrieved ( (GObject *) self, self_handle, priv->self->avatar_token, arr, ""); g_array_unref (arr); @@ -1802,7 +1802,7 @@ salut_connection_request_avatars ( } } - tp_svc_connection_interface_avatars_return_from_request_avatars (context); + tp_svc_connection_interface_avatars1_return_from_request_avatars (context); } static void @@ -1829,10 +1829,9 @@ static void salut_connection_avatar_service_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcConnectionInterfaceAvatarsClass *klass = - (TpSvcConnectionInterfaceAvatarsClass *) g_iface; + TpSvcConnectionInterfaceAvatars1Class *klass = g_iface; -#define IMPLEMENT(x) tp_svc_connection_interface_avatars_implement_##x \ +#define IMPLEMENT(x) tp_svc_connection_interface_avatars1_implement_##x \ (klass, salut_connection_##x) IMPLEMENT (get_known_avatar_tokens); IMPLEMENT (request_avatars); @@ -1868,7 +1867,7 @@ _emit_contact_capabilities_changed (SalutConnection *conn, salut_connection_get_handle_contact_capabilities (conn, handle, ret); g_hash_table_insert (caps, GUINT_TO_POINTER (handle), ret); - tp_svc_connection_interface_contact_capabilities_emit_contact_capabilities_changed ( + tp_svc_connection_interface_contact_capabilities1_emit_contact_capabilities_changed ( conn, caps); salut_free_enhanced_contact_capabilities (ret); @@ -1943,7 +1942,7 @@ data_forms_equal (GPtrArray *one, */ static void salut_connection_update_capabilities ( - TpSvcConnectionInterfaceContactCapabilities *iface, + TpSvcConnectionInterfaceContactCapabilities1 *iface, const GPtrArray *clients, DBusGMethodInvocation *context) { @@ -2058,18 +2057,17 @@ salut_connection_update_capabilities ( if (before_forms != NULL) g_ptr_array_unref (before_forms); - tp_svc_connection_interface_contact_capabilities_return_from_update_capabilities ( + tp_svc_connection_interface_contact_capabilities1_return_from_update_capabilities ( context); } static void salut_conn_contact_caps_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcConnectionInterfaceContactCapabilitiesClass *klass = - (TpSvcConnectionInterfaceContactCapabilitiesClass *) g_iface; + TpSvcConnectionInterfaceContactCapabilities1Class *klass = g_iface; #define IMPLEMENT(x) \ - tp_svc_connection_interface_contact_capabilities_implement_##x (\ + tp_svc_connection_interface_contact_capabilities1_implement_##x (\ klass, salut_connection_##x) IMPLEMENT(update_capabilities); #undef IMPLEMENT diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c index efc2880..a3621f9 100644 --- a/src/file-transfer-channel.c +++ b/src/file-transfer-channel.c @@ -61,9 +61,9 @@ file_transfer_iface_init (gpointer g_iface, gpointer iface_data); G_DEFINE_TYPE_WITH_CODE (SalutFileTransferChannel, salut_file_transfer_channel, TP_TYPE_BASE_CHANNEL, - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_FILE_TRANSFER, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_FILE_TRANSFER1, file_transfer_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, NULL); ); @@ -125,7 +125,7 @@ struct _SalutFileTransferChannelPrivate { }; static void salut_file_transfer_channel_set_state ( - TpSvcChannelTypeFileTransfer *iface, TpFileTransferState state, + TpSvcChannelTypeFileTransfer1 *iface, TpFileTransferState state, TpFileTransferStateChangeReason reason); static void @@ -138,7 +138,7 @@ salut_file_transfer_channel_close (TpBaseChannel *base) { gibber_file_transfer_cancel (self->priv->ft, 406); salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_CANCELLED, TP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_STOPPED); } @@ -171,7 +171,7 @@ contact_lost_cb (SalutContact *contact, DEBUG ("%s was disconnected. Cancel file tranfer.", contact->name); salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_CANCELLED, TP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_STOPPED); } @@ -268,7 +268,7 @@ salut_file_transfer_channel_set_property (GObject *object, break; case PROP_STATE: salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (object), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (object), g_value_get_uint (value), TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); break; @@ -396,7 +396,7 @@ file_transfer_channel_properties_setter (GObject *object, { SalutFileTransferChannel *self = (SalutFileTransferChannel *) object; - g_return_val_if_fail (interface == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER, + g_return_val_if_fail (interface == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER1, FALSE); /* There is only one property with write access. So TpDBusPropertiesMixin @@ -429,7 +429,7 @@ file_transfer_channel_properties_setter (GObject *object, self->priv->uri = g_value_dup_string (value); - tp_svc_channel_type_file_transfer_emit_uri_defined (self, self->priv->uri); + tp_svc_channel_type_file_transfer1_emit_uri_defined (self, self->priv->uri); return TRUE; } @@ -445,19 +445,19 @@ salut_file_transfer_channel_fill_immutable_properties (TpBaseChannel *chan, tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "State", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "ContentType", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Filename", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Size", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "ContentHashType", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "ContentHash", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Description", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "Date", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "AvailableSocketTypes", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "TransferredBytes", - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "InitialOffset", - TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "ServiceName", - TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "Metadata", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "State", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "ContentType", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Filename", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Size", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "ContentHashType", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "ContentHash", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Description", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "Date", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "AvailableSocketTypes", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "TransferredBytes", + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "InitialOffset", + TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, "ServiceName", + TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, "Metadata", NULL); /* URI is immutable only for outgoing transfers */ @@ -465,7 +465,7 @@ salut_file_transfer_channel_fill_immutable_properties (TpBaseChannel *chan, { tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "URI", NULL); + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, "URI", NULL); } } @@ -508,12 +508,12 @@ salut_file_transfer_channel_class_init ( }; static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, + { TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, tp_dbus_properties_mixin_getter_gobject_properties, file_transfer_channel_properties_setter, file_props }, - { TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, + { TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, file_metadata_props @@ -529,7 +529,7 @@ salut_file_transfer_channel_class_init ( object_class->get_property = salut_file_transfer_channel_get_property; object_class->set_property = salut_file_transfer_channel_set_property; - base_class->channel_type = TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER; + base_class->channel_type = TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1; base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; base_class->close = salut_file_transfer_channel_close; base_class->fill_immutable_properties = @@ -810,7 +810,7 @@ error_cb (GibberFileTransfer *ft, } salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_CANCELLED, receiver ? TP_FILE_TRANSFER_STATE_CHANGE_REASON_LOCAL_ERROR : @@ -826,7 +826,7 @@ ft_finished_cb (GibberFileTransfer *ft, WockyPorter *porter = conn->porter; salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_COMPLETED, TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); @@ -844,7 +844,7 @@ ft_remote_cancelled_cb (GibberFileTransfer *ft, gibber_file_transfer_cancel (ft, 406); salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_CANCELLED, TP_FILE_TRANSFER_STATE_CHANGE_REASON_REMOTE_STOPPED); @@ -873,11 +873,11 @@ remote_accepted_cb (GibberFileTransfer *ft, if (self->priv->socket != NULL) { /* ProvideFile has already been called. Channel is Open */ - tp_svc_channel_type_file_transfer_emit_initial_offset_defined (self, + tp_svc_channel_type_file_transfer1_emit_initial_offset_defined (self, self->priv->initial_offset); salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_OPEN, TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); } @@ -885,7 +885,7 @@ remote_accepted_cb (GibberFileTransfer *ft, { /* Client has to call ProvideFile to open the channel */ salut_file_transfer_channel_set_state ( - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self), + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self), TP_FILE_TRANSFER_STATE_ACCEPTED, TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE); } @@ -1035,7 +1035,7 @@ send_file_offer (SalutFileTransferChannel *self) static void salut_file_transfer_channel_set_state ( - TpSvcChannelTypeFileTransfer *iface, + TpSvcChannelTypeFileTransfer1 *iface, TpFileTransferState state, TpFileTransferStateChangeReason reason) { @@ -1045,19 +1045,19 @@ salut_file_transfer_channel_set_state ( return; self->priv->state = state; - tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed (iface, + tp_svc_channel_type_file_transfer1_emit_file_transfer_state_changed (iface, state, reason); } static void emit_progress_update (SalutFileTransferChannel *self) { - TpSvcChannelTypeFileTransfer *iface = \ - TP_SVC_CHANNEL_TYPE_FILE_TRANSFER (self); + TpSvcChannelTypeFileTransfer1 *iface = \ + TP_SVC_CHANNEL_TYPE_FILE_TRANSFER1 (self); g_get_current_time (&self->priv->last_transferred_bytes_emitted); - tp_svc_channel_type_file_transfer_emit_transferred_bytes_changed ( + tp_svc_channel_type_file_transfer1_emit_transferred_bytes_changed ( iface, self->priv->transferred_bytes); if (self->priv->progress_timer != 0) @@ -1191,7 +1191,7 @@ salut_file_transfer_channel_offer_file (SalutFileTransferChannel *self, * on interface im.telepathy1.Channel.Type.FileTransfer */ static void -salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer *iface, +salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer1 *iface, TpSocketAddressType address_type, guint access_control, const GValue *access_control_param, @@ -1246,14 +1246,14 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer *iface, socket_addr = g_socket_get_local_address (self->priv->socket, NULL); addr = tp_address_variant_from_g_socket_address (socket_addr, NULL, NULL); - tp_svc_channel_type_file_transfer_return_from_accept_file (context, + tp_svc_channel_type_file_transfer1_return_from_accept_file (context, addr); tp_g_value_slice_free (addr); g_object_unref (socket_addr); self->priv->initial_offset = 0; - tp_svc_channel_type_file_transfer_emit_initial_offset_defined (self, + tp_svc_channel_type_file_transfer1_emit_initial_offset_defined (self, self->priv->initial_offset); salut_file_transfer_channel_set_state (iface, TP_FILE_TRANSFER_STATE_OPEN, @@ -1268,7 +1268,7 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer *iface, */ static void salut_file_transfer_channel_provide_file ( - TpSvcChannelTypeFileTransfer *iface, + TpSvcChannelTypeFileTransfer1 *iface, guint address_type, guint access_control, const GValue *access_control_param, @@ -1316,7 +1316,7 @@ salut_file_transfer_channel_provide_file ( { /* Remote already accepted the file. Channel is Open. * If not channel stay Pending. */ - tp_svc_channel_type_file_transfer_emit_initial_offset_defined (self, + tp_svc_channel_type_file_transfer1_emit_initial_offset_defined (self, self->priv->initial_offset); salut_file_transfer_channel_set_state (iface, @@ -1326,7 +1326,7 @@ salut_file_transfer_channel_provide_file ( socket_addr = g_socket_get_local_address (self->priv->socket, &error); addr = tp_address_variant_from_g_socket_address (socket_addr, NULL, NULL); - tp_svc_channel_type_file_transfer_return_from_provide_file (context, + tp_svc_channel_type_file_transfer1_return_from_provide_file (context, addr); tp_g_value_slice_free (addr); g_object_unref (socket_addr); @@ -1336,10 +1336,10 @@ static void file_transfer_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeFileTransferClass *klass = - (TpSvcChannelTypeFileTransferClass *) g_iface; + TpSvcChannelTypeFileTransfer1Class *klass = + (TpSvcChannelTypeFileTransfer1Class *) g_iface; -#define IMPLEMENT(x) tp_svc_channel_type_file_transfer_implement_##x (\ +#define IMPLEMENT(x) tp_svc_channel_type_file_transfer1_implement_##x (\ klass, salut_file_transfer_channel_##x) IMPLEMENT (accept_file); IMPLEMENT (provide_file); diff --git a/src/ft-manager.c b/src/ft-manager.c index f0edfbe..8393644 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -304,7 +304,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, /* We only support file transfer channels */ if (tp_strdiff (tp_asv_get_string (request_properties, TP_IFACE_CHANNEL ".ChannelType"), - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1)) return FALSE; /* And only contact handles */ @@ -328,7 +328,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, } content_type = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType"); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_TYPE); if (content_type == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, @@ -337,7 +337,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, } filename = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename"); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_FILENAME); if (filename == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, @@ -346,7 +346,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, } size = tp_asv_get_uint64 (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_SIZE, NULL); if (size == 0) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, @@ -355,7 +355,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, } content_hash_type = tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHashType", &valid); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_HASH_TYPE, &valid); if (!valid) { /* Assume File_Hash_Type_None */ @@ -374,7 +374,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager, if (content_hash_type != TP_FILE_HASH_TYPE_NONE) { content_hash = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash"); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_HASH); if (content_hash == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, @@ -389,22 +389,22 @@ salut_ft_manager_handle_request (TpChannelManager *manager, } description = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Description"); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_DESCRIPTION); date = tp_asv_get_uint64 (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date", NULL); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_DATE, NULL); initial_offset = tp_asv_get_uint64 (request_properties, - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".InitialOffset", NULL); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_INITIAL_OFFSET, NULL); file_uri = tp_asv_get_string (request_properties, - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_URI); + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_URI); service_name = tp_asv_get_string (request_properties, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME); + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_SERVICE_NAME); metadata = tp_asv_get_boxed (request_properties, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_METADATA, + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_METADATA, TP_HASH_TYPE_METADATA); if (metadata != NULL && g_hash_table_lookup ((GHashTable *) metadata, "FORM_TYPE")) @@ -479,17 +479,17 @@ static const gchar * const file_transfer_channel_fixed_properties[] = { /* ContentHashType has to be first so we can easily skip it if needed (we * currently don't as Salut doesn't support any hash mechanism) */ #define STANDARD_PROPERTIES \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_HASH_TYPE, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_HASH_TYPE, \ TP_PROP_CHANNEL_TARGET_HANDLE, \ TP_PROP_CHANNEL_TARGET_ID, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_TYPE, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_HASH, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_DESCRIPTION, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_DATE, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_INITIAL_OFFSET, \ - TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_URI + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_TYPE, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_FILENAME, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_SIZE, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_CONTENT_HASH, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_DESCRIPTION, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_DATE, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_INITIAL_OFFSET, \ + TP_PROP_CHANNEL_TYPE_FILE_TRANSFER1_URI static const gchar * const file_transfer_channel_allowed_properties[] = { @@ -500,15 +500,15 @@ static const gchar * const file_transfer_channel_allowed_properties[] = static const gchar * const file_transfer_channel_allowed_properties_with_metadata_prop[] = { STANDARD_PROPERTIES, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_METADATA, + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_METADATA, NULL }; static const gchar * const file_transfer_channel_allowed_properties_with_both_metadata_props[] = { STANDARD_PROPERTIES, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_METADATA, + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_SERVICE_NAME, + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_METADATA, NULL }; @@ -524,7 +524,7 @@ salut_ft_manager_type_foreach_channel_class (GType type, NULL, (GDestroyNotify) tp_g_value_slice_free); value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER); + g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1); g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType" , value); value = tp_g_value_slice_new (G_TYPE_UINT); @@ -599,7 +599,7 @@ add_file_transfer_channel_class (GPtrArray *arr, (GDestroyNotify) tp_g_value_slice_free); channel_type_value = tp_g_value_slice_new_static_string ( - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER); + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1); g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", channel_type_value); @@ -612,7 +612,7 @@ add_file_transfer_channel_class (GPtrArray *arr, { service_name_value = tp_g_value_slice_new_string (service_name_str); g_hash_table_insert (fixed_properties, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME, + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_SERVICE_NAME, service_name_value); } @@ -691,7 +691,7 @@ salut_ft_manager_represent_client ( if (tp_strdiff (tp_asv_get_string (channel_class, TP_IFACE_CHANNEL ".ChannelType"), - TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) + TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1)) continue; if (tp_asv_get_uint32 (channel_class, @@ -714,7 +714,7 @@ salut_ft_manager_represent_client ( continue; service_name = tp_asv_get_string (channel_class, - TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME); + TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA1_SERVICE_NAME); if (service_name == NULL) continue; diff --git a/src/muc-channel.c b/src/muc-channel.c index 73d7bf9..2020533 100644 --- a/src/muc-channel.c +++ b/src/muc-channel.c @@ -57,7 +57,7 @@ #include "util.h" G_DEFINE_TYPE_WITH_CODE(SalutMucChannel, salut_muc_channel, TP_TYPE_BASE_CHANNEL, - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP1, tp_group_mixin_iface_init); G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_iface_init); @@ -657,7 +657,7 @@ salut_muc_channel_get_interfaces (TpBaseChannel *chan) GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_muc_channel_parent_class) ->get_interfaces (chan); - g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP1); return interfaces; } @@ -1750,18 +1750,18 @@ salut_muc_channel_tube_request (SalutMucChannel *self, channel_type = tp_asv_get_string (request_properties, TP_PROP_CHANNEL_CHANNEL_TYPE); - if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) { type = SALUT_TUBE_TYPE_STREAM; service = tp_asv_get_string (request_properties, - TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); } - else if (! tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + else if (! tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) { type = SALUT_TUBE_TYPE_DBUS; service = tp_asv_get_string (request_properties, - TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); } else /* This assertion is safe: this function's caller only calls it in one of diff --git a/src/muc-manager.c b/src/muc-manager.c index cdeccdd..30a0a81 100644 --- a/src/muc-manager.c +++ b/src/muc-manager.c @@ -367,13 +367,13 @@ salut_muc_manager_type_foreach_channel_class (GType type, /* im.telepathy1.Channel.Type.StreamTube */ g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); + TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1); func (type, table, salut_tube_stream_channel_get_allowed_properties (), user_data); /* Muc Channel.Type.DBusTube */ g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE); + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1); func (type, table, salut_tube_dbus_channel_get_allowed_properties (), user_data); @@ -802,12 +802,12 @@ handle_stream_tube_channel_request (SalutMucManager *self, /* "Service" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); if (service == NULL) { g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Request does not contain the mandatory property '%s'", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); return FALSE; } @@ -833,12 +833,12 @@ handle_dbus_tube_channel_request (SalutMucManager *self, /* "ServiceName" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); if (service == NULL) { g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Request does not contain the mandatory property '%s'", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); return FALSE; } @@ -866,8 +866,8 @@ salut_muc_manager_request (SalutMucManager *self, TP_IFACE_CHANNEL ".ChannelType"); if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT) && - tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) && - tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1) && + tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) return FALSE; /* validity already checked by TpBaseConnection */ @@ -928,13 +928,13 @@ salut_muc_manager_request (SalutMucManager *self, return TRUE; } - else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) { if (handle_stream_tube_channel_request (self, request_token, request_properties, require_new, handle, &error)) return TRUE; } - else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) { if (handle_dbus_tube_channel_request (self, request_token, request_properties, require_new, handle, &error)) diff --git a/src/muc-tube-dbus.c b/src/muc-tube-dbus.c index 3054885..ad12f4f 100644 --- a/src/muc-tube-dbus.c +++ b/src/muc-tube-dbus.c @@ -37,7 +37,7 @@ salut_muc_tube_dbus_get_interfaces (TpBaseChannel *chan) GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_muc_tube_dbus_parent_class) ->get_interfaces (chan); - g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP1); return interfaces; } diff --git a/src/muc-tube-stream.c b/src/muc-tube-stream.c index f66a96f..25cff3b 100644 --- a/src/muc-tube-stream.c +++ b/src/muc-tube-stream.c @@ -37,7 +37,7 @@ salut_muc_tube_stream_get_interfaces (TpBaseChannel *chan) GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_muc_tube_stream_parent_class) ->get_interfaces (chan); - g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP1); return interfaces; } diff --git a/src/protocol.c b/src/protocol.c index 1223734..779ae9b 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -280,8 +280,8 @@ get_interfaces_array (TpBaseProtocol *self) interfaces = TP_BASE_PROTOCOL_CLASS ( salut_protocol_parent_class)->get_interfaces_array (self); - g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_AVATARS); - g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_PRESENCE); + g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_AVATARS1); + g_ptr_array_add (interfaces, TP_IFACE_PROTOCOL_INTERFACE_PRESENCE1); return interfaces; } diff --git a/src/roomlist-channel.c b/src/roomlist-channel.c index c09a643..1e59822 100644 --- a/src/roomlist-channel.c +++ b/src/roomlist-channel.c @@ -37,7 +37,7 @@ static void roomlist_iface_init (gpointer, gpointer); G_DEFINE_TYPE_WITH_CODE (SalutRoomlistChannel, salut_roomlist_channel, TP_TYPE_BASE_CHANNEL, - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_ROOM_LIST, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_ROOM_LIST1, roomlist_iface_init); ); @@ -96,7 +96,7 @@ salut_roomlist_channel_fill_immutable_properties (TpBaseChannel *chan, tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_TYPE_ROOM_LIST, "Server", + TP_IFACE_CHANNEL_TYPE_ROOM_LIST1, "Server", NULL); } @@ -112,7 +112,7 @@ salut_roomlist_channel_class_init ( { NULL } }; static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_TYPE_ROOM_LIST, + { TP_IFACE_CHANNEL_TYPE_ROOM_LIST1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, roomlist_props, @@ -127,7 +127,7 @@ salut_roomlist_channel_class_init ( object_class->dispose = salut_roomlist_channel_dispose; object_class->finalize = salut_roomlist_channel_finalize; - base_class->channel_type = TP_IFACE_CHANNEL_TYPE_ROOM_LIST; + base_class->channel_type = TP_IFACE_CHANNEL_TYPE_ROOM_LIST1; base_class->target_handle_type = TP_HANDLE_TYPE_NONE; base_class->fill_immutable_properties = salut_roomlist_channel_fill_immutable_properties; @@ -308,14 +308,14 @@ salut_roomlist_channel_remove_room (SalutRoomlistChannel *self, * Returns: TRUE if successful, FALSE if an error was thrown. */ static void -salut_roomlist_channel_get_listing_rooms (TpSvcChannelTypeRoomList *iface, +salut_roomlist_channel_get_listing_rooms (TpSvcChannelTypeRoomList1 *iface, DBusGMethodInvocation *context) { SalutRoomlistChannel *self = SALUT_ROOMLIST_CHANNEL (iface); g_assert (SALUT_IS_ROOMLIST_CHANNEL (self)); - tp_svc_channel_type_room_list_return_from_get_listing_rooms ( + tp_svc_channel_type_room_list1_return_from_get_listing_rooms ( context, FALSE); } @@ -333,17 +333,17 @@ salut_roomlist_channel_get_listing_rooms (TpSvcChannelTypeRoomList *iface, * Returns: TRUE if successful, FALSE if an error was thrown. */ static void -salut_roomlist_channel_list_rooms (TpSvcChannelTypeRoomList *iface, +salut_roomlist_channel_list_rooms (TpSvcChannelTypeRoomList1 *iface, DBusGMethodInvocation *context) { SalutRoomlistChannel *self = SALUT_ROOMLIST_CHANNEL (iface); SalutRoomlistChannelPrivate *priv = self->priv; - tp_svc_channel_type_room_list_emit_listing_rooms (iface, TRUE); - tp_svc_channel_type_room_list_emit_got_rooms (iface, priv->rooms); - tp_svc_channel_type_room_list_emit_listing_rooms (iface, FALSE); + tp_svc_channel_type_room_list1_emit_listing_rooms (iface, TRUE); + tp_svc_channel_type_room_list1_emit_got_rooms (iface, priv->rooms); + tp_svc_channel_type_room_list1_emit_listing_rooms (iface, FALSE); - tp_svc_channel_type_room_list_return_from_list_rooms (context); + tp_svc_channel_type_room_list1_return_from_list_rooms (context); } /** @@ -353,20 +353,19 @@ salut_roomlist_channel_list_rooms (TpSvcChannelTypeRoomList *iface, * on interface im.telepathy1.Channel.Type.RoomList */ static void -salut_roomlist_channel_stop_listing (TpSvcChannelTypeRoomList *iface, +salut_roomlist_channel_stop_listing (TpSvcChannelTypeRoomList1 *iface, DBusGMethodInvocation *context) { - tp_svc_channel_type_room_list_return_from_stop_listing (context); + tp_svc_channel_type_room_list1_return_from_stop_listing (context); } static void roomlist_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeRoomListClass *klass = - (TpSvcChannelTypeRoomListClass *) g_iface; + TpSvcChannelTypeRoomList1Class *klass = g_iface; -#define IMPLEMENT(x) tp_svc_channel_type_room_list_implement_##x (\ +#define IMPLEMENT(x) tp_svc_channel_type_room_list1_implement_##x (\ klass, salut_roomlist_channel_##x) IMPLEMENT(get_listing_rooms); IMPLEMENT(list_rooms); diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c index 1b808c7..076588b 100644 --- a/src/roomlist-manager.c +++ b/src/roomlist-manager.c @@ -301,7 +301,7 @@ salut_roomlist_manager_type_foreach_channel_class (GType type, channel_type_value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_ROOM_LIST); + TP_IFACE_CHANNEL_TYPE_ROOM_LIST1); g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", channel_type_value); @@ -392,7 +392,7 @@ salut_roomlist_manager_request (TpChannelManager *manager, if (tp_strdiff (tp_asv_get_string (request_properties, TP_IFACE_CHANNEL ".ChannelType"), - TP_IFACE_CHANNEL_TYPE_ROOM_LIST)) + TP_IFACE_CHANNEL_TYPE_ROOM_LIST1)) return FALSE; if (tp_asv_get_uint32 (request_properties, diff --git a/src/tube-dbus.c b/src/tube-dbus.c index c48421d..ebe9a17 100644 --- a/src/tube-dbus.c +++ b/src/tube-dbus.c @@ -59,15 +59,15 @@ static void dbustube_iface_init (gpointer g_iface, gpointer iface_data); G_DEFINE_TYPE_WITH_CODE (SalutTubeDBus, salut_tube_dbus, TP_TYPE_BASE_CHANNEL, G_IMPLEMENT_INTERFACE (SALUT_TYPE_TUBE_IFACE, tube_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_DBUS_TUBE, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_DBUS_TUBE1, dbustube_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE1, NULL)) static const gchar * const salut_tube_dbus_channel_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", TP_IFACE_CHANNEL ".TargetID", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName", + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME, NULL }; @@ -518,7 +518,7 @@ bytestream_state_changed_cb (GibberBytestreamIface *bytestream, { tube_dbus_open (self); - tp_svc_channel_interface_tube_emit_tube_channel_state_changed (self, + tp_svc_channel_interface_tube1_emit_tube_channel_state_changed (self, TP_TUBE_CHANNEL_STATE_OPEN); g_signal_emit (G_OBJECT (self), signals[OPENED], 0); @@ -841,15 +841,15 @@ salut_tube_dbus_fill_immutable_properties (TpBaseChannel *chan, tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, "ServiceName", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, "SupportedAccessControls", + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, "ServiceName", + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, "SupportedAccessControls", NULL); if (!tp_base_channel_is_requested (chan)) { tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters", + TP_IFACE_CHANNEL_INTERFACE_TUBE1, "Parameters", NULL); } } @@ -877,7 +877,7 @@ salut_tube_dbus_get_interfaces (TpBaseChannel *chan) GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_tube_dbus_parent_class) ->get_interfaces (chan); - g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE1); return interfaces; } @@ -896,12 +896,12 @@ salut_tube_dbus_class_init (SalutTubeDBusClass *salut_tube_dbus_class) { NULL } }; static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, + { TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, dbus_tube_props, }, - { TP_IFACE_CHANNEL_INTERFACE_TUBE, + { TP_IFACE_CHANNEL_INTERFACE_TUBE1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, tube_iface_props, @@ -916,7 +916,7 @@ salut_tube_dbus_class_init (SalutTubeDBusClass *salut_tube_dbus_class) object_class->set_property = salut_tube_dbus_set_property; object_class->constructor = salut_tube_dbus_constructor; - base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE; + base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1; base_class->get_interfaces = salut_tube_dbus_get_interfaces; base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; base_class->close = salut_tube_dbus_close_dbus; @@ -1450,7 +1450,7 @@ salut_tube_dbus_add_name (SalutTubeDBus *self, g_hash_table_insert (added, GUINT_TO_POINTER (handle), (gchar *) name); - tp_svc_channel_type_dbus_tube_emit_dbus_names_changed (self, added, + tp_svc_channel_type_dbus_tube1_emit_dbus_names_changed (self, added, removed); g_hash_table_unref (added); @@ -1484,7 +1484,7 @@ salut_tube_dbus_remove_name (SalutTubeDBus *self, g_array_append_val (removed, handle); - tp_svc_channel_type_dbus_tube_emit_dbus_names_changed (self, added, + tp_svc_channel_type_dbus_tube1_emit_dbus_names_changed (self, added, removed); g_hash_table_unref (added); @@ -1539,7 +1539,7 @@ salut_tube_dbus_check_access_control (SalutTubeDBus *self, * im.telepathy1.Channel.Type.DBusTube */ static void -salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube *self, +salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube1 *self, GHashTable *parameters, guint access_control, DBusGMethodInvocation *context) @@ -1561,7 +1561,7 @@ salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube *self, if (salut_tube_dbus_offer (tube, &error)) { - tp_svc_channel_type_dbus_tube_return_from_offer (context, + tp_svc_channel_type_dbus_tube1_return_from_offer (context, priv->dbus_srv_addr); } else @@ -1579,7 +1579,7 @@ salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube *self, * im.telepathy1.Channel.Type.DBusTube */ static void -salut_tube_dbus_accept_async (TpSvcChannelTypeDBusTube *self, +salut_tube_dbus_accept_async (TpSvcChannelTypeDBusTube1 *self, guint access_control, DBusGMethodInvocation *context) { @@ -1596,7 +1596,7 @@ salut_tube_dbus_accept_async (TpSvcChannelTypeDBusTube *self, if (salut_tube_dbus_accept (SALUT_TUBE_IFACE (tube), &error)) { - tp_svc_channel_type_dbus_tube_return_from_accept (context, + tp_svc_channel_type_dbus_tube1_return_from_accept (context, priv->dbus_srv_addr); } else @@ -1623,10 +1623,9 @@ static void dbustube_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeDBusTubeClass *klass = - (TpSvcChannelTypeDBusTubeClass *) g_iface; + TpSvcChannelTypeDBusTube1Class *klass = g_iface; -#define IMPLEMENT(x, suffix) tp_svc_channel_type_dbus_tube_implement_##x (\ +#define IMPLEMENT(x, suffix) tp_svc_channel_type_dbus_tube1_implement_##x (\ klass, salut_tube_dbus_##x##suffix) IMPLEMENT(offer,_async); IMPLEMENT(accept,_async); diff --git a/src/tube-stream.c b/src/tube-stream.c index c55c4db..06e5d6d 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -73,15 +73,15 @@ static void streamtube_iface_init (gpointer g_iface, gpointer iface_data); G_DEFINE_TYPE_WITH_CODE (SalutTubeStream, salut_tube_stream, TP_TYPE_BASE_CHANNEL, G_IMPLEMENT_INTERFACE (SALUT_TYPE_TUBE_IFACE, tube_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE1, streamtube_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE, + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE1, NULL)); static const gchar * const salut_tube_stream_channel_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", TP_IFACE_CHANNEL ".TargetID", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service", + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE, NULL }; @@ -253,7 +253,7 @@ fire_connection_closed (SalutTubeStream *self, * same connection. */ g_hash_table_remove (priv->transport_to_id, transport); - tp_svc_channel_type_stream_tube_emit_connection_closed (self, + tp_svc_channel_type_stream_tube1_emit_connection_closed (self, connection_id, error, debug_msg); } @@ -669,7 +669,7 @@ fire_new_local_connection (SalutTubeStream *self, connection_id = generate_connection_id (self, transport); - tp_svc_channel_type_stream_tube_emit_new_local_connection (self, + tp_svc_channel_type_stream_tube1_emit_new_local_connection (self, connection_id); } @@ -735,7 +735,7 @@ fire_new_remote_connection (SalutTubeStream *self, transport)); g_assert (connection_id != 0); - tp_svc_channel_type_stream_tube_emit_new_remote_connection (self, + tp_svc_channel_type_stream_tube1_emit_new_remote_connection (self, contact, contact_id, &access_control_param, connection_id); g_value_unset (&access_control_param); } @@ -1244,15 +1244,15 @@ salut_tube_stream_fill_immutable_properties (TpBaseChannel *chan, tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "Service", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "SupportedSocketTypes", + TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, "Service", + TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, "SupportedSocketTypes", NULL); if (!tp_base_channel_is_requested (chan)) { tp_dbus_properties_mixin_fill_properties_hash ( G_OBJECT (chan), properties, - TP_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters", + TP_IFACE_CHANNEL_INTERFACE_TUBE1, "Parameters", NULL); } } @@ -1280,7 +1280,7 @@ salut_tube_stream_get_interfaces (TpBaseChannel *chan) GPtrArray *interfaces = TP_BASE_CHANNEL_CLASS (salut_tube_stream_parent_class) ->get_interfaces (chan); - g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_TUBE1); return interfaces; } @@ -1298,12 +1298,12 @@ salut_tube_stream_class_init (SalutTubeStreamClass *salut_tube_stream_class) { NULL } }; static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, + { TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, stream_tube_props, }, - { TP_IFACE_CHANNEL_INTERFACE_TUBE, + { TP_IFACE_CHANNEL_INTERFACE_TUBE1, tp_dbus_properties_mixin_getter_gobject_properties, NULL, tube_iface_props, @@ -1319,7 +1319,7 @@ salut_tube_stream_class_init (SalutTubeStreamClass *salut_tube_stream_class) object_class->set_property = salut_tube_stream_set_property; object_class->constructor = salut_tube_stream_constructor; - base_class->channel_type = TP_IFACE_CHANNEL_TYPE_STREAM_TUBE; + base_class->channel_type = TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1; base_class->get_interfaces = salut_tube_stream_get_interfaces; base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; base_class->close = salut_tube_stream_close_dbus; @@ -1582,7 +1582,7 @@ salut_tube_stream_accept (SalutTubeIface *tube, priv->state = TP_TUBE_CHANNEL_STATE_OPEN; g_signal_emit (G_OBJECT (self), signals[OPENED], 0); - tp_svc_channel_interface_tube_emit_tube_channel_state_changed ( + tp_svc_channel_interface_tube1_emit_tube_channel_state_changed ( self, TP_TUBE_CHANNEL_STATE_OPEN); return TRUE; @@ -1605,7 +1605,7 @@ salut_tube_stream_accepted (SalutTubeIface *tube) priv->state = TP_TUBE_CHANNEL_STATE_OPEN; g_signal_emit (G_OBJECT (self), signals[OPENED], 0); - tp_svc_channel_interface_tube_emit_tube_channel_state_changed ( + tp_svc_channel_interface_tube1_emit_tube_channel_state_changed ( self, TP_TUBE_CHANNEL_STATE_OPEN); } @@ -2056,7 +2056,7 @@ salut_tube_stream_check_params (TpSocketAddressType address_type, * on im.telepathy1.Channel.Type.StreamTube */ static void -salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube *iface, +salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube1 *iface, guint address_type, const GValue *address, guint access_control, @@ -2103,7 +2103,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube *iface, return; } - tp_svc_channel_type_stream_tube_return_from_offer (context); + tp_svc_channel_type_stream_tube1_return_from_offer (context); } /** @@ -2113,7 +2113,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube *iface, * on im.telepathy1.Channel.Type.StreamTube */ static void -salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface, +salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface, guint address_type, guint access_control, const GValue *access_control_param, @@ -2172,7 +2172,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface, salut_muc_channel_send_presence (self->muc, NULL); #endif - tp_svc_channel_type_stream_tube_return_from_accept (context, + tp_svc_channel_type_stream_tube1_return_from_accept (context, priv->address); } @@ -2234,14 +2234,14 @@ salut_tube_stream_offer (SalutTubeStream *self, { priv->state = TP_TUBE_CHANNEL_STATE_REMOTE_PENDING; - tp_svc_channel_interface_tube_emit_tube_channel_state_changed ( + tp_svc_channel_interface_tube1_emit_tube_channel_state_changed ( self, TP_TUBE_CHANNEL_STATE_REMOTE_PENDING); } else { /* muc tube is open as soon it's offered */ priv->state = TP_TUBE_CHANNEL_STATE_OPEN; - tp_svc_channel_interface_tube_emit_tube_channel_state_changed ( + tp_svc_channel_interface_tube1_emit_tube_channel_state_changed ( self, TP_TUBE_CHANNEL_STATE_OPEN); g_signal_emit (G_OBJECT (self), signals[OPENED], 0); } @@ -2274,10 +2274,9 @@ static void streamtube_iface_init (gpointer g_iface, gpointer iface_data) { - TpSvcChannelTypeStreamTubeClass *klass = - (TpSvcChannelTypeStreamTubeClass *) g_iface; + TpSvcChannelTypeStreamTube1Class *klass = g_iface; -#define IMPLEMENT(x, suffix) tp_svc_channel_type_stream_tube_implement_##x (\ +#define IMPLEMENT(x, suffix) tp_svc_channel_type_stream_tube1_implement_##x (\ klass, salut_tube_stream_##x##suffix) IMPLEMENT(offer,_async); IMPLEMENT(accept,_async); diff --git a/src/tubes-manager.c b/src/tubes-manager.c index 45b6566..98895c1 100644 --- a/src/tubes-manager.c +++ b/src/tubes-manager.c @@ -563,7 +563,7 @@ static const gchar * const tubes_channel_fixed_properties[] = { static const gchar * const stream_tube_channel_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", TP_IFACE_CHANNEL ".TargetID", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service", + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE, NULL }; @@ -572,7 +572,7 @@ static const gchar * const stream_tube_channel_allowed_properties[] = { static const gchar * const dbus_tube_channel_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", TP_IFACE_CHANNEL ".TargetID", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName", + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME, NULL }; #endif @@ -590,7 +590,7 @@ salut_tubes_manager_type_foreach_channel_class (GType type, (GDestroyNotify) tp_g_value_slice_free); value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); + g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1); g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", value); @@ -773,17 +773,17 @@ new_channel_from_request (SalutTubesManager *self, (GDestroyNotify) tp_g_value_slice_free); - if (!tp_strdiff (ctype, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + if (!tp_strdiff (ctype, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) { service = tp_asv_get_string (request, - TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); type = SALUT_TUBE_TYPE_STREAM; } - else if (!tp_strdiff (ctype, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + else if (!tp_strdiff (ctype, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) { service = tp_asv_get_string (request, - TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); type = SALUT_TUBE_TYPE_DBUS; } @@ -827,11 +827,11 @@ salut_tubes_manager_requestotron (SalutTubesManager *self, if ( /* Temporarily disabled since the implementation is incomplete. */ - /* tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE) && */ - tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + /* tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1) && */ + tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) return FALSE; - if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) { if (tp_channel_manager_asv_has_unknown_properties (request_properties, tubes_channel_fixed_properties, @@ -841,18 +841,18 @@ salut_tubes_manager_requestotron (SalutTubesManager *self, /* "Service" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); if (service == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "StreamTube requests must include '%s'", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); goto error; } } /* Temporarily disabled since the implementation is incomplete. */ #if 0 - else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) { GError *err = NULL; @@ -864,12 +864,12 @@ salut_tubes_manager_requestotron (SalutTubesManager *self, /* "ServiceName" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); if (service == NULL) { g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Request missed a mandatory property '%s'", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); goto error; } @@ -1016,10 +1016,10 @@ add_service_to_array (const gchar *service, channel_type_value = tp_g_value_slice_new (G_TYPE_STRING); if (type == SALUT_TUBE_TYPE_STREAM) g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); + TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1); else g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE); + TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1); g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", channel_type_value); @@ -1032,11 +1032,11 @@ add_service_to_array (const gchar *service, g_value_set_string (target_handle_type_value, service); if (type == SALUT_TUBE_TYPE_STREAM) g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service", + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE, target_handle_type_value); else g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName", + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME, target_handle_type_value); dbus_g_type_struct_set (&monster, @@ -1068,7 +1068,7 @@ add_generic_tube_caps (GPtrArray *arr) channel_type_value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (channel_type_value, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); + TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1); g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", channel_type_value); @@ -1183,26 +1183,26 @@ gabble_private_tubes_factory_add_cap (GabbleCapsChannelManager *manager, TP_IFACE_CHANNEL ".ChannelType"); /* this channel is not for this factory */ - if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) && - tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1) && + tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) return; if (tp_asv_get_uint32 (cap, TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT) return; - if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) + if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) { service = tp_asv_get_string (cap, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE); if (service != NULL) ns = g_strconcat (STREAM_CAP_PREFIX, service, NULL); } - else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) + else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1)) { service = tp_asv_get_string (cap, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME); if (service != NULL) ns = g_strconcat (DBUS_CAP_PREFIX, service, NULL); diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c index fd52820..4fbeb65 100644 --- a/src/write-mgr-file.c +++ b/src/write-mgr-file.c @@ -271,7 +271,7 @@ write_presence (GKeyFile *f, gpointer k, v; statuses = tp_asv_get_boxed (props, - TP_PROP_PROTOCOL_INTERFACE_PRESENCE_STATUSES, + TP_PROP_PROTOCOL_INTERFACE_PRESENCE1_STATUSES, TP_HASH_TYPE_STATUS_SPEC_MAP); g_return_if_fail (statuses != NULL); @@ -342,37 +342,37 @@ mgr_file_contents (const char *busname, /* Avatars */ mime_types = tp_asv_get_strv (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_SUPPORTED_AVATAR_MIME_TYPES); + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_SUPPORTED_AVATAR_MIME_TYPES); g_key_file_set_string_list (f, section_name, "SupportedAvatarMIMETypes", mime_types, g_strv_length ((gchar **) mime_types)); g_key_file_set_integer (f, section_name, "MinimumAvatarHeight", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_MINIMUM_AVATAR_HEIGHT, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_MINIMUM_AVATAR_HEIGHT, NULL)); g_key_file_set_integer (f, section_name, "RecommendedAvatarHeight", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_RECOMMENDED_AVATAR_HEIGHT, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_RECOMMENDED_AVATAR_HEIGHT, NULL)); g_key_file_set_integer (f, section_name, "MaximumAvatarHeight", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_MAXIMUM_AVATAR_HEIGHT, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_MAXIMUM_AVATAR_HEIGHT, NULL)); g_key_file_set_integer (f, section_name, "MinimumAvatarWidth", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_MINIMUM_AVATAR_WIDTH, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_MINIMUM_AVATAR_WIDTH, NULL)); g_key_file_set_integer (f, section_name, "RecommendedAvatarWidth", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_RECOMMENDED_AVATAR_WIDTH, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_RECOMMENDED_AVATAR_WIDTH, NULL)); g_key_file_set_integer (f, section_name, "MaximumAvatarWidth", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_MAXIMUM_AVATAR_WIDTH, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_MAXIMUM_AVATAR_WIDTH, NULL)); g_key_file_set_integer (f, section_name, "MaximumAvatarBytes", tp_asv_get_uint32 (props, - TP_PROP_PROTOCOL_INTERFACE_AVATARS_MAXIMUM_AVATAR_BYTES, + TP_PROP_PROTOCOL_INTERFACE_AVATARS1_MAXIMUM_AVATAR_BYTES, NULL)); write_presence (f, section_name, props); -- 1.8.4.rc3