diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-05-27 13:29:27 +0200 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-05-27 13:41:20 +0200 |
commit | 1e42a9cd5fe1dce527c1074402763cd3d203cd4c (patch) | |
tree | 26c862bdaf4fdd6bc12af062e2af114e745c534e | |
parent | 69f00e7be3a9a4984570d1e7fe4eafb4ba61f077 (diff) | |
download | telepathy-haze-1e42a9cd5fe1dce527c1074402763cd3d203cd4c.tar.gz |
Stop using deprecated tp-glib symbols
tp-haze already depends on tp-glib 0.15.1 which is enough
for all replacements AFAIK. In particular tp_handle_ref/unref
are no-op since 0.13.8.
-rw-r--r-- | src/connection-aliasing.c | 5 | ||||
-rw-r--r-- | src/connection-avatars.c | 7 | ||||
-rw-r--r-- | src/connection-mail.c | 4 | ||||
-rw-r--r-- | src/connection-presence.c | 3 | ||||
-rw-r--r-- | src/connection.c | 4 | ||||
-rw-r--r-- | src/contact-list.c | 18 | ||||
-rw-r--r-- | src/im-channel-factory.c | 11 | ||||
-rw-r--r-- | src/im-channel.c | 40 | ||||
-rw-r--r-- | src/media-backend.c | 2 | ||||
-rw-r--r-- | src/media-channel.c | 44 | ||||
-rw-r--r-- | src/media-manager.c | 2 | ||||
-rw-r--r-- | src/media-stream.c | 2 | ||||
-rw-r--r-- | src/protocol.c | 6 |
13 files changed, 40 insertions, 108 deletions
diff --git a/src/connection-aliasing.c b/src/connection-aliasing.c index 5a5a276..8400e59 100644 --- a/src/connection-aliasing.c +++ b/src/connection-aliasing.c @@ -247,7 +247,7 @@ set_aliases_foreach (gpointer key, { DEBUG ("can't set alias for %s to \"%s\": not on contact list", bname, new_alias); - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "can't set alias for %s to \"%s\": not on contact list", bname, new_alias); } @@ -288,7 +288,7 @@ haze_connection_set_aliases (TpSvcConnectionInterfaceAliasing *self, if (!can_alias (conn)) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "You can't set aliases on this protocol"); dbus_g_method_return_error (context, error); g_error_free (error); @@ -355,7 +355,6 @@ blist_node_aliased_cb (PurpleBlistNode *node, aliases); g_ptr_array_free (aliases, TRUE); - tp_handle_unref (contact_handles, handle); } void diff --git a/src/connection-avatars.c b/src/connection-avatars.c index d1b2289..1042938 100644 --- a/src/connection-avatars.c +++ b/src/connection-avatars.c @@ -378,7 +378,7 @@ haze_connection_request_avatar (TpSvcConnectionInterfaceAvatars *self, else { DEBUG ("handle %u has no avatar", contact); - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u has no avatar", contact); @@ -455,7 +455,7 @@ haze_connection_set_avatar (TpSvcConnectionInterfaceAvatars *self, if (max_filesize > 0 && icon_len > max_filesize) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "avatar is %" G_GSIZE_FORMAT "B, " "but the limit is %" G_GSIZE_FORMAT "B", icon_len, max_filesize); @@ -484,7 +484,7 @@ haze_connection_set_avatar (TpSvcConnectionInterfaceAvatars *self, if (!acceptable_mime_type) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "'%s' is not a supported MIME type", mime_type); dbus_g_method_return_error (context, error); @@ -547,7 +547,6 @@ buddy_icon_changed_cb (PurpleBuddy *buddy, tp_svc_connection_interface_avatars_emit_avatar_updated (conn, contact, token); - tp_handle_unref (contact_repo, contact); g_free (token); } diff --git a/src/connection-mail.c b/src/connection-mail.c index 475e652..9b71c9d 100644 --- a/src/connection-mail.c +++ b/src/connection-mail.c @@ -70,7 +70,7 @@ haze_connection_mail_request_inbox_url ( HazeSvcConnectionInterfaceMailNotification *iface, DBusGMethodInvocation *context) { - GError e = {TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + GError e = {TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "LibPurple does not provide Inbox URL"}; dbus_g_method_return_error (context, &e); } @@ -87,7 +87,7 @@ haze_connection_mail_request_mail_url ( if (!G_VALUE_HOLDS_STRING (in_url_data)) { - GError e = {TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + GError e = {TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Wrong type for url-data"}; dbus_g_method_return_error (context, &e); return; diff --git a/src/connection-presence.c b/src/connection-presence.c index 3c635e5..74ba730 100644 --- a/src/connection-presence.c +++ b/src/connection-presence.c @@ -184,7 +184,7 @@ _get_contact_statuses (GObject *obj, { DEBUG ("[%s] %s isn't on the blist, ergo no status!", conn->account->username, bname); - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Presence for %u unknown; subscribe to them first", handle); g_hash_table_destroy (status_table); status_table = NULL; @@ -242,7 +242,6 @@ update_status (PurpleBuddy *buddy, tp_presence_mixin_emit_one_presence_update (G_OBJECT (conn), handle, tp_status); - tp_handle_unref (handle_repo, handle); } static void diff --git a/src/connection.c b/src/connection.c index 3ec4c8e..4926051 100644 --- a/src/connection.c +++ b/src/connection.c @@ -387,7 +387,7 @@ set_option ( * constructors can't fail. * * Returns: %TRUE if the account was successfully created and hooked up; - * %FALSE with @error set in the TP_ERRORS domain if the account + * %FALSE with @error set in the TP_ERROR domain if the account * already existed or another error occurred. */ gboolean @@ -403,7 +403,7 @@ haze_connection_create_account (HazeConnection *self, if (purple_accounts_find (priv->username, priv->prpl_id) != NULL) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "a connection already exists to %s on %s", priv->username, priv->prpl_id); return FALSE; diff --git a/src/contact-list.c b/src/contact-list.c index 80f26c6..4e0a5bb 100644 --- a/src/contact-list.c +++ b/src/contact-list.c @@ -193,10 +193,7 @@ haze_contact_list_dup_contacts (TpBaseContactList *cl) purple_buddy_get_name (sl_iter->data), NULL, NULL); if (G_LIKELY (handle != 0)) - { - tp_handle_set_add (handles, handle); - tp_handle_unref (contact_repo, handle); - } + tp_handle_set_add (handles, handle); } g_slist_free (buddies); @@ -311,8 +308,6 @@ buddy_added_cb (PurpleBuddy *buddy, gpointer unused) group_name = purple_group_get_name (purple_buddy_get_group (buddy)); tp_base_contact_list_one_contact_groups_changed ( (TpBaseContactList *) contact_list, handle, &group_name, 1, NULL, 0); - - tp_handle_unref (contact_repo, handle); } static void @@ -362,8 +357,6 @@ buddy_removed_cb (PurpleBuddy *buddy, gpointer unused) tp_base_contact_list_one_contact_removed ( (TpBaseContactList *) contact_list, handle); } - - tp_handle_unref (contact_repo, handle); } @@ -385,18 +378,11 @@ static void remove_pending_publish_request (HazeContactList *self, TpHandle handle) { - HazeConnection *conn = self->priv->conn; - TpBaseConnection *base_conn = TP_BASE_CONNECTION (conn); - TpHandleRepoIface *handle_repo = - tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); - gpointer h = GUINT_TO_POINTER (handle); gboolean removed; removed = g_hash_table_remove (self->priv->pending_publish_requests, h); g_assert (removed); - - tp_handle_unref (handle_repo, handle); } void @@ -739,7 +725,7 @@ haze_contact_list_prep_remove_from_group (HazeContactList *self, if (default_group == group) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Contacts can't be removed from '%s' unless they are in " "another group", group->name); return FALSE; diff --git a/src/im-channel-factory.c b/src/im-channel-factory.c index 44df761..3fb9824 100644 --- a/src/im-channel-factory.c +++ b/src/im-channel-factory.c @@ -457,14 +457,6 @@ haze_create_conversation (PurpleConversation *conv) static void haze_destroy_conversation (PurpleConversation *conv) { - PurpleAccount *account = purple_conversation_get_account (conv); - - HazeImChannelFactory *im_factory = - ACCOUNT_GET_HAZE_CONNECTION (account)->im_factory; - TpBaseConnection *base_conn = TP_BASE_CONNECTION (im_factory->priv->conn); - TpHandleRepoIface *contact_repo = - tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); - HazeConversationUiData *ui_data; DEBUG ("(PurpleConversation *)%p destroyed", conv); @@ -476,7 +468,6 @@ haze_destroy_conversation (PurpleConversation *conv) ui_data = PURPLE_CONV_GET_HAZE_UI_DATA (conv); - tp_handle_unref (contact_repo, ui_data->contact_handle); if (ui_data->resend_typing_timeout_id) g_source_remove (ui_data->resend_typing_timeout_id); @@ -596,7 +587,7 @@ haze_im_channel_factory_request (HazeImChannelFactory *self, if (require_new) { tp_channel_manager_emit_request_failed (self, request_token, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Channel already exists"); + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Channel already exists"); } else { diff --git a/src/im-channel.c b/src/im-channel.c index 4c8545b..dec26af 100644 --- a/src/im-channel.c +++ b/src/im-channel.c @@ -98,15 +98,10 @@ haze_im_channel_close (TpSvcChannel *iface, { if (priv->initiator != priv->handle) { - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); - g_assert (priv->initiator != 0); g_assert (priv->handle != 0); - tp_handle_unref (contact_repo, priv->initiator); priv->initiator = priv->handle; - tp_handle_ref (contact_repo, priv->initiator); } tp_message_mixin_set_rescued ((GObject *) self); @@ -283,7 +278,7 @@ haze_im_channel_set_chat_state (TpSvcChannelInterfaceChatState *self, { case TP_CHANNEL_CHAT_STATE_GONE: DEBUG ("The Gone state may not be explicitly set"); - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "The Gone state may not be explicitly set"); break; case TP_CHANNEL_CHAT_STATE_INACTIVE: @@ -298,7 +293,7 @@ haze_im_channel_set_chat_state (TpSvcChannelInterfaceChatState *self, break; default: DEBUG ("Invalid chat state: %u", state); - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Invalid chat state: %u", state); } @@ -356,7 +351,7 @@ haze_im_channel_send (GObject *obj, if (tp_message_count_parts (message) != 2) { - error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "messages must have a single plain-text part"); goto err; } @@ -370,14 +365,14 @@ haze_im_channel_send (GObject *obj, if (tp_strdiff (content_type, "text/plain")) { - error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "messages must have a single plain-text part"); goto err; } if (text == NULL) { - error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "message body must be a UTF-8 string"); goto err; } @@ -401,7 +396,7 @@ haze_im_channel_send (GObject *obj, * support TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE. */ default: - error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "unsupported message type: %u", type); goto err; } @@ -569,7 +564,6 @@ haze_im_channel_constructor (GType type, guint n_props, GObject *obj; HazeIMChannel *chan; HazeIMChannelPrivate *priv; - TpHandleRepoIface *contact_handles; TpBaseConnection *conn; TpDBusDaemon *bus; @@ -579,11 +573,7 @@ haze_im_channel_constructor (GType type, guint n_props, priv = chan->priv; conn = (TpBaseConnection *) (priv->conn); - contact_handles = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); - tp_handle_ref (contact_handles, priv->handle); g_assert (priv->initiator != 0); - tp_handle_ref (contact_handles, priv->initiator); tp_message_mixin_init (obj, G_STRUCT_OFFSET (HazeIMChannel, messages), conn); @@ -604,20 +594,11 @@ haze_im_channel_dispose (GObject *obj) { HazeIMChannel *chan = HAZE_IM_CHANNEL (obj); HazeIMChannelPrivate *priv = chan->priv; - TpBaseConnection *conn = (TpBaseConnection *) priv->conn; - TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); if (priv->dispose_has_run) return; priv->dispose_has_run = TRUE; - if (priv->handle != 0) - tp_handle_unref (contact_handles, priv->handle); - - if (priv->initiator != 0) - tp_handle_unref (contact_handles, priv->initiator); - if (!priv->closed) { purple_conversation_destroy (priv->conv); @@ -757,8 +738,8 @@ _make_message (HazeIMChannel *self, PurpleMessageFlags flags, time_t mtime) { - TpMessage *message = tp_message_new ((TpBaseConnection *) self->priv->conn, - 2, 2); + TpMessage *message = tp_cm_message_new ((TpBaseConnection *) self->priv->conn, + 2); TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL; time_t now = time (NULL); @@ -767,8 +748,7 @@ _make_message (HazeIMChannel *self, else if (purple_message_meify (text_plain, -1)) type = TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION; - tp_message_set_handle (message, 0, "message-sender", TP_HANDLE_TYPE_CONTACT, - self->priv->handle); + tp_cm_message_set_sender (message, self->priv->handle); tp_message_set_uint32 (message, 0, "message-type", type); /* FIXME: the second half of this test shouldn't be necessary but prpl-jabber @@ -790,7 +770,7 @@ static TpMessage * _make_delivery_report (HazeIMChannel *self, char *text_plain) { - TpMessage *report = tp_message_new ((TpBaseConnection *) self->priv->conn, 2, + TpMessage *report = tp_cm_message_new ((TpBaseConnection *) self->priv->conn, 2); /* "MUST be the intended recipient of the original message" */ diff --git a/src/media-backend.c b/src/media-backend.c index 1d231e7..ec40af9 100644 --- a/src/media-backend.c +++ b/src/media-backend.c @@ -553,7 +553,7 @@ haze_media_backend_error (TpSvcMediaSessionHandler *iface, * error message describes the only legitimate situation in which this * could arise. */ - GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; + GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; DEBUG ("no session, returning an error."); dbus_g_method_return_error (context, &e); diff --git a/src/media-channel.c b/src/media-channel.c index 5e7f165..ae135be 100644 --- a/src/media-channel.c +++ b/src/media-channel.c @@ -265,7 +265,7 @@ pending_stream_request_free (gpointer data) if (p->context != NULL) { - GError e = { TP_ERRORS, TP_ERROR_CANCELLED, + GError e = { TP_ERROR, TP_ERROR_CANCELLED, "The session terminated before the requested streams could be added" }; @@ -609,7 +609,6 @@ haze_media_channel_constructor (GType type, guint n_props, /* automatically add creator to channel, but also ref them again (because * priv->creator is the InitiatorHandle) */ g_assert (priv->creator != 0); - tp_handle_ref (contact_handles, priv->creator); set = tp_intset_new_containing (priv->creator); tp_group_mixin_change_members (obj, "", set, NULL, NULL, NULL, 0, @@ -787,15 +786,6 @@ haze_media_channel_set_property (GObject *object, break; case PROP_INITIAL_PEER: priv->initial_peer = g_value_get_uint (value); - - if (priv->initial_peer != 0) - { - TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn; - TpHandleRepoIface *repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); - tp_handle_ref (repo, priv->initial_peer); - } - break; case PROP_MEDIA: g_assert (priv->media == NULL); @@ -967,9 +957,6 @@ haze_media_channel_dispose (GObject *object) { HazeMediaChannel *self = HAZE_MEDIA_CHANNEL (object); HazeMediaChannelPrivate *priv = self->priv; - TpBaseConnection *conn = (TpBaseConnection *) priv->conn; - TpHandleRepoIface *contact_handles = tp_base_connection_get_handles ( - conn, TP_HANDLE_TYPE_CONTACT); if (priv->dispose_has_run) return; @@ -983,15 +970,6 @@ haze_media_channel_dispose (GObject *object) g_assert (priv->closed); - tp_handle_unref (contact_handles, priv->creator); - priv->creator = 0; - - if (priv->initial_peer != 0) - { - tp_handle_unref (contact_handles, priv->initial_peer); - priv->initial_peer = 0; - } - if (priv->media != NULL) g_object_unref (priv->media); priv->media = NULL; @@ -1179,7 +1157,7 @@ haze_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface, GError *e; g_object_get (base_conn, "protocol", &name, NULL); - g_set_error (&e, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (&e, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Streams can't be removed in Haze's \"%s\" protocol's calls", name); g_free (name); @@ -1216,7 +1194,7 @@ haze_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface, if (j >= backend_streams->len) { - GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Requested stream wasn't found" }; DEBUG ("%s", e.message); dbus_g_method_return_error (context, &e); @@ -1261,7 +1239,7 @@ haze_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *ifac DBusGMethodInvocation *context) { /* Libpurple doesn't have API for this yet */ - GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Stream direction can't be set Haze calls" }; DEBUG ("%s", e.message); dbus_g_method_return_error (context, &e); @@ -1327,7 +1305,7 @@ _haze_media_channel_request_contents (HazeMediaChannel *chan, } else { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "given media type %u is invalid", media_type); return FALSE; } @@ -1348,7 +1326,7 @@ _haze_media_channel_request_contents (HazeMediaChannel *chan, gchar *name; g_object_get (base_conn, "protocol", &name, NULL); - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Streams can't be added in Haze's \"%s\" protocol's calls", name); @@ -1360,7 +1338,7 @@ _haze_media_channel_request_contents (HazeMediaChannel *chan, if ((want_audio == FALSE || caps & PURPLE_MEDIA_CAPS_AUDIO) && (want_video == FALSE || caps & PURPLE_MEDIA_CAPS_VIDEO)) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Member does not have the desired audio/video capabilities"); return FALSE; } @@ -1442,7 +1420,7 @@ media_channel_request_streams (HazeMediaChannel *self, if (peer != contact_handle) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "cannot add streams for %u: this channel's peer is %u", contact_handle, peer); goto error; @@ -1581,7 +1559,7 @@ haze_media_channel_add_member (GObject *obj, if (peer != handle) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u cannot be added: this channel's peer is %u", handle, peer); return FALSE; @@ -1611,7 +1589,7 @@ haze_media_channel_add_member (GObject *obj, /* is the call on hold? */ if (priv->hold_state != TP_LOCAL_HOLD_STATE_UNHELD) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Can't answer a call while it's on hold"); return FALSE; } @@ -1630,7 +1608,7 @@ haze_media_channel_add_member (GObject *obj, } } - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u cannot be added in the current state", handle); return FALSE; } diff --git a/src/media-manager.c b/src/media-manager.c index fddd63a..3df771c 100644 --- a/src/media-manager.c +++ b/src/media-manager.c @@ -478,7 +478,7 @@ haze_media_manager_requestotron (TpChannelManager *manager, /* already checked by TpBaseConnection */ g_assert (handle == 0); - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "A valid Contact handle must be provided when requesting a media " "channel"); diff --git a/src/media-stream.c b/src/media-stream.c index 50dde5b..7b4f29f 100644 --- a/src/media-stream.c +++ b/src/media-stream.c @@ -1345,7 +1345,7 @@ haze_media_stream_codecs_updated (TpSvcMediaStreamHandler *iface, if (self->priv->codecs == NULL) { - GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "CodecsUpdated may only be called once an initial set of codecs " "has been set" }; diff --git a/src/protocol.c b/src/protocol.c index 13dc8ae..6fd279e 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -285,7 +285,7 @@ _param_filter_no_blanks (const TpCMParamSpec *paramspec, if (*str == '\0') { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Account parameter '%s' must not be empty", paramspec->name); return FALSE; @@ -293,7 +293,7 @@ _param_filter_no_blanks (const TpCMParamSpec *paramspec, if (strstr (str, " ") != NULL) { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Account parameter '%s' may not contain spaces", paramspec->name); return FALSE; @@ -318,7 +318,7 @@ _param_filter_string_list (const TpCMParamSpec *paramspec, != NULL) return TRUE; - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "'%s' is not a valid value for parameter '%s'", str, paramspec->name); return FALSE; } |