libpurple/purpleprotocolclient.h

Tue, 06 Apr 2021 03:35:20 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 06 Apr 2021 03:35:20 -0500
changeset 40840
b5f355f90ab0
parent 40637
08cb47165790
child 41024
a2ad2d034162
permissions
-rw-r--r--

Port the updates from 2.14.2 and the upcoming 2.14.3 to 3.0.0

* Use the unicode version of the System and UserInfo plugins to fix
non-english languages in the Windows installer.
* Update the installer to use the inetc plugin so that https downloads will
work. This became necessary because Sourceforge now redirects http to
https.
* Standardize everything in pidgin/win32/winpidgin.c to use `wprintf`.

Testing Done:
Compiled and ran on windows 10.

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

40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out 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
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_PROTOCOL_CLIENT_H
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_PROTOCOL_CLIENT_H
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * SECTION:purpleprotocolclient
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 * @section_id: libpurple-purpleprotocolclient
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * @short_description: Protocol Client Interface
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @title: PurpleProtocolClient Interface
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 * #PurpleProtocolClient interface defines the behavior of a typical chat
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 * service's client interface.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include <glib.h>
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 #include <glib-object.h>
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 #include <libpurple/account.h>
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 #include <libpurple/connection.h>
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 #define PURPLE_TYPE_PROTOCOL_CLIENT (purple_protocol_client_get_type())
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 G_DECLARE_INTERFACE(PurpleProtocolClient, purple_protocol_client, PURPLE,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 PROTOCOL_CLIENT, GObject)
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * PURPLE_TYPE_PROTOCOL_CLIENT:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 * The standard _get_type method for #PurpleProtocolClient.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * PurpleProtocolClient:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * An opaque data structure that represents an object that implements
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * #PurpleProtocolClientInterface.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * PurpleProtocolClientInterface:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 * @get_actions: Returns the actions the protocol can perform. These will show
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * up in the Accounts menu, under a submenu with the name of the
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * account.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * @list_emblem: Fills the four <type>char**</type>'s with string identifiers
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * for "emblems" that the UI will interpret and display as
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * relevant.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * @status_text: Gets a short string representing this buddy's status. This
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * will be shown on the buddy list.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * @tooltip_text: Allows the protocol to add text to a buddy's tooltip.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * @blist_node_menu: Returns a list of #PurpleActionMenu structs, which
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * represent extra actions to be shown in (for example) the
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 * right-click menu for @node.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * @buddy_free: Allows the protocol to clean up any additional data for the
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * given buddy.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * @convo_closed: Allows the protocol to do any necessary cleanup when a
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 * conversation is closed.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * @normalize: Convert the username @who to its canonical form. Also checks for
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 * validity.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * <sbr/>For example, AIM treats "fOo BaR" and "foobar" as the same
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * user; this function should return the same normalized string for
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 * both of those. On the other hand, both of these are invalid for
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * protocols with number-based usernames, so function should return
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 * %NULL in such case.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 * <sbr/>@account: The account the username is related to. Can be
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 * %NULL.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 * <sbr/>@who: The username to convert.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 * <sbr/>Returns: Normalized username, or %NULL, if it's invalid.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 * @find_blist_chat: Attempts to find a chat with the given name in the contact
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 * list.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 * @offline_message: Checks whether offline messages to @buddy are supported.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * <sbr/>Returns: %TRUE if @buddy can be sent messages while
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 * they are offline, or %FALSE if not.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 * @get_account_text_table: This allows protocols to specify additional strings
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 * to be used for various purposes. The idea is to
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 * stuff a bunch of strings in this hash table instead
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 * of expanding the struct for every addition. This
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 * hash table is allocated every call and
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 * <emphasis>MUST</emphasis> be unrefed by the caller.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 * <sbr/>@account: The account to specify. This can be
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 * %NULL.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 * <sbr/>Returns: The protocol's string hash table.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 * The hash table should be destroyed
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 * by the caller when it's no longer
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 * needed.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 * @get_moods: Returns an array of #PurpleMood's, with the last one having
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 * "mood" set to %NULL.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * @get_max_message_size: Gets the maximum message size in bytes for the
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 * conversation.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 * <sbr/>It may depend on connection-specific or
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 * conversation-specific variables, like channel or
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 * buddy's name length.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 * <sbr/>This value is intended for plaintext message,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 * the exact value may be lower because of:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 * <sbr/> - used newlines (some protocols count them as
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 * more than one byte),
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 * <sbr/> - formatting,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 * <sbr/> - used special characters.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 * <sbr/>@conv: The conversation to query, or NULL to
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 * get safe minimum for the protocol.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 * <sbr/>Returns: Maximum message size, 0 if unspecified,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 * -1 for infinite.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * The protocol client interface.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * This interface provides a gateway between purple and the protocol.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 struct _PurpleProtocolClientInterface {
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 /*< private >*/
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 GTypeInterface parent;
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 /*< public >*/
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 GList *(*get_actions)(PurpleProtocolClient *client, PurpleConnection *connection);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 const gchar *(*list_emblem)(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 gchar *(*status_text)(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 void (*tooltip_text)(PurpleProtocolClient *client, PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info,
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 gboolean full);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 GList *(*blist_node_menu)(PurpleProtocolClient *client, PurpleBlistNode *node);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 void (*buddy_free)(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 void (*convo_closed)(PurpleProtocolClient *client, PurpleConnection *connection, const gchar *who);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 const gchar *(*normalize)(PurpleProtocolClient *client, PurpleAccount *account, const gchar *who);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 PurpleChat *(*find_blist_chat)(PurpleProtocolClient *client, PurpleAccount *account, const gchar *name);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 gboolean (*offline_message)(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 GHashTable *(*get_account_text_table)(PurpleProtocolClient *client, PurpleAccount *account);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 PurpleMood *(*get_moods)(PurpleProtocolClient *client, PurpleAccount *account);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 gssize (*get_max_message_size)(PurpleProtocolClient *client, PurpleConversation *conv);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165 /*< private >*/
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 gpointer reserved[4];
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167 };
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 G_BEGIN_DECLS
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 * purple_protocol_client_get_actions:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 * @connection: The #PurpleConnection instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 * Gets a list of actions for @connection.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 * Returns: (transfer full) (element-type PurpleProtocolAction): The list of
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 * actions for @connection.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 GList *purple_protocol_client_get_actions(PurpleProtocolClient *client, PurpleConnection *connection);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186 * purple_protocol_client_list_emblem:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 * @buddy: The #PurpleBuddy instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 * Gets the icon name of the emblem that should be used for @buddy.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 * Returns: The icon name of the emblem or %NULL.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 const gchar *purple_protocol_client_list_emblem(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 * purple_protocol_client_status_text:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 * @buddy: The #PurpleBuddy instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * Gets the status text for @buddy.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 * Returns: (transfer full): The status text for @buddy or %NULL.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
209 gchar *purple_protocol_client_status_text(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 * purple_protocol_client_tooltip_text:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
214 * @buddy: The #PurpleBuddy instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
215 * @user_info: The #PurpleNotifyUserInfo instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216 * @full: Whether or not additional info should be added.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 * Asks @client to update @user_info for @buddy. If @full is %TRUE then
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219 * more detailed information will added.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 void purple_protocol_client_tooltip_text(PurpleProtocolClient *client, PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 * purple_protocol_client_blist_node_menu:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228 * @node: The #PurpleBlistNode instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 * Gets a list of #PurpleActionMenu structs, which represent extra actions to
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 * be shown in (for example) the right-click menu for @node.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233 * Returns: (transfer full) (element-type PurpleActionMenu): The list of
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 * #PurpleActionMenu structs to display for @node.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
235 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
236 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 GList *purple_protocol_client_blist_node_menu(PurpleProtocolClient *client, PurpleBlistNode *node);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241 * purple_protocol_client_buddy_free:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 * @buddy: A #PurpleBuddy instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
245 * Cleans up any protocol specific data for @buddy.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 void purple_protocol_client_buddy_free(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 * purple_protocol_client_convo_closed:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 * @connection: A #PurpleConnection instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255 * @who: The name of the conversation to close.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
257 * Closes the conversation named @who on connection @connection.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 void purple_protocol_client_convo_closed(PurpleProtocolClient *client, PurpleConnection *connection, const gchar *who);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
262
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
263 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
264 * purple_protocol_client_normalize:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
265 * @client: The #PurpleProtocolClient instance.
40637
08cb47165790 Fix a bug in purple_protocol_client_normalize which was requiring an account. Also remove the account parameter from purple_normalize_nocase as it wasn't used there.
Gary Kramlich <grim@reaperworld.com>
parents: 40634
diff changeset
266 * @account: (nullable): A #PurpleAccount instance.
40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
267 * @who: The name to normalize.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
268 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
269 * Normalizes a @who to the canonical form for the protocol. For example, many
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
270 * protocols only support all lower case, but might have display version where
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
271 * there are capital letters.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
272 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273 * Returns: The normalized version of @who for @account.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
274 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
275 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
276 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
277 * Deprecated: 3.0.0: This should use purple_protcol_client_normalize_name when
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
278 * it is created which will return an allocated value.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
279 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
280 const gchar *purple_protocol_client_normalize(PurpleProtocolClient *client, PurpleAccount *account, const gchar *who);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
281
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
282 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
283 * purple_protocol_client_find_blist_chat:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
284 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
285 * @account: A #PurpleAccount instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
286 * @name: The name of the chat to find.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
287 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288 * Looks for a chat named @name in the contact list of @account.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
289 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 * Returns: (transfer none): The #PurpleChat instance or %NULL if no chat could
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
291 * be found.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
294 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
295 PurpleChat *purple_protocol_client_find_blist_chat(PurpleProtocolClient *client, PurpleAccount *account, const gchar *name);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
296
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
298 * purple_protocol_client_offline_message:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
299 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
300 * @buddy: A #PurpleBuddy instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
301 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
302 * Checks whether offline messages to @buddy are supported.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
304 * Returns: %TRUE if @buddy supports offline messages, otherwise %FALSE.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
306 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
307 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
308 gboolean purple_protocol_client_offline_message(PurpleProtocolClient *client, PurpleBuddy *buddy);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
309
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
310 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
311 * purple_protocol_client_get_account_text_table:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
312 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
313 * @account: A #PurpleAccount instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
314 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
315 * Gets the account text table which allows protocols to specify additional
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
316 * strings to be used for various purposes. The idea is to stuff a bunch of
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
317 * strings in this hash table instead of expanding the struct for every
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
318 * addition.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
319 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
320 * Returns: (transfer full): The newly allocated text table.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
321 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
322 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
323 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
324 * Deprecated: 3.0.0: This is a premature optimization. Right now this is only
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
325 * used by GaduGadu for a single item and should be replaced.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
326 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
327 GHashTable *purple_protocol_client_get_account_text_table(PurpleProtocolClient *client, PurpleAccount *account);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
328
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
329 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
330 * purple_protocol_client_get_moods:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
331 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
332 * @account: A #PurpleAccount instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
333 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
334 * Gets the mood's for @account.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
335 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
336 * Returns: (transfer none): A %NULL terminated array of #PurpleMood's.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
337 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
338 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
339 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
340 PurpleMood *purple_protocol_client_get_moods(PurpleProtocolClient *client, PurpleAccount *account);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
341
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
342 /**
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
343 * purple_protocol_client_get_max_message_size:
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
344 * @client: The #PurpleProtocolClient instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
345 * @conv: A #PurpleConversation instance.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
346 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
347 * Gets the maximum number of charcters per message for @conv.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
348 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
349 * Returns: The maximum number of characters per message for @conv or -1 for no
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
350 * limit.
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
351 *
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
352 * Since: 3.0.0
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
353 */
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
354 gssize purple_protocol_client_get_max_message_size(PurpleProtocolClient *client, PurpleConversation *conv);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
355
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
356 G_END_DECLS
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
357
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
358 #endif /* PURPLE_PROTOCOL_CLIENT_H */

mercurial