Mon, 03 Feb 2020 21:15:02 -0600
closing merged branch
|
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 | |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #ifndef PURPLE_ATTENTION_H |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #define PURPLE_ATTENTION_H |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
38859
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
25 | #include <glib.h> |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
26 | #include <glib-object.h> |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
27 | |
|
38858
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | /** |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | * SECTION:attention |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | * @section_id: libpurple-attention |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | * @short_description: <filename>attention.h</filename> |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | * @title: Attention Object and Interfaces |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | */ |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
38859
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
35 | #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
|
36 | |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | /** |
|
38859
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
38 | * PurpleAttentionType: |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
39 | * @name: The name to show in GUI elements. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
40 | * @incoming_description: Shown when received. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
41 | * @outgoing_description: Shown when sent. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
42 | * @icon_name: Optional name of the icon to display. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
43 | * @unlocalized_name: An unlocalized name for UIs that would rather use that. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
44 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
45 | * 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
|
46 | * 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
|
47 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
48 | typedef struct _PurpleAttentionType PurpleAttentionType; |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
49 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
50 | #include "account.h" |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
51 | #include "connection.h" |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
52 | |
|
39662
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
53 | G_BEGIN_DECLS |
|
38858
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
39662
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
55 | #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
|
56 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
57 | /****************************************************************************** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
58 | * AttentionType API |
|
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 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
62 | * 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
|
63 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
64 | * 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
|
65 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
66 | 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
|
67 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
68 | 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
|
69 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
70 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
71 | * purple_attention_type_new: |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
72 | * @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
|
73 | * 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
|
74 | * without localization. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
75 | * @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
|
76 | * 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
|
77 | * @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
|
78 | * @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
|
79 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
80 | * 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
|
81 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
82 | * 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
|
83 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
84 | 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
|
85 | 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
|
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_attention_type_get_name: |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
89 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
90 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
91 | * 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
|
92 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
93 | * Returns: The name. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
94 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
95 | 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
|
96 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
97 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
98 | * 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
|
99 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
100 | * @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
|
101 | * 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
|
102 | * localization. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
103 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
104 | * 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
|
105 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
106 | 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
|
107 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
108 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
109 | * 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
|
110 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
111 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
112 | * 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
|
113 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
114 | * Returns: The description. |
|
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 | 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
|
117 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
118 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
119 | * 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
|
120 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
121 | * @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
|
122 | * |
|
38861
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
123 | * 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
|
124 | * 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
|
125 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
126 | 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
|
127 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
128 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
129 | * 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
|
130 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
131 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
132 | * 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
|
133 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
134 | * Returns: The description. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
135 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
136 | 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
|
137 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
138 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
139 | * 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
|
140 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
141 | * @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
|
142 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
143 | * 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
|
144 | * 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
|
145 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
146 | 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
|
147 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
148 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
149 | * 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
|
150 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
151 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
152 | * 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
|
153 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
154 | * 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
|
155 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
156 | * 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
|
157 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
158 | 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
|
159 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
160 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
161 | * 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
|
162 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
163 | * @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
|
164 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
165 | * 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
|
166 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
167 | * 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
|
168 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
169 | 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
|
170 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
171 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
172 | * 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
|
173 | * @type: The attention type |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
174 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
175 | * 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
|
176 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
177 | * Returns: The unlocalized name. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
178 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
179 | 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
|
180 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
181 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
182 | * 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
|
183 | * @type: The attention type. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
184 | * @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
|
185 | * 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
|
186 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
187 | * 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
|
188 | * thus it is required. |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
189 | */ |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
190 | 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
|
191 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
192 | /****************************************************************************** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
193 | * Protocol Interface |
|
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 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
197 | * 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
|
198 | * |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
199 | * 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
|
200 | */ |
|
39662
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
201 | 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
|
202 | PROTOCOL_ATTENTION, GObject) |
|
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 | /** |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
205 | * PurpleProtocolAttentionInterface: |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
206 | * |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
207 | * The protocol attention interface. |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
208 | * |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
209 | * 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
|
210 | * zaps/nudges/buzzes etc. |
|
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 | struct _PurpleProtocolAttentionInterface { |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
213 | /*< private >*/ |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
214 | GTypeInterface parent; |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
215 | |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
216 | /*< public >*/ |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
217 | 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
|
218 | const gchar *username, guint type); |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
219 | |
|
cc279390deec
Change a libpurple interface to GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39028
diff
changeset
|
220 | 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
|
221 | }; |
|
38859
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
222 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
223 | /** |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
224 | * 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
|
225 | * @attn: The #PurpleProtocolAttention. |
|
573814b239a8
attention: Fix purple_protocol_attention_get_types() doc param names
Mike Ruprecht <cmaiku@gmail.com>
parents:
38861
diff
changeset
|
226 | * @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
|
227 | * |
|
38861
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
228 | * Returns a list of #PurpleAttentionType's for @attn. |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
229 | * |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
230 | * 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
|
231 | */ |
|
38861
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
232 | 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
|
233 | |
|
38861
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
234 | /** |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
235 | * purple_protocol_attention_send: |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
236 | * @attn: The #PurpleProtocolAttention instance. |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
237 | * @gc: The #PurpleConnection to send on |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
238 | * @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
|
239 | * @type: The type of attention to send. |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
240 | * |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
241 | * Sends an attention message of @type to @username. |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
242 | * |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
243 | * Returns: TRUE on success, FALSE otherwise. |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
244 | */ |
|
21858f98040c
Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents:
38859
diff
changeset
|
245 | 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
|
246 | |
|
ed15916ec9ed
First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
38858
diff
changeset
|
247 | G_END_DECLS |
|
38858
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
248 | |
|
79e613af04c4
Start of moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
249 | #endif /* PURPLE_ATTENTION_H */ |