libpurple/attention.h

Sat, 22 Aug 2020 02:58:07 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 22 Aug 2020 02:58:07 -0500
changeset 40516
fefaa6596e74
parent 40474
1341be8e3402
child 40524
a3b1cde8d2d8
permissions
-rw-r--r--

Remove the Gtk Ticker plugin as it doesn't scale to today's IM networks

Remove the ticker plugin as it doesn't scale to todays typical IM usage.

Testing Done:
Compile and install.

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

38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /* purple
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * 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
4 * 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
5 * source distribution.
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * 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
8 * 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
9 * 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
10 * (at your option) any later version.
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * 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
13 * 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
14 * 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
15 * 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
16 *
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 */
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
22 #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
23 # 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
24 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40245
diff changeset
25
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #ifndef PURPLE_ATTENTION_H
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #define PURPLE_ATTENTION_H
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
29 #include <glib.h>
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
30 #include <glib-object.h>
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
31
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 /**
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * SECTION:attention
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @section_id: libpurple-attention
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * @short_description: <filename>attention.h</filename>
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 * @title: Attention Object and Interfaces
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 #define PURPLE_TYPE_ATTENTION_TYPE (purple_attention_type_get_type())
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 /**
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
42 * PurpleAttentionType:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
43 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
44 * Represents "nudges" and "buzzes" that you may send to a buddy to attract
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
45 * their attention (or vice-versa).
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
46 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
47 typedef struct _PurpleAttentionType PurpleAttentionType;
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
48
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
49 #include "account.h"
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
50 #include "connection.h"
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
51
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
52 G_BEGIN_DECLS
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
54 #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
55
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
56 /******************************************************************************
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
57 * AttentionType API
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
58 *****************************************************************************/
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
59
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
60 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
61 * purple_attention_type_get_type:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
62 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
63 * Returns: The #GType for the #PurpleAttentionType boxed structure.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
64 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
65 GType purple_attention_type_get_type(void);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
66
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
67 PurpleAttentionType *purple_attention_type_copy(PurpleAttentionType *attn);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
68
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
69 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
70 * purple_attention_type_new:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
71 * @unlocalized_name: A non-localized string that can be used by UIs in need of such
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
72 * non-localized strings. This should be the same as @name,
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
73 * without localization.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
74 * @name: A localized string that the UI may display for the event. This
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
75 * should be the same string as @unlocalized_name, with localization.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
76 * @incoming_description: A localized description shown when the event is received.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
77 * @outgoing_description: A localized description shown when the event is sent.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
78 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
79 * Creates a new #PurpleAttentionType object and sets its mandatory parameters.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
80 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
81 * Returns: A pointer to the new object.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
82 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
83 PurpleAttentionType *purple_attention_type_new(const gchar *unlocalized_name, const gchar *name,
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
84 const gchar *incoming_description, const gchar *outgoing_description);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
85
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 * purple_attention_type_get_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
88 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
89 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
90 * Get the attention type's name as displayed by the UI.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
91 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
92 * Returns: The name.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
93 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
94 const gchar *purple_attention_type_get_name(const PurpleAttentionType *type);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
95
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
96 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
97 * purple_attention_type_set_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
98 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
99 * @name: The localized name that will be displayed by UIs. This should be
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
100 * the same string given as the unlocalized name, but with
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
101 * localization.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
102 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
103 * Sets the displayed name of the attention-demanding event.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
104 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
105 void purple_attention_type_set_name(PurpleAttentionType *type, const gchar *name);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
106
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
107 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
108 * purple_attention_type_get_incoming_desc:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
109 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
110 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
111 * Get the attention type's description shown when the event is received.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
112 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
113 * Returns: The description.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
114 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
115 const gchar *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
116
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
117 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
118 * purple_attention_type_set_incoming_desc:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
119 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
120 * @desc: The localized description for incoming events.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
121 *
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
122 * Sets the description of the attention-demanding event shown in conversations
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
123 * when the event is received.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
124 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
125 void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const gchar *desc);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
126
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
127 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
128 * purple_attention_type_get_outgoing_desc:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
129 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
130 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
131 * Get the attention type's description shown when the event is sent.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
132 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
133 * Returns: The description.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
134 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
135 const gchar *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
136
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
137 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
138 * purple_attention_type_set_outgoing_desc:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
139 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
140 * @desc: The localized description for outgoing events.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
141 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
142 * Sets the description of the attention-demanding event shown in conversations
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
143 * when the event is sent.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
144 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
145 void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const gchar *desc);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
146
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
147 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
148 * purple_attention_type_get_icon_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
149 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
150 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
151 * Get the attention type's icon name.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
152 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
153 * Note: Icons are optional for attention events.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
154 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
155 * Returns: The icon name or %NULL if unset/empty.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
156 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
157 const gchar *purple_attention_type_get_icon_name(const PurpleAttentionType *type);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
158
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
159 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
160 * purple_attention_type_set_icon_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
161 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
162 * @name: The icon's name.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
163 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
164 * Sets the name of the icon to display for the attention event; this is optional.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
165 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
166 * Note: Icons are optional for attention events.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
167 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
168 void purple_attention_type_set_icon_name(PurpleAttentionType *type, const gchar *name);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
169
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
170 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
171 * purple_attention_type_get_unlocalized_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
172 * @type: The attention type
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
173 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
174 * Get the attention type's unlocalized name; this is useful for some UIs.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
175 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
176 * Returns: The unlocalized name.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
177 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
178 const gchar *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
179
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
180 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
181 * purple_attention_type_set_unlocalized_name:
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
182 * @type: The attention type.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
183 * @ulname: The unlocalized name. This should be the same string given as
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
184 * the localized name, but without localization.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
185 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
186 * Sets the unlocalized name of the attention event; some UIs may need this,
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
187 * thus it is required.
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
188 */
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
189 void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const gchar *ulname);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
190
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
191 /******************************************************************************
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
192 * Protocol Interface
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
193 *****************************************************************************/
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
194
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
195 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
196 * 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
197 *
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
198 * 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
199 */
39662
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
200 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
201 PROTOCOL_ATTENTION, GObject)
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
202
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
203 /**
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
204 * PurpleProtocolAttentionInterface:
40245
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40244
diff changeset
205 * @send: Called to send an attention message. See
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40244
diff changeset
206 * purple_protocol_attention_send().
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40244
diff changeset
207 * @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
208 * 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
209 *
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
210 * The protocol attention interface.
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
211 *
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
212 * 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
213 * zaps/nudges/buzzes etc.
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
214 */
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
215 struct _PurpleProtocolAttentionInterface {
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
216 /*< private >*/
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
217 GTypeInterface parent;
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
218
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
219 /*< public >*/
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
220 gboolean (*send)(PurpleProtocolAttention *attn, PurpleConnection *gc,
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
221 const gchar *username, guint type);
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
222
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
223 GList *(*get_types)(PurpleProtocolAttention *attn, PurpleAccount *acct);
cc279390deec Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39028
diff changeset
224 };
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
225
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
226 /**
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
227 * purple_protocol_attention_get_types:
39028
573814b239a8 attention: Fix purple_protocol_attention_get_types() doc param names
Mike Ruprecht <cmaiku@gmail.com>
parents: 38861
diff changeset
228 * @attn: The #PurpleProtocolAttention.
573814b239a8 attention: Fix purple_protocol_attention_get_types() doc param names
Mike Ruprecht <cmaiku@gmail.com>
parents: 38861
diff changeset
229 * @acct: The #PurpleAccount whose attention types to get.
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
230 *
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
231 * Returns a list of #PurpleAttentionType's for @attn.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
232 *
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
233 * Returns: (transfer container) (element-type PurpleAttentionType): The list of #PurpleAttentionType's.
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
234 */
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
235 GList *purple_protocol_attention_get_types(PurpleProtocolAttention *attn, PurpleAccount *acct);
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
236
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
237 /**
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
238 * purple_protocol_attention_send:
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
239 * @attn: The #PurpleProtocolAttention instance.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
240 * @gc: The #PurpleConnection to send on
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
241 * @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
242 * @type: The type of attention to send.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
243 *
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
244 * Sends an attention message of @type to @username.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
245 *
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
246 * Returns: TRUE on success, FALSE otherwise.
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
247 */
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38859
diff changeset
248 gboolean purple_protocol_attention_send(PurpleProtocolAttention *attn, PurpleConnection *gc, 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
249
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38858
diff changeset
250 G_END_DECLS
38858
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251
79e613af04c4 Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 #endif /* PURPLE_ATTENTION_H */

mercurial