summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-02 19:06:24 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-02 20:19:36 +0100
commit9aec808ae99f5b06c816943fc1648358af0d8294 (patch)
treeac7f5cd918ca45932fd321648e9f589d35e966c2 /examples
parent2cc2520bcfa36c834dab111ebf41637bbfc8371f (diff)
downloadtelepathy-glib-9aec808ae99f5b06c816943fc1648358af0d8294.tar.gz
Stop using TP_ERRORS
We deprecated this in 0.11.
Diffstat (limited to 'examples')
-rw-r--r--examples/client/dbus-tubes/accepter.c2
-rw-r--r--examples/client/stream-tubes/accepter.c2
-rw-r--r--examples/cm/call/call-channel.c4
-rw-r--r--examples/cm/call/call-manager.c4
-rw-r--r--examples/cm/call/protocol.c4
-rw-r--r--examples/cm/channelspecific/conn.c6
-rw-r--r--examples/cm/channelspecific/protocol.c12
-rw-r--r--examples/cm/channelspecific/room-manager.c2
-rw-r--r--examples/cm/channelspecific/room.c2
-rw-r--r--examples/cm/contactlist/protocol.c4
-rw-r--r--examples/cm/echo-message-parts/im-manager.c2
-rw-r--r--examples/cm/echo-message-parts/protocol.c6
-rw-r--r--examples/cm/extended/protocol.c6
13 files changed, 28 insertions, 28 deletions
diff --git a/examples/client/dbus-tubes/accepter.c b/examples/client/dbus-tubes/accepter.c
index 638c536d7..e9c3835b1 100644
--- a/examples/client/dbus-tubes/accepter.c
+++ b/examples/client/dbus-tubes/accepter.c
@@ -141,7 +141,7 @@ handle_channels (TpSimpleHandler *handler,
{
TpDBusTubeChannel *tube;
GList *l;
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No channel to be handled" };
g_debug ("Handling channels");
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c
index 41d7652bc..79e8eff80 100644
--- a/examples/client/stream-tubes/accepter.c
+++ b/examples/client/stream-tubes/accepter.c
@@ -127,7 +127,7 @@ _handle_channels (TpSimpleHandler *handler,
g_debug ("Rejecting channels");
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No channels to be handled");
tp_handle_channels_context_fail (context, error);
diff --git a/examples/cm/call/call-channel.c b/examples/cm/call/call-channel.c
index 1e67bc10b..0d4a4464d 100644
--- a/examples/cm/call/call-channel.c
+++ b/examples/cm/call/call-channel.c
@@ -482,7 +482,7 @@ example_call_channel_add_content (ExampleCallChannel *self,
contents = tp_base_call_channel_get_contents (base);
if (g_list_length (contents) > MAX_CONTENTS_PER_CALL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"What are you doing with all those contents anyway?!");
return NULL;
}
@@ -785,7 +785,7 @@ hold_request_hold (TpSvcChannelInterfaceHold *iface,
if (!hold && strstr (peer, "(no unhold)") != NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"unable to unhold");
goto error;
}
diff --git a/examples/cm/call/call-manager.c b/examples/cm/call/call-manager.c
index 8f1ac61be..64c7992df 100644
--- a/examples/cm/call/call-manager.c
+++ b/examples/cm/call/call-manager.c
@@ -439,7 +439,7 @@ example_call_manager_request (ExampleCallManager *self,
if (!initial_audio && !initial_video)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Call channels must initially have either audio or video content");
goto error;
}
@@ -460,7 +460,7 @@ example_call_manager_request (ExampleCallManager *self,
* from the other. For simplicity, this example simulates a protocol
* where this is not the case.
*/
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"In this protocol, you can't call yourself");
goto error;
}
diff --git a/examples/cm/call/protocol.c b/examples/cm/call/protocol.c
index 26540ddcc..4233fdefc 100644
--- a/examples/cm/call/protocol.c
+++ b/examples/cm/call/protocol.c
@@ -36,7 +36,7 @@ example_call_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -129,7 +129,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c
index 603ca0204..69da8179c 100644
--- a/examples/cm/channelspecific/conn.c
+++ b/examples/cm/channelspecific/conn.c
@@ -137,20 +137,20 @@ example_csh_normalize_room (TpHandleRepoIface *repo,
if (id[0] != '#')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom names in this protocol start with #");
}
if (id[1] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom name cannot be empty");
return NULL;
}
if (strchr (id, '@') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom names in this protocol cannot contain '@'");
return NULL;
}
diff --git a/examples/cm/channelspecific/protocol.c b/examples/cm/channelspecific/protocol.c
index 67bfda92d..112f7cef0 100644
--- a/examples/cm/channelspecific/protocol.c
+++ b/examples/cm/channelspecific/protocol.c
@@ -46,7 +46,7 @@ example_csh_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -55,28 +55,28 @@ example_csh_protocol_check_contact_id (const gchar *id,
if (at == NULL || at == id || at[1] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must look like aaa@bbb");
return FALSE;
}
if (strchr (at + 1, '@') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID cannot contain more than one '@'");
return FALSE;
}
if (at[1] == '#' && at[2] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"chatroom name cannot be empty");
return FALSE;
}
if (strchr (at + 2, '#') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"realm/chatroom cannot contain '#' except at the beginning");
return FALSE;
}
@@ -169,7 +169,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c
index fdff18d6c..5aa164419 100644
--- a/examples/cm/channelspecific/room-manager.c
+++ b/examples/cm/channelspecific/room-manager.c
@@ -328,7 +328,7 @@ example_csh_room_manager_request (ExampleCSHRoomManager *self,
}
else if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"A Text channel for room #%u already exists", handle);
goto error;
}
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index 6e78d116f..4d3f715e1 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -375,7 +375,7 @@ remove_member_with_reason (GObject *object,
{
/* TODO: also simulate some channels where the user is an operator and
* can kick people */
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"You can't eject other users from this channel");
return FALSE;
}
diff --git a/examples/cm/contactlist/protocol.c b/examples/cm/contactlist/protocol.c
index 555a8dfd0..fcc05ebed 100644
--- a/examples/cm/contactlist/protocol.c
+++ b/examples/cm/contactlist/protocol.c
@@ -36,7 +36,7 @@ example_contact_list_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -129,7 +129,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c
index a16268528..6451fb8f8 100644
--- a/examples/cm/echo-message-parts/im-manager.c
+++ b/examples/cm/echo-message-parts/im-manager.c
@@ -324,7 +324,7 @@ example_echo_2_im_manager_request (ExampleEcho2ImManager *self,
}
else if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"An echo2 channel to contact #%u already exists", handle);
goto error;
}
diff --git a/examples/cm/echo-message-parts/protocol.c b/examples/cm/echo-message-parts/protocol.c
index 11a22269c..7981fedaa 100644
--- a/examples/cm/echo-message-parts/protocol.c
+++ b/examples/cm/echo-message-parts/protocol.c
@@ -77,7 +77,7 @@ new_connection (TpBaseProtocol *protocol,
if (account == NULL || account[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The 'account' parameter is required");
return NULL;
}
@@ -96,7 +96,7 @@ example_echo_2_protocol_normalize_contact (const gchar *id, GError **error)
{
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
@@ -122,7 +122,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return g_strdup (account);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/extended/protocol.c b/examples/cm/extended/protocol.c
index 7da407efe..0a85a504c 100644
--- a/examples/cm/extended/protocol.c
+++ b/examples/cm/extended/protocol.c
@@ -55,7 +55,7 @@ new_connection (TpBaseProtocol *protocol,
if (account == NULL || account[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The 'account' parameter is required");
return NULL;
}
@@ -75,7 +75,7 @@ example_extended_protocol_normalize_contact (const gchar *id,
{
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
@@ -101,7 +101,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return example_extended_protocol_normalize_contact (account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}