Mon, 13 May 2024 23:28:20 -0500
Use g_set_str everywhere
This simplifies many setters.
Testing Done:
Ran `ninja turtles`
Reviewed at https://reviews.imfreedom.org/r/3182/
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify it |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the Free |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
11 | * Software Foundation; either version 2 of the License, or (at your option) |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
12 | * any later version. |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, but WITHOUT |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
17 | * more details. |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License along with |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42368
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include "purpleprotocolconversation.h" |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | /****************************************************************************** |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | * GInterface Implementation |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | *****************************************************************************/ |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | G_DEFINE_INTERFACE(PurpleProtocolConversation, purple_protocol_conversation, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | PURPLE_TYPE_PROTOCOL) |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | static void |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | purple_protocol_conversation_default_init(G_GNUC_UNUSED PurpleProtocolConversationInterface *iface) |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | } |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /****************************************************************************** |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * Public API |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | *****************************************************************************/ |
|
42673
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
39 | gboolean |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
40 | purple_protocol_conversation_implements_create_conversation(PurpleProtocolConversation *protocol) |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
41 | { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
42 | PurpleProtocolConversation *protocol_conversation = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
43 | PurpleProtocolConversationInterface *iface = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
44 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
45 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
46 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
47 | protocol_conversation = PURPLE_PROTOCOL_CONVERSATION(protocol); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
48 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol_conversation); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
49 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
50 | if(iface->get_create_conversation_details == NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
51 | return FALSE; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
52 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
53 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
54 | if(iface->create_conversation_async == NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
55 | return FALSE; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
56 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
57 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
58 | if(iface->create_conversation_finish == NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
59 | return FALSE; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
60 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
61 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
62 | return TRUE; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
63 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
64 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
65 | PurpleCreateConversationDetails * |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
66 | purple_protocol_conversation_get_create_conversation_details(PurpleProtocolConversation *protocol, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
67 | PurpleAccount *account) |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
68 | { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
69 | PurpleProtocolConversationInterface *iface = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
70 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
71 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), NULL); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
72 | g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
73 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
74 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
75 | if(iface != NULL && iface->get_create_conversation_details != NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
76 | return iface->get_create_conversation_details(protocol, account); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
77 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
78 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
79 | g_warning("%s does not implement get_create_conversation_details", |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
80 | G_OBJECT_TYPE_NAME(protocol)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
81 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
82 | return NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
83 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
84 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
85 | void |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
86 | purple_protocol_conversation_create_conversation_async(PurpleProtocolConversation *protocol, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
87 | PurpleAccount *account, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
88 | PurpleCreateConversationDetails *details, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
89 | GCancellable *cancellable, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
90 | GAsyncReadyCallback callback, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
91 | gpointer data) |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
92 | { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
93 | PurpleProtocolConversationInterface *iface = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
94 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
95 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
96 | g_return_if_fail(PURPLE_IS_ACCOUNT(account)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
97 | g_return_if_fail(PURPLE_IS_CREATE_CONVERSATION_DETAILS(details)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
98 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
99 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
100 | if(iface != NULL && iface->create_conversation_async != NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
101 | iface->create_conversation_async(protocol, account, details, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
102 | cancellable, callback, data); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
103 | } else { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
104 | GTask *task = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
105 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
106 | task = g_task_new(protocol, cancellable, callback, data); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
107 | g_task_return_new_error(task, PURPLE_PROTOCOL_CONVERSATION_DOMAIN, 0, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
108 | "%s does not implement create_conversation_async", |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
109 | G_OBJECT_TYPE_NAME(protocol)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
110 | g_task_set_source_tag(task, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
111 | purple_protocol_conversation_create_conversation_async); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
112 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
113 | /* details is transfer full and has already been null checked. */ |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
114 | g_object_unref(details); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
115 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
116 | g_clear_object(&task); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
117 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
118 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
119 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
120 | PurpleConversation * |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
121 | purple_protocol_conversation_create_conversation_finish(PurpleProtocolConversation *protocol, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
122 | GAsyncResult *result, |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
123 | GError **error) |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
124 | { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
125 | PurpleProtocolConversationInterface *iface = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
126 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
127 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
128 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
129 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
130 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
131 | if(iface != NULL && iface->create_conversation_finish != NULL) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
132 | return iface->create_conversation_finish(protocol, result, error); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
133 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
134 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
135 | if(G_IS_TASK(result)) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
136 | GTask *task = G_TASK(result); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
137 | gpointer source = NULL; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
138 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
139 | source = g_task_get_source_tag(task); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
140 | if(source == purple_protocol_conversation_create_conversation_async) { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
141 | return g_task_propagate_pointer(task, error); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
142 | } else { |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
143 | g_warning("%s does not implement create_conversation_finish", |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
144 | G_OBJECT_TYPE_NAME(protocol)); |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
145 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
146 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
147 | |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
148 | return FALSE; |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
149 | } |
|
a9e988314724
Add the ability to create conversations to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
150 | |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | void |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | purple_protocol_conversation_send_message_async(PurpleProtocolConversation *protocol, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
153 | PurpleConversation *conversation, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | PurpleMessage *message, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | GCancellable *cancellable, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | GAsyncReadyCallback callback, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | gpointer data) |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | PurpleProtocolConversationInterface *iface = NULL; |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | g_return_if_fail(PURPLE_IS_CONVERSATION(conversation)); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | g_return_if_fail(PURPLE_IS_MESSAGE(message)); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | if(iface != NULL && iface->send_message_async != NULL) { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | iface->send_message_async(protocol, conversation, message, cancellable, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | callback, data); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | } else { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | g_warning("%s does not implement send_message_async", |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | G_OBJECT_TYPE_NAME(protocol)); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | } |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | } |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | gboolean |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | purple_protocol_conversation_send_message_finish(PurpleProtocolConversation *protocol, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | GAsyncResult *result, |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | GError **error) |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | PurpleProtocolConversationInterface *iface = NULL; |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
184 | |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
186 | if(iface != NULL && iface->send_message_finish != NULL) { |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | return iface->send_message_finish(protocol, result, error); |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | } |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
189 | |
|
42332
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
190 | g_warning("%s does not implement send_message_finish", |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
191 | G_OBJECT_TYPE_NAME(protocol)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
192 | |
|
42319
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | return FALSE; |
|
98931e2d3ca2
Create the initial PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
194 | } |
|
42325
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
195 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
196 | void |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
197 | purple_protocol_conversation_set_topic_async(PurpleProtocolConversation *protocol, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
198 | PurpleConversation *conversation, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
199 | const char *topic, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
200 | GCancellable *cancellable, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
201 | GAsyncReadyCallback callback, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
202 | gpointer data) |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
203 | { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
204 | PurpleProtocolConversationInterface *iface = NULL; |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
205 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
206 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
207 | g_return_if_fail(PURPLE_IS_CONVERSATION(conversation)); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
208 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
209 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
210 | if(iface != NULL && iface->set_topic_async != NULL) { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
211 | iface->set_topic_async(protocol, conversation, topic, cancellable, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
212 | callback, data); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
213 | } else { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
214 | g_warning("%s does not implement set_topic_async", |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
215 | G_OBJECT_TYPE_NAME(protocol)); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
216 | } |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
217 | } |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
218 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
219 | gboolean |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
220 | purple_protocol_conversation_set_topic_finish(PurpleProtocolConversation *protocol, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
221 | GAsyncResult *result, |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
222 | GError **error) |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
223 | { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
224 | PurpleProtocolConversationInterface *iface = NULL; |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
225 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
226 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
227 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
228 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
229 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
230 | if(iface != NULL && iface->set_topic_finish != NULL) { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
231 | return iface->set_topic_finish(protocol, result, error); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
232 | } else { |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
233 | g_warning("%s does not implement set_topic_finish", |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
234 | G_OBJECT_TYPE_NAME(protocol)); |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
235 | } |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
236 | |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
237 | return FALSE; |
|
9e5c583e13de
Add PurpleProtocolConversation->set_topic_async and _finish
Gary Kramlich <grim@reaperworld.com>
parents:
42319
diff
changeset
|
238 | } |
|
42332
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
239 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
240 | PurpleChannelJoinDetails * |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
241 | purple_protocol_conversation_get_channel_join_details(PurpleProtocolConversation *protocol, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
242 | PurpleAccount *account) |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
243 | { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
244 | PurpleProtocolConversationInterface *iface = NULL; |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
245 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
246 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), NULL); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
247 | g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
248 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
249 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
250 | if(iface != NULL && iface->get_channel_join_details != NULL) { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
251 | return iface->get_channel_join_details(protocol, account); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
252 | } |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
253 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
254 | g_warning("%s does not implement get_channel_join_details", |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
255 | G_OBJECT_TYPE_NAME(protocol)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
256 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
257 | return NULL; |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
258 | } |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
259 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
260 | void |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
261 | purple_protocol_conversation_join_channel_async(PurpleProtocolConversation *protocol, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
262 | PurpleAccount *account, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
263 | PurpleChannelJoinDetails *details, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
264 | GCancellable *cancellable, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
265 | GAsyncReadyCallback callback, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
266 | gpointer data) |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
267 | { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
268 | PurpleProtocolConversationInterface *iface = NULL; |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
269 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
270 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
271 | g_return_if_fail(PURPLE_IS_ACCOUNT(account)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
272 | g_return_if_fail(PURPLE_IS_CHANNEL_JOIN_DETAILS(details)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
273 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
274 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
275 | if(iface != NULL && iface->join_channel_async != NULL) { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
276 | iface->join_channel_async(protocol, account, details, cancellable, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
277 | callback, data); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
278 | } else { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
279 | g_warning("%s does not implement join_channel_async", |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
280 | G_OBJECT_TYPE_NAME(protocol)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
281 | } |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
282 | } |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
283 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
284 | gboolean |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
285 | purple_protocol_conversation_join_channel_finish(PurpleProtocolConversation *protocol, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
286 | GAsyncResult *result, |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
287 | GError **error) |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
288 | { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
289 | PurpleProtocolConversationInterface *iface = NULL; |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
290 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
291 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
292 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
293 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
294 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
295 | if(iface != NULL && iface->join_channel_finish != NULL) { |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
296 | return iface->join_channel_finish(protocol, result, error); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
297 | } |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
298 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
299 | g_warning("%s does not implement join_channel_finish", |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
300 | G_OBJECT_TYPE_NAME(protocol)); |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
301 | |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
302 | return FALSE; |
|
0de4f569ccf3
Add the ability to join channels to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42325
diff
changeset
|
303 | } |
|
42354
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
304 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
305 | void |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
306 | purple_protocol_conversation_set_avatar_async(PurpleProtocolConversation *protocol, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
307 | PurpleConversation *conversation, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
308 | PurpleAvatar *avatar, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
309 | GCancellable *cancellable, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
310 | GAsyncReadyCallback callback, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
311 | gpointer data) |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
312 | { |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
313 | PurpleProtocolConversationInterface *iface = NULL; |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
314 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
315 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
316 | g_return_if_fail(PURPLE_IS_CONVERSATION(conversation)); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
317 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
318 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
319 | if(iface != NULL && iface->set_avatar_async != NULL) { |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
320 | iface->set_avatar_async(protocol, conversation, avatar, cancellable, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
321 | callback, data); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
322 | } else { |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
323 | g_warning("%s does not implement set_avatar_async", |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
324 | G_OBJECT_TYPE_NAME(protocol)); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
325 | } |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
326 | } |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
327 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
328 | gboolean |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
329 | purple_protocol_conversation_set_avatar_finish(PurpleProtocolConversation *protocol, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
330 | GAsyncResult *result, |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
331 | GError **error) |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
332 | { |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
333 | PurpleProtocolConversationInterface *iface = NULL; |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
334 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
335 | g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
336 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
337 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
338 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
339 | if(iface != NULL && iface->set_avatar_finish != NULL) { |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
340 | return iface->set_avatar_finish(protocol, result, error); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
341 | } |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
342 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
343 | g_warning("%s does not implement set_avatar_finish", |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
344 | G_OBJECT_TYPE_NAME(protocol)); |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
345 | |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
346 | return FALSE; |
|
b5caf6b7705a
Add set_avatar_async and set_avatar_finish to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42332
diff
changeset
|
347 | } |
|
42368
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
348 | |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
349 | void |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
350 | purple_protocol_conversation_send_typing(PurpleProtocolConversation *protocol, |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
351 | PurpleConversation *conversation, |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
352 | PurpleTypingState state) |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
353 | { |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
354 | PurpleProtocolConversationInterface *iface = NULL; |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
355 | |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
356 | g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol)); |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
357 | g_return_if_fail(PURPLE_IS_CONVERSATION(conversation)); |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
358 | |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
359 | iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol); |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
360 | if(iface != NULL && iface->send_typing != NULL) { |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
361 | iface->send_typing(protocol, conversation, state); |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
362 | } else { |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
363 | g_warning("%s does not implement send_typing", |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
364 | G_OBJECT_TYPE_NAME(protocol)); |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
365 | } |
|
2630a8a2d64d
Add a send_typing vfunc to PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42354
diff
changeset
|
366 | } |