libpurple/status.h

Mon, 16 Sep 2013 22:53:40 +0530

author
Ankit Vani <a@nevitus.org>
date
Mon, 16 Sep 2013 22:53:40 +0530
branch
soc.2013.gobjectification.plugins
changeset 36752
c726e758c59b
parent 36637
9b0109ae118d
child 36896
3865997e388b
permissions
-rw-r--r--

Refactored finch grouping plugin to use the new plugin API

34834
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
1 /**
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
2 * @file status.h Status API
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
3 * @ingroup core
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
4 */
11035
c10c382f4896 [gaim-migrate @ 12922]
Gary Kramlich <grim@reaperworld.com>
parents: 10860
diff changeset
5 /*
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
6 * purple
6065
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
7 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 6065
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 6065
diff changeset
10 * source distribution.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
11 *
6065
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 *
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 *
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18243
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
6065
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
25 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
26 #ifndef _PURPLE_STATUS_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
27 #define _PURPLE_STATUS_H_
6065
ccd9672f9636 [gaim-migrate @ 6515]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
28
34834
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
29 /*
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
30 * A brief explanation of the status API:
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
31 *
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 34860
diff changeset
32 * PurpleStatusType's are created by each protocol. They outline the
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
33 * available statuses of the protocol. AIM, for example, supports
11491
15bd8b949135 [gaim-migrate @ 13734]
Tim Ringenbach <marv@pidgin.im>
parents: 11257
diff changeset
34 * an available state with an optional available message, an away
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
35 * state with a mandatory message, and an invisible state (which is
10754
d5f1ddb4146f [gaim-migrate @ 12357]
Mark Doliner <markdoliner@pidgin.im>
parents: 10740
diff changeset
36 * technically "independent" of the other two, but we'll get into
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
37 * that later). PurpleStatusTypes are very permanent. They are
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 34860
diff changeset
38 * hardcoded in each protocol and will not change often. And because
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
39 * they are hardcoded, they do not need to be saved to any XML file.
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
40 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
41 * A PurpleStatus can be thought of as an "instance" of a PurpleStatusType.
12962
0f83f07e3ffe [gaim-migrate @ 15315]
Bartosz Oler <bartosz@pidgin.im>
parents: 12595
diff changeset
42 * If you're familiar with object-oriented programming languages
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
43 * then this should be immediately clear. Say, for example, that
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
44 * one of your AIM buddies has set himself as "away." You have a
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
45 * PurpleBuddy node for this person in your buddy list. Purple wants
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
46 * to mark this buddy as "away," so it creates a new PurpleStatus.
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
47 * The PurpleStatus has its PurpleStatusType set to the "away" state
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 34860
diff changeset
48 * for the oscar protocol. The PurpleStatus also contains the buddy's
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
49 * away message. PurpleStatuses are sometimes saved, depending on
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
50 * the context. The current PurpleStatuses associated with each of
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 * your accounts are saved so that the next time you start Purple,
11696
7764f7e3a7ef [gaim-migrate @ 13982]
Ethan Blanton <elb@pidgin.im>
parents: 11651
diff changeset
52 * your accounts will be set to their last known statuses. There
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
53 * is also a list of saved statuses that are written to the
24911
624850f5e6a7 s/savable/saveable/
Richard Laager <rlaager@pidgin.im>
parents: 24907
diff changeset
54 * status.xml file. Also, each PurpleStatus has a "saveable" boolean.
624850f5e6a7 s/savable/saveable/
Richard Laager <rlaager@pidgin.im>
parents: 24907
diff changeset
55 * If "saveable" is set to FALSE then the status is NEVER saved.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
56 * All PurpleStatuses should be inside a PurplePresence.
10754
d5f1ddb4146f [gaim-migrate @ 12357]
Mark Doliner <markdoliner@pidgin.im>
parents: 10740
diff changeset
57 *
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
58 * A PurpleStatus is either "independent" or "exclusive."
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
59 * Independent statuses can be active or inactive and they don't
10754
d5f1ddb4146f [gaim-migrate @ 12357]
Mark Doliner <markdoliner@pidgin.im>
parents: 10740
diff changeset
60 * affect anything else. However, you can only have one exclusive
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
61 * status per PurplePresence. If you activate one exclusive status,
10754
d5f1ddb4146f [gaim-migrate @ 12357]
Mark Doliner <markdoliner@pidgin.im>
parents: 10740
diff changeset
62 * then the previous exclusive status is automatically deactivated.
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
63 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
64 * A PurplePresence is like a collection of PurpleStatuses (plus some
34834
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
65 * other random info).
f45f0745da61 Started GObjectification of PurplePresence.
Ankit Vani <a@nevitus.org>
parents: 34801
diff changeset
66 *
34852
0e01a98b2ef7 Renamed blistnodes.[ch] to blistnode.[ch], presences.[ch] to presence.[ch]
Ankit Vani <a@nevitus.org>
parents: 34848
diff changeset
67 * @see presence.h
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
68 */
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
69
28423
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
70 /**
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 34860
diff changeset
71 * PurpleStatusType's are created by each protocol. They outline the
28423
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
72 * available statuses of the protocol. AIM, for example, supports
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
73 * an available state with an optional available message, an away
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
74 * state with a mandatory message, and an invisible state (which is
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
75 * technically "independent" of the other two, but we'll get into
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
76 * that later). PurpleStatusTypes are very permanent. They are
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 34860
diff changeset
77 * hardcoded in each protocol and will not change often. And because
28423
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
78 * they are hardcoded, they do not need to be saved to any XML file.
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
79 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
80 #define PURPLE_TYPE_STATUS (purple_status_get_type())
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
81 #define PURPLE_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_STATUS, PurpleStatus))
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
82 #define PURPLE_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_STATUS, PurpleStatusClass))
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
83 #define PURPLE_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_STATUS))
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
84 #define PURPLE_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_STATUS))
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
85 #define PURPLE_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_STATUS, PurpleStatusClass))
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
86
34857
cfe2b7ce3421 Added GObject code to status.[ch]
Ankit Vani <a@nevitus.org>
parents: 34854
diff changeset
87 /** @copydoc _PurpleStatus */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
88 typedef struct _PurpleStatus PurpleStatus;
34857
cfe2b7ce3421 Added GObject code to status.[ch]
Ankit Vani <a@nevitus.org>
parents: 34854
diff changeset
89 /** @copydoc _PurpleStatusClass */
cfe2b7ce3421 Added GObject code to status.[ch]
Ankit Vani <a@nevitus.org>
parents: 34854
diff changeset
90 typedef struct _PurpleStatusClass PurpleStatusClass;
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
91
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
92 #define PURPLE_TYPE_STATUS_TYPE (purple_status_type_get_type())
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
93
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
94 typedef struct _PurpleStatusType PurpleStatusType;
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
95
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
96 #define PURPLE_TYPE_STATUS_ATTRIBUTE (purple_status_attribute_get_type())
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
97
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
98 typedef struct _PurpleStatusAttribute PurpleStatusAttribute;
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
99
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
100 #define PURPLE_TYPE_MOOD (purple_mood_get_type())
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
101
24912
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
102 typedef struct _PurpleMood {
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
103 const char *mood;
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
104 const char *description;
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
105 gpointer *padding;
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
106 } PurpleMood;
9ae8349f0353 Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@pidgin.im>
parents: 24911
diff changeset
107
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
108 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
109 * A primitive defining the basic structure of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
110 */
21201
493e5846c38d Add PURPLE_STATUS_TUNE to status_primitive_map so that it has a name
Mark Doliner <markdoliner@pidgin.im>
parents: 21193
diff changeset
111 /*
493e5846c38d Add PURPLE_STATUS_TUNE to status_primitive_map so that it has a name
Mark Doliner <markdoliner@pidgin.im>
parents: 21193
diff changeset
112 * If you add a value to this enum, make sure you update
24907
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
113 * the status_primitive_map and primitive_scores arrays in status.c.
21201
493e5846c38d Add PURPLE_STATUS_TUNE to status_primitive_map so that it has a name
Mark Doliner <markdoliner@pidgin.im>
parents: 21193
diff changeset
114 */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
115 typedef enum
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
116 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
117 PURPLE_STATUS_UNSET = 0,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
118 PURPLE_STATUS_OFFLINE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
119 PURPLE_STATUS_AVAILABLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
120 PURPLE_STATUS_UNAVAILABLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
121 PURPLE_STATUS_INVISIBLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
122 PURPLE_STATUS_AWAY,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
123 PURPLE_STATUS_EXTENDED_AWAY,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
124 PURPLE_STATUS_MOBILE,
21193
e918a1846d03 Use an independant status type for 'current media' stuff, instead of using
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19897
diff changeset
125 PURPLE_STATUS_TUNE,
24907
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
126 PURPLE_STATUS_MOOD,
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
127 PURPLE_STATUS_NUM_PRIMITIVES
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
128 } PurpleStatusPrimitive;
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
129
34852
0e01a98b2ef7 Renamed blistnodes.[ch] to blistnode.[ch], presences.[ch] to presence.[ch]
Ankit Vani <a@nevitus.org>
parents: 34848
diff changeset
130 #include "presence.h"
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
131
17800
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
132 #define PURPLE_TUNE_ARTIST "tune_artist"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
133 #define PURPLE_TUNE_TITLE "tune_title"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
134 #define PURPLE_TUNE_ALBUM "tune_album"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
135 #define PURPLE_TUNE_GENRE "tune_genre"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
136 #define PURPLE_TUNE_COMMENT "tune_comment"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
137 #define PURPLE_TUNE_TRACK "tune_track"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
138 #define PURPLE_TUNE_TIME "tune_time"
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
139 #define PURPLE_TUNE_YEAR "tune_year"
21029
097ab54af4c0 Use a #define for the msn 'currentmedia' status attribute in line with the PURPLE_TUNE_ attributes used in the xmpp prpl
Evan Schoenberg <evands@pidgin.im>
parents: 19897
diff changeset
140 #define PURPLE_TUNE_URL "tune_url"
097ab54af4c0 Use a #define for the msn 'currentmedia' status attribute in line with the PURPLE_TUNE_ attributes used in the xmpp prpl
Evan Schoenberg <evands@pidgin.im>
parents: 19897
diff changeset
141 #define PURPLE_TUNE_FULL "tune_full"
17800
39a0f9ed0e26 Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <am@adiumx.com>
parents: 16870
diff changeset
142
24907
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
143 #define PURPLE_MOOD_NAME "mood"
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
144 #define PURPLE_MOOD_COMMENT "moodtext"
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
145
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
146 /**
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
147 * Represents an active status.
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
148 */
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
149 struct _PurpleStatus
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
150 {
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
151 /*< private >*/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
152 GObject gparent;
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
153 };
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
154
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
155 /** Base class for all #PurpleStatus's */
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
156 struct _PurpleStatusClass {
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
157 /*< private >*/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
158 GObjectClass parent_class;
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
159
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
160 void (*_purple_reserved1)(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
161 void (*_purple_reserved2)(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
162 void (*_purple_reserved3)(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
163 void (*_purple_reserved4)(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
164 };
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
165
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32303
diff changeset
166 G_BEGIN_DECLS
14988
66b34458d49e [gaim-migrate @ 17698]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
167
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
168 /**************************************************************************/
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
169 /** @name PurpleStatusPrimitive API */
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
170 /**************************************************************************/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
171 /*@{*/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
172
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
173 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
174 * Lookup the id of a primitive status type based on the type. This
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
175 * ID is a unique plain-text name of the status, without spaces.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
176 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
177 * @param type A primitive status type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
178 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
179 * @return The unique ID for this type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
180 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
181 const char *purple_primitive_get_id_from_type(PurpleStatusPrimitive type);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
182
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
183 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
184 * Lookup the name of a primitive status type based on the type. This
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
185 * name is the plain-English name of the status type. It is usually one
12037
0f1e1fa4b601 [gaim-migrate @ 14330]
Evan Schoenberg <evands@pidgin.im>
parents: 11696
diff changeset
186 * or two words.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
187 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
188 * @param type A primitive status type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
189 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
190 * @return The name of this type, suitable for users to see.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
191 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
192 const char *purple_primitive_get_name_from_type(PurpleStatusPrimitive type);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
193
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
194 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
195 * Lookup the value of a primitive status type based on the id. The
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
196 * ID is a unique plain-text name of the status, without spaces.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
197 *
10469
3edb0348ba88 [gaim-migrate @ 11751]
Mark Doliner <markdoliner@pidgin.im>
parents: 10419
diff changeset
198 * @param id The unique ID of a primitive status type.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
199 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
200 * @return The PurpleStatusPrimitive value.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
201 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
202 PurpleStatusPrimitive purple_primitive_get_type_from_id(const char *id);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
203
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
204 /*@}*/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
205
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
206 /**************************************************************************/
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
207 /** @name PurpleStatusType API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
208 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
209 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
210
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
211 /**
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
212 * Returns the GType for the PurpleStatusType boxed structure.
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
213 */
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
214 GType purple_status_type_get_type(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
215
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
216 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
217 * Creates a new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
218 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
219 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
220 * @param id The ID of the status type, or @c NULL to use the id of
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
221 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
222 * @param name The name presented to the user, or @c NULL to use the
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
223 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
224 * @param saveable TRUE if the information set for this status by the
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
225 * user can be saved for future sessions.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
226 * @param user_settable TRUE if this is a status the user can manually set.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
227 * @param independent TRUE if this is an independent (non-exclusive)
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
228 * status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
229 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
230 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
231 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
232 PurpleStatusType *purple_status_type_new_full(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
233 const char *id, const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
234 gboolean saveable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
235 gboolean user_settable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
236 gboolean independent);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
237
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
238 /**
25445
b36f23e05c50 Thomas Gibson-Robinson noticed that the "saveable" attribute of a status type
Daniel Atallah <datallah@pidgin.im>
parents: 25231
diff changeset
239 * Creates a new status type with some default values (
24911
624850f5e6a7 s/savable/saveable/
Richard Laager <rlaager@pidgin.im>
parents: 24907
diff changeset
240 * saveable and not independent).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
241 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
242 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
243 * @param id The ID of the status type, or @c NULL to use the id of
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
244 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
245 * @param name The name presented to the user, or @c NULL to use the
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
246 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
247 * @param user_settable TRUE if this is a status the user can manually set.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
248 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
249 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
250 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
251 PurpleStatusType *purple_status_type_new(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
252 const char *id, const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
253 gboolean user_settable);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
254
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
255 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
256 * Creates a new status type with attributes.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
257 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
258 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
259 * @param id The ID of the status type, or @c NULL to use the id of
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
260 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
261 * @param name The name presented to the user, or @c NULL to use the
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
262 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
263 * @param saveable TRUE if the information set for this status by the
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
264 * user can be saved for future sessions.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
265 * @param user_settable TRUE if this is a status the user can manually set.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
266 * @param independent TRUE if this is an independent (non-exclusive)
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
267 * status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
268 * @param attr_id The ID of the first attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
269 * @param attr_name The name of the first attribute.
34860
a835e2f6d2cf Fixed a comment.
Ankit Vani <a@nevitus.org>
parents: 34858
diff changeset
270 * @param attr_value The value type of the first attribute.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
271 * @param ... Additional attribute information.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
272 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
273 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
274 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
275 PurpleStatusType *purple_status_type_new_with_attrs(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
276 const char *id,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
277 const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
278 gboolean saveable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
279 gboolean user_settable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
280 gboolean independent,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
281 const char *attr_id,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
282 const char *attr_name,
34801
08c49f30e4a1 Replaced PurpleValue with GType in plugin.h, signals.h. Replaced with GValue in status.h.
Ankit Vani <a@nevitus.org>
parents: 34799
diff changeset
283 GValue *attr_value, ...) G_GNUC_NULL_TERMINATED;
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
284
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
285 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
286 * Destroys a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
287 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
288 * @param status_type The status type to destroy.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
289 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
290 void purple_status_type_destroy(PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
291
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
292 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
293 * Returns the primitive type of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
294 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
295 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
296 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
297 * @return The primitive type of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
298 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
299 PurpleStatusPrimitive purple_status_type_get_primitive(
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
300 const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
301
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
302 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
303 * Returns the ID of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
304 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
305 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
306 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
307 * @return The ID of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
308 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
309 const char *purple_status_type_get_id(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
310
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
311 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
312 * Returns the name of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
313 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
314 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
315 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
316 * @return The name of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
317 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
318 const char *purple_status_type_get_name(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
319
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
320 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
321 * Returns whether or not the status type is saveable.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
322 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
323 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
324 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
325 * @return TRUE if user-defined statuses based off this type are saveable.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
326 * FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
327 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
328 gboolean purple_status_type_is_saveable(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
329
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
330 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
331 * Returns whether or not the status type can be set or modified by the
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
332 * user.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
333 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
334 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
335 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
336 * @return TRUE if the status type can be set or modified by the user.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
337 * FALSE if it's a protocol-set setting.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
338 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
339 gboolean purple_status_type_is_user_settable(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
340
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
341 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
342 * Returns whether or not the status type is independent.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
343 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
344 * Independent status types are non-exclusive. If other status types on
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
345 * the same hierarchy level are set, this one will not be affected.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
346 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
347 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
348 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
349 * @return TRUE if the status type is independent, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
350 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
351 gboolean purple_status_type_is_independent(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
352
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
353 /**
10071
d2ba11541693 [gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents: 10067
diff changeset
354 * Returns whether the status type is exclusive.
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
355 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
356 * @param status_type The status type.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
357 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
358 * @return TRUE if the status type is exclusive, FALSE otherwise.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
359 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
360 gboolean purple_status_type_is_exclusive(const PurpleStatusType *status_type);
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
361
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
362 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
363 * Returns whether or not a status type is available.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
364 *
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
365 * Available status types are online and possibly invisible, but not away.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
366 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
367 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
368 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
369 * @return TRUE if the status is available, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
370 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
371 gboolean purple_status_type_is_available(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
372
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
373 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
374 * Returns the attribute with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
375 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
376 * @param status_type The status type containing the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
377 * @param id The ID of the desired attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
378 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
379 * @return The attribute, if found. NULL otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
380 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
381 PurpleStatusAttribute *purple_status_type_get_attr(const PurpleStatusType *status_type,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
382 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
383
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
384 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
385 * Returns a list of all attributes in a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
386 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
387 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
388 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
389 * @constreturn The list of attributes.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
390 */
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
391 GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
392
10348
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
393 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
394 * Find the PurpleStatusType with the given id.
10348
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
395 *
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
396 * @param status_types A list of status types. Often account->status_types.
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
397 * @param id The unique ID of the status type you wish to find.
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
398 *
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
399 * @return The status type with the given ID, or NULL if one could
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
400 * not be found.
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
401 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
402 const PurpleStatusType *purple_status_type_find_with_id(GList *status_types,
10348
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
403 const char *id);
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
404
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
405 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
406
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
407 /**************************************************************************/
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
408 /** @name PurpleStatusAttribute API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
409 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
410 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
411
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
412 /**
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
413 * Returns the GType for the PurpleStatusAttribute boxed structure.
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
414 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
415 GType purple_status_attribute_get_type(void);
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
416
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
417 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
418 * Creates a new status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
419 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
420 * @param id The ID of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
421 * @param name The name presented to the user.
34799
f029b9598b8e Undo initial replacement of PurpleValue
Ankit Vani <a@nevitus.org>
parents: 34798
diff changeset
422 * @param value_type The type of data contained in the attribute.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
423 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
424 * @return A new status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
425 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
426 PurpleStatusAttribute *purple_status_attribute_new(const char *id, const char *name,
34801
08c49f30e4a1 Replaced PurpleValue with GType in plugin.h, signals.h. Replaced with GValue in status.h.
Ankit Vani <a@nevitus.org>
parents: 34799
diff changeset
427 GValue *value_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
428
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
429 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
430 * Destroys a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
431 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
432 * @param attr The status attribute to destroy.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
433 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
434 void purple_status_attribute_destroy(PurpleStatusAttribute *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
435
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
436 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
437 * Returns the ID of a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
438 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
439 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
440 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
441 * @return The status attribute's ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
442 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
443 const char *purple_status_attribute_get_id(const PurpleStatusAttribute *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
444
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
445 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
446 * Returns the name of a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
447 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
448 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
449 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
450 * @return The status attribute's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
451 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
452 const char *purple_status_attribute_get_name(const PurpleStatusAttribute *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
453
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
454 /**
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
455 * Returns the value of a status attribute.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
456 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
457 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
458 *
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
459 * @return The status attribute's value.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
460 */
34858
28ac3a0418f1 Renamed PurpleStatusAttr to PurpleStatusAttribute for simplicity.
Ankit Vani <a@nevitus.org>
parents: 34857
diff changeset
461 GValue *purple_status_attribute_get_value(const PurpleStatusAttribute *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
462
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
463 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
464
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
465 /**************************************************************************/
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
466 /** @name PurpleMood API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
467 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
468 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
469
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
470 /**
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
471 * Returns the GType for the PurpleMood boxed structure.
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
472 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
473 GType purple_mood_get_type(void);
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
474
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
475 /*@}*/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
476
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
477 /**************************************************************************/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
478 /** @name PurpleStatus API */
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
479 /**************************************************************************/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
480 /*@{*/
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
481
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
482 /**
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
483 * Returns the GType for the Status object.
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
484 */
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
485 GType purple_status_get_type(void);
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
486
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
487 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
488 * Creates a new status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
489 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
490 * @param status_type The type of status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
491 * @param presence The parent presence.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
492 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
493 * @return The new status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
494 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
495 PurpleStatus *purple_status_new(PurpleStatusType *status_type,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
496 PurplePresence *presence);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
497
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
498 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
499 * Sets whether or not a status is active.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
500 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
501 * This should only be called by the account, conversation, and buddy APIs.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
502 *
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
503 * @param status The status.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
504 * @param active The active state.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
505 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
506 void purple_status_set_active(PurpleStatus *status, gboolean active);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
507
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
508 /**
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
509 * Sets whether or not a status is active.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
510 *
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
511 * This should only be called by the account, conversation, and buddy APIs.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
512 *
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
513 * @param status The status.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
514 * @param active The active state.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
515 * @param args A list of attributes to set on the status. This list is
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
516 * composed of key/value pairs, where each key is a valid
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
517 * attribute name for this PurpleStatusType. The list should
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
518 * be NULL terminated.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
519 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
520 void purple_status_set_active_with_attrs(PurpleStatus *status, gboolean active,
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
521 va_list args);
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
522
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
523 /**
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
524 * Sets whether or not a status is active.
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
525 *
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
526 * This should only be called by the account, conversation, and buddy APIs.
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
527 *
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
528 * @param status The status.
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
529 * @param active The active state.
11580
41ecd9e08031 [gaim-migrate @ 13850]
Mark Doliner <markdoliner@pidgin.im>
parents: 11522
diff changeset
530 * @param attrs A list of attributes to set on the status. This list is
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
531 * composed of key/value pairs, where each key is a valid
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
532 * attribute name for this PurpleStatusType. The list is
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
533 * not modified or freed by this function.
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
534 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
535 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active,
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
536 GList *attrs);
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
537
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
538 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
539 * Returns the status's type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
540 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
541 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
542 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
543 * @return The status's type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
544 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
545 PurpleStatusType *purple_status_get_status_type(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
546
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
547 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
548 * Returns the status's presence.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
549 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
550 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
551 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
552 * @return The status's presence.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
553 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
554 PurplePresence *purple_status_get_presence(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
555
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
556 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
557 * Returns the status's type ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
558 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
559 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
560 * purple_status_type_get_id(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
561 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
562 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
563 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
564 * @return The status's ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
565 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
566 const char *purple_status_get_id(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
567
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
568 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
569 * Returns the status's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
570 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
571 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
572 * purple_status_type_get_name(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
573 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
574 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
575 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
576 * @return The status's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
577 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
578 const char *purple_status_get_name(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
579
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
580 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
581 * Returns whether or not a status is independent.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
582 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
583 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
584 * purple_status_type_is_independent(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
585 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
586 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
587 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
588 * @return TRUE if the status is independent, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
589 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
590 gboolean purple_status_is_independent(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
591
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
592 /**
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
593 * Returns whether or not a status is exclusive.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
594 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
595 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
596 * purple_status_type_is_exclusive(purple_status_get_type(status)).
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
597 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
598 * @param status The status.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
599 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
600 * @return TRUE if the status is exclusive, FALSE otherwise.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
601 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
602 gboolean purple_status_is_exclusive(const PurpleStatus *status);
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
603
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
604 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
605 * Returns whether or not a status is available.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
606 *
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
607 * Available statuses are online and possibly invisible, but not away or idle.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
608 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
609 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
610 * purple_status_type_is_available(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
611 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
612 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
613 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
614 * @return TRUE if the status is available, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
615 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
616 gboolean purple_status_is_available(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
617
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
618 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
619 * Returns the active state of a status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
620 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
621 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
622 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
623 * @return The active state of the status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
624 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
625 gboolean purple_status_is_active(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
626
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
627 /**
10040
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
628 * Returns whether or not a status is considered 'online'
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
629 *
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
630 * @param status The status.
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
631 *
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
632 * @return TRUE if the status is considered online, FALSE otherwise
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
633 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
634 gboolean purple_status_is_online(const PurpleStatus *status);
10040
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
635
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
636 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
637 * Returns the value of an attribute in a status with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
638 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
639 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
640 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
641 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
642 * @return The value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
643 */
34801
08c49f30e4a1 Replaced PurpleValue with GType in plugin.h, signals.h. Replaced with GValue in status.h.
Ankit Vani <a@nevitus.org>
parents: 34799
diff changeset
644 GValue *purple_status_get_attr_value(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
645 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
646
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
647 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
648 * Returns the boolean value of an attribute in a status with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
649 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
650 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
651 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
652 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
653 * @return The boolean value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
654 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
655 gboolean purple_status_get_attr_boolean(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
656 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
657
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
658 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
659 * Returns the integer value of an attribute in a status with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
660 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
661 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
662 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
663 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
664 * @return The integer value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
665 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
666 int purple_status_get_attr_int(const PurpleStatus *status, const char *id);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
667
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
668 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
669 * Returns the string value of an attribute in a status with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
670 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
671 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
672 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
673 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
674 * @return The string value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
675 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
676 const char *purple_status_get_attr_string(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
677 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
678
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
679 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
680 * Compares two statuses for availability.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
681 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
682 * @param status1 The first status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
683 * @param status2 The second status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
684 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
685 * @return -1 if @a status1 is more available than @a status2.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
686 * 0 if @a status1 is equal to @a status2.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
687 * 1 if @a status2 is more available than @a status1.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
688 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
689 gint purple_status_compare(const PurpleStatus *status1, const PurpleStatus *status2);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
690
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
691 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
692
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
693 /**************************************************************************/
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
694 /** @name Statuses subsystem */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
695 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
696 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
697
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
698 /**
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
699 * Get the handle for the status subsystem.
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
700 *
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
701 * @return the handle to the status subsystem
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
702 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
703 void *purple_statuses_get_handle(void);
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
704
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
705 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
706 * Initializes the status subsystem.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
707 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
708 void purple_statuses_init(void);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
709
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
710 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
711 * Uninitializes the status subsystem.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
712 */
34854
8417ea6a9235 Started GObjectification of PurpleStatus.
Ankit Vani <a@nevitus.org>
parents: 34852
diff changeset
713 void purple_statuses_uninit(void);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
714
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
715 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
716
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32303
diff changeset
717 G_END_DECLS
15124
68a8be380f54 [gaim-migrate @ 17846]
Sean Egan <seanegan@pidgin.im>
parents: 14988
diff changeset
718
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
719 #endif /* _PURPLE_STATUS_H_ */
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32303
diff changeset
720

mercurial