libpurple/purpleprotocolattention.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 40613
55230eededd8
child 41010
d0abbb616bea
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/

40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
1 /*
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
2 * purple
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
26
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_ATTENTION_H
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_ATTENTION_H
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
30 #include <glib.h>
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
31 #include <glib-object.h>
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
32
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 /**
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
34 * SECTION:purpleprotocolattention
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
35 * @section_id: libpurple-purpleprotocolattention
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
36 * @title: Protocol Attention Interface
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 */
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
39 #include "account.h"
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
40 #include "connection.h"
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
41
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
42 G_BEGIN_DECLS
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
40524
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
44 /**
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
45 * PURPLE_TYPE_PROTOCOL_ATTENTION:
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
46 *
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
47 * The standard _get_type macro for #PurpleProtocolAttention.
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
48 */
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
49 #define PURPLE_TYPE_PROTOCOL_ATTENTION (purple_protocol_attention_get_type())
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
50
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
51 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
52 * purple_protocol_attention_get_type:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
53 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
54 * Returns: The #GType for the protocol attention interface.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
55 */
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
56 G_DECLARE_INTERFACE(PurpleProtocolAttention, purple_protocol_attention, PURPLE,
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
57 PROTOCOL_ATTENTION, GObject)
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
58
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
59 /**
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
60 * PurpleProtocolAttentionInterface:
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
61 * @send_attention: Called to send an attention message. See
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
62 * purple_protocol_attention_send_attention().
40245
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40244
diff changeset
63 * @get_types: Called to list the protocol's attention types. See
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40244
diff changeset
64 * purple_protocol_attention_get_types().
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
65 *
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
66 * The protocol attention interface.
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
67 *
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
68 * This interface provides attention API for sending and receiving
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
69 * zaps/nudges/buzzes etc.
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
70 */
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
71 struct _PurpleProtocolAttentionInterface {
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
72 /*< private >*/
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
73 GTypeInterface parent;
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
74
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
75 /*< public >*/
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
76 gboolean (*send_attention)(PurpleProtocolAttention *attention,
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
77 PurpleConnection *pc, const gchar *username,
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
78 guint type);
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
79
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
80 GList *(*get_types)(PurpleProtocolAttention *attention,
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
81 PurpleAccount *account);
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
82
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
83 /*< private >*/
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
84 gpointer reserved[4];
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
85 };
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
86
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
87 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
88 * purple_protocol_attention_get_types:
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
89 * @attention: The #PurpleProtocolAttention.
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
90 * @account: The #PurpleAccount whose attention types to get.
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
91 *
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
92 * Returns a list of #PurpleAttentionType's for @attention.
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
93 *
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
94 * Returns: (transfer container) (element-type PurpleAttentionType): The list of
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
95 * #PurpleAttentionType's.
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
96 *
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
97 * Since: 3.0.0
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
98 */
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
99 GList *purple_protocol_attention_get_types(PurpleProtocolAttention *attention, PurpleAccount *account);
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
100
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
101 /**
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
102 * purple_protocol_attention_send_attention:
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
103 * @attention: The #PurpleProtocolAttention instance.
40613
55230eededd8 Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents: 40579
diff changeset
104 * @pc: The #PurpleConnection to send on
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
105 * @username: The name of the user to send the attention to.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
106 * @type: The type of attention to send.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
107 *
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
108 * Sends an attention message of @type to @username.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
109 *
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
110 * Returns: %TRUE on success, %FALSE otherwise.
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
111 *
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
112 * Since: 3.0.0
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
113 */
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
114 gboolean purple_protocol_attention_send_attention(PurpleProtocolAttention *attention, PurpleConnection *pc, const gchar *username, guint type);
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
115
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
116 G_END_DECLS
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
118 #endif /* PURPLE_PROTOCOL_ATTENTION_H */

mercurial