libpurple/purpleprotocolconversation.c

changeset 42325
9e5c583e13de
parent 42319
98931e2d3ca2
child 42332
0de4f569ccf3
equal deleted inserted replaced
42324:3c66b48c2fb7 42325:9e5c583e13de
78 G_OBJECT_TYPE_NAME(protocol)); 78 G_OBJECT_TYPE_NAME(protocol));
79 } 79 }
80 80
81 return FALSE; 81 return FALSE;
82 } 82 }
83
84 void
85 purple_protocol_conversation_set_topic_async(PurpleProtocolConversation *protocol,
86 PurpleConversation *conversation,
87 const char *topic,
88 GCancellable *cancellable,
89 GAsyncReadyCallback callback,
90 gpointer data)
91 {
92 PurpleProtocolConversationInterface *iface = NULL;
93
94 g_return_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol));
95 g_return_if_fail(PURPLE_IS_CONVERSATION(conversation));
96
97 iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol);
98 if(iface != NULL && iface->set_topic_async != NULL) {
99 iface->set_topic_async(protocol, conversation, topic, cancellable,
100 callback, data);
101 } else {
102 g_warning("%s does not implement set_topic_async",
103 G_OBJECT_TYPE_NAME(protocol));
104 }
105 }
106
107 gboolean
108 purple_protocol_conversation_set_topic_finish(PurpleProtocolConversation *protocol,
109 GAsyncResult *result,
110 GError **error)
111 {
112 PurpleProtocolConversationInterface *iface = NULL;
113
114 g_return_val_if_fail(PURPLE_IS_PROTOCOL_CONVERSATION(protocol), FALSE);
115 g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE);
116
117 iface = PURPLE_PROTOCOL_CONVERSATION_GET_IFACE(protocol);
118 if(iface != NULL && iface->set_topic_finish != NULL) {
119 return iface->set_topic_finish(protocol, result, error);
120 } else {
121 g_warning("%s does not implement set_topic_finish",
122 G_OBJECT_TYPE_NAME(protocol));
123 }
124
125 return FALSE;
126 }

mercurial