libpurple/purpleprotocolserver.h

Thu, 22 Feb 2024 06:03:16 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 22 Feb 2024 06:03:16 -0600
changeset 42596
b64b96f3b781
parent 42594
eddde70cedd8
child 42615
2f3308794a8f
permissions
-rw-r--r--

Add a favorite property to PurpleContactInfo

This will be used in the future for toggling whether or not contacts are
favorited or starred.

Testing Done:
Ran the unit tests under valgrind.

Reviewed at https://reviews.imfreedom.org/r/2965/

40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
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: 42391
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
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: 42391
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: 42391
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: 42391
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: 42391
diff changeset
12 * any later version.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
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: 42391
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: 42391
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: 42391
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: 42391
diff changeset
17 * more details.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
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: 42391
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: 42391
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_PROTOCOL_SERVER_H
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_PROTOCOL_SERVER_H
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib-object.h>
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42338
2548eb61acc9 Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents: 42300
diff changeset
33 #include "buddy.h"
2548eb61acc9 Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents: 42300
diff changeset
34 #include "connection.h"
2548eb61acc9 Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents: 42300
diff changeset
35 #include "group.h"
42344
c51d37734155 Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 42338
diff changeset
36 #include "purpleaccount.h"
42338
2548eb61acc9 Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents: 42300
diff changeset
37 #include "purplemessage.h"
2548eb61acc9 Make sure all internal includes use double quotes
Gary Kramlich <grim@reaperworld.com>
parents: 42300
diff changeset
38 #include "purpleprotocol.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
39 #include "purpleversion.h"
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #define PURPLE_TYPE_PROTOCOL_SERVER (purple_protocol_server_get_type())
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
42
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
43 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 G_DECLARE_INTERFACE(PurpleProtocolServer, purple_protocol_server, PURPLE,
41024
a2ad2d034162 Set the prereq type for all Protocol interfaces to PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40725
diff changeset
45 PROTOCOL_SERVER, PurpleProtocol)
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 G_BEGIN_DECLS
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 * PurpleProtocolServer:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 *
41205
c5513eb740aa Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[o-z]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41155
diff changeset
52 * #PurpleProtocolServer describes the API for protocols that have a central
c5513eb740aa Remove unnecessary gtk-doc comments and move them where possible from libpurple/purple[o-z]*.h
Gary Kramlich <grim@reaperworld.com>
parents: 41155
diff changeset
53 * server.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 */
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * PurpleProtocolServerInterface:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * @set_info: Sets the user's profile.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * @get_info: Should arrange for purple_notify_userinfo() to be called with the
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * requested user's profile.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * @set_status: Sets the active status for the given account.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * @set_idle: Set the idle time for the given account.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 * @change_passwd: Changes the users password.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * @add_buddy: Add a buddy to a group on the server.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 * @add_buddies: Add multiple buddies on the server at once.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * @remove_buddy: Removes the given buddy from the user's buddy list.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * @remove_buddies: Removes multiple buddies from the user's buddy list.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * @keepalive: If implemented, this will be called regularly for this
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * protocol's active connections. You'd want to do this if you need
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * to repeatedly send some kind of keepalive packet to the server
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * to avoid being disconnected. ("Regularly" is defined to be 30
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * unless @get_keepalive_interval is implemented to override it).
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * @get_keepalive_interval: If implemented, this will override the default
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * keepalive interval.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * @alias_buddy: Save/store buddy's alias on server list/roster
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * @group_buddy: Change a buddy's group on a server list/roster
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * @rename_group: Rename a group on a server list/roster
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * @set_buddy_icon: Set the buddy icon for the given connection to @img. The
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * protocol does <emphasis>NOT</emphasis> own a reference to
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * @img; if it needs one, it must #g_object_ref(@img) itself.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * @remove_group: Removes the given group from the users buddy list.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 * @send_raw: For use in plugins that may understand the underlying protocol.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * The protocol server interface.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * This interface provides a gateway between purple and the protocol's server.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
89 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
90 * Since: 3.0.0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 */
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 struct _PurpleProtocolServerInterface {
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 /*< private >*/
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 GTypeInterface parent;
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 /*< public >*/
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 void (*set_info)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *info);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 void (*get_info)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 void (*set_status)(PurpleProtocolServer *protocol_server, PurpleAccount *account, PurpleStatus *status);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 void (*set_idle)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, gint idletime);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 void (*change_passwd)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *old_pass, const gchar *new_pass);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 void (*add_buddy)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleBuddy *buddy, PurpleGroup *group, const gchar *message);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 void (*remove_buddy)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleBuddy *buddy, PurpleGroup *group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 void (*remove_buddies)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, GList *buddies, GList *groups);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 void (*keepalive)(PurpleProtocolServer *protocol_server, PurpleConnection *connection);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 gint (*get_keepalive_interval)(PurpleProtocolServer *protocol_server);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 void (*alias_buddy)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who, const gchar *alias);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 void (*group_buddy)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who, const gchar *old_group, const gchar *new_group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 void (*rename_group)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *old_name, PurpleGroup *group, GList *moved_buddies);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 void (*set_buddy_icon)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleImage *img);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 void (*remove_group)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleGroup *group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 gint (*send_raw)(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *buf, gint len);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 /*< private >*/
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 gpointer reserved[8];
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 };
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * purple_protocol_server_set_info:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 * @info: The user info to set.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 * Sets the user info, sometimes referred to as a user profile to @info.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
138 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 void purple_protocol_server_set_info(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *info);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 * purple_protocol_server_get_info:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 * @who: The name of the user whose information you're asking for.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 *
41083
590d533cf290 Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41024
diff changeset
147 * Gets the user info or profile for @who and displays it in a protocol
590d533cf290 Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41024
diff changeset
148 * specific way.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
152 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 void purple_protocol_server_get_info(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 * purple_protocol_server_set_status:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 * @account: The #PurpleAccount instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 * @status: The #PurpleStatus instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 * Sets the status for account @account to @status.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
165 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 void purple_protocol_server_set_status(PurpleProtocolServer *protocol_server, PurpleAccount *account, PurpleStatus *status);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * purple_protocol_server_set_idle:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 * @idletime: The number of seconds that the user has been idle.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 * Tells @protocol_server to set the user's idle time to @idletime.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
178 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 void purple_protocol_server_set_idle(PurpleProtocolServer *protocol_server, PurpleConnection *connection, gint idletime);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 * purple_protocol_server_change_passwd:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 * @old_pass: The user's old password.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186 * @new_pass: The new password for the user.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 * Changes the user's password from @old_pass to @new_pass.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
192 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 void purple_protocol_server_change_passwd(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *old_pass, const gchar *new_pass);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 * purple_protocol_server_add_buddy:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 * @buddy: The #PurpleBuddy to add.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 * @group: The #PurpleGroup for @buddy.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 * @message: An optional invite message.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * This protocol function may be called in situations in which the buddy is
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 * already in the specified group. If the protocol supports authorization and
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 * the user is not already authorized to see the status of @buddy, this
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206 * function will request authorization. If authorization is required, then
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 * @message will be used as an invite message.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
209 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
211 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 void purple_protocol_server_add_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleBuddy *buddy, PurpleGroup *group, const gchar *message);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
214 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
215 * purple_protocol_server_remove_buddy:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 * @buddy: The #PurpleBuddy instance.
40725
447c01698e1c Remove some unnecessary NULL checks.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40708
diff changeset
219 * @group: (nullable): The #PurpleGroup instance.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 * Removes @buddy and potentially @group from the server side list of contacts.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
225 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 void purple_protocol_server_remove_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleBuddy *buddy, PurpleGroup *group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 * purple_protocol_server_remove_buddies:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 * @buddies: (element-type PurpleBuddy): A #GList of #PurpleBuddy's to remove.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233 * @groups: (element-type PurpleGroup): A #GList of #PurpleGroup's
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 * corresponding to @buddies.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
235 *
41083
590d533cf290 Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41024
diff changeset
236 * Similar to purple_protocol_server_remove_buddy() but allows you to remove
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 * multiple at a time.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 * If @protocol_server doesn't implement this function directly,
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 * purple_protocol_server_remove_buddy() will be called for each buddy/group
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241 * pair in @buddies/@groups.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
245 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 void purple_protocol_server_remove_buddies(PurpleProtocolServer *protocol_server, PurpleConnection *connection, GList *buddies, GList *groups);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 * purple_protocol_server_keepalive:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253 * Tell @protocol_server to send its keep alive to the server.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
257 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 void purple_protocol_server_keepalive(PurpleProtocolServer *protocol_server, PurpleConnection *connection);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 * purple_protocol_server_get_keepalive_interval:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
262 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
263 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
264 * Returns a custom interval, in seconds, that libpurple should tell
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
265 * @protocol_server to send its keepalive.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
266 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
267 * Returns: The interval, in seconds, that the keep-alive function should be
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
268 * called.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
269 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
270 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
271 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
272 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273 gint purple_protocol_server_get_keepalive_interval(PurpleProtocolServer *protocol_server);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
274
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
275 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
276 * purple_protocol_server_alias_buddy:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
277 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
278 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
279 * @who: The name of the user to alias.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
280 * @alias: The new alias for @who.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
281 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
282 * Sets the server side alias for @who to @alias.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
283 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
284 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
285 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
286 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
287 void purple_protocol_server_alias_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who, const gchar *alias);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
289 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 * purple_protocol_server_group_buddy:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
291 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 * @who: The name of the user whose group to switch.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
294 * @old_group: The name of @who's old group.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
295 * @new_group: The name of the new group to add @who to.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
296 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297 * Moves @who from group @old_group to a new group of @new_group.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
298 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
299 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
300 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
301 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
302 void purple_protocol_server_group_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *who, const gchar *old_group, const gchar *new_group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
304 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 * purple_protocol_server_rename_group:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
306 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
307 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
308 * @old_name: The old name of the group.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
309 * @group: The new #PurpleGroup instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
310 * @moved_buddies: (element-type PurpleBuddy): A list of #PurpleBuddy's being
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
311 * moved as part of this rename.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
312 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
313 * Renames the group named @old_name to the new @group.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
314 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
315 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
316 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
317 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
318 void purple_protocol_server_rename_group(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *old_name, PurpleGroup *group, GList *moved_buddies);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
319
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
320 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
321 * purple_protocol_server_set_buddy_icon:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
322 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
323 * @connection: The #PurpleConnection instance.
40725
447c01698e1c Remove some unnecessary NULL checks.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40708
diff changeset
324 * @img: (nullable): The #PurpleImage instance, or %NULL to unset the icon.
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
325 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
326 * Sets the user's buddy icon to @img.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
327 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
328 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
329 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
330 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
331 void purple_protocol_server_set_buddy_icon(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleImage *img);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
332
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
333 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
334 * purple_protocol_server_remove_group:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
335 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
336 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
337 * @group: The #PurpleGroup instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
338 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
339 * Removes @group from the server side contact list.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
340 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
341 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
342 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
343 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
344 void purple_protocol_server_remove_group(PurpleProtocolServer *protocol_server, PurpleConnection *connection, PurpleGroup *group);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
345
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
346 /**
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
347 * purple_protocol_server_send_raw:
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
348 * @protocol_server: The #PurpleProtocolServer instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
349 * @connection: The #PurpleConnection instance.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
350 * @buf: The raw protocol data to send.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
351 * @len: The length of @buf in bytes.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
352 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
353 * Sends raw data over the protocol. This should only be called when you know
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
354 * the exact underlying protocol.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
355 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
356 * Returns: The number of bytes that was sent.
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
357 *
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
358 * Since: 3.0.0
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
359 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
360 PURPLE_AVAILABLE_IN_3_0
40708
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
361 gint purple_protocol_server_send_raw(PurpleProtocolServer *protocol_server, PurpleConnection *connection, const gchar *buf, gint len);
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
362
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
363 G_END_DECLS
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
364
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
365 #endif /* PURPLE_PROTOCOL_SERVER_H */
53a26c29d26c Move the PurpleProtocolServer interface to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
366

mercurial