libpurple/status.h

Sun, 21 Jul 2013 05:49:05 +0530

author
Ankit Vani <a@nevitus.org>
date
Sun, 21 Jul 2013 05:49:05 +0530
branch
soc.2013.gobjectification
changeset 34852
0e01a98b2ef7
parent 34848
bb14fc0e9a87
child 34854
8417ea6a9235
permissions
-rw-r--r--

Renamed blistnodes.[ch] to blistnode.[ch], presences.[ch] to presence.[ch]

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 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
32 * PurpleStatusType's are created by each PRPL. 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
10737
c7759d698996 [gaim-migrate @ 12339]
Mark Doliner <markdoliner@pidgin.im>
parents: 10567
diff changeset
38 * hardcoded in each PRPL and will not change often. And because
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
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
48 * for the oscar PRPL. The PurpleStatus also contains the buddy's
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 /**
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
71 * PurpleStatusType's are created by each PRPL. They outline the
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
c12dbb691b04 Fix a bunch of doxygen warnings.
Paul Aurich <darkrain42@pidgin.im>
parents: 28221
diff changeset
77 * hardcoded in each PRPL and will not change often. And because
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 */
34798
c1cb4cd0543d Resolved conflicting function names
Ankit Vani <a@nevitus.org>
parents: 34788
diff changeset
80 #define PURPLE_TYPE_STATUS (purple_status_get_g_type())
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
81 typedef struct _PurpleStatus PurpleStatus;
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
82
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
83 typedef struct _PurpleStatusType PurpleStatusType;
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
84 typedef struct _PurpleStatusAttr PurpleStatusAttr;
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
85
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
86 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
87 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
88 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
89 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
90 } 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
91
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
92 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
93 * A primitive defining the basic structure of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
94 */
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
95 /*
493e5846c38d Add PURPLE_STATUS_TUNE to status_primitive_map so that it has a name
Mark Doliner <markdoliner@pidgin.im>
parents: 21193
diff changeset
96 * 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
97 * 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
98 */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
99 typedef enum
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
100 {
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
101 PURPLE_STATUS_UNSET = 0,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
102 PURPLE_STATUS_OFFLINE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
103 PURPLE_STATUS_AVAILABLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
104 PURPLE_STATUS_UNAVAILABLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
105 PURPLE_STATUS_INVISIBLE,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
106 PURPLE_STATUS_AWAY,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
107 PURPLE_STATUS_EXTENDED_AWAY,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
108 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
109 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
110 PURPLE_STATUS_MOOD,
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
111 PURPLE_STATUS_NUM_PRIMITIVES
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
112 } PurpleStatusPrimitive;
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
113
34852
0e01a98b2ef7 Renamed blistnodes.[ch] to blistnode.[ch], presences.[ch] to presence.[ch]
Ankit Vani <a@nevitus.org>
parents: 34848
diff changeset
114 #include "presence.h"
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
115
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
116 #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
117 #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
118 #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
119 #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
120 #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
121 #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
122 #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
123 #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
124 #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
125 #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
126
24907
13118548c74c Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@pidgin.im>
parents: 22793
diff changeset
127 #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
128 #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
129
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32303
diff changeset
130 G_BEGIN_DECLS
14988
66b34458d49e [gaim-migrate @ 17698]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
131
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
132 /**************************************************************************/
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
133 /** @name PurpleStatusPrimitive API */
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
134 /**************************************************************************/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
135 /*@{*/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
136
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
137 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
138 * 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
139 * 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
140 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
141 * @param type A primitive status type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
142 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
143 * @return The unique ID for this type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
144 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
145 const char *purple_primitive_get_id_from_type(PurpleStatusPrimitive type);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
146
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
147 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
148 * 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
149 * 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
150 * or two words.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
151 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
152 * @param type A primitive status type.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
153 *
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
154 * @return The name of this type, suitable for users to see.
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
155 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
156 const char *purple_primitive_get_name_from_type(PurpleStatusPrimitive type);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
157
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
158 /**
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
159 * 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
160 * 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
161 *
10469
3edb0348ba88 [gaim-migrate @ 11751]
Mark Doliner <markdoliner@pidgin.im>
parents: 10419
diff changeset
162 * @param id The unique ID of a primitive status type.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
163 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
164 * @return The PurpleStatusPrimitive value.
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
165 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
166 PurpleStatusPrimitive purple_primitive_get_type_from_id(const char *id);
10419
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
167
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
168 /*@}*/
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
169
cb6b7316fdba [gaim-migrate @ 11670]
Mark Doliner <markdoliner@pidgin.im>
parents: 10418
diff changeset
170 /**************************************************************************/
28221
c62d1e63f410 Some comment-fixes I apparently had lying around.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25893
diff changeset
171 /** @name PurpleStatusType API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
172 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
173 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
174
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
175 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
176 * Creates a new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
177 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
178 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
179 * @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
180 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
181 * @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
182 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
183 * @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
184 * user can be saved for future sessions.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
185 * @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
186 * @param independent TRUE if this is an independent (non-exclusive)
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
187 * status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
188 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
189 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
190 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
191 PurpleStatusType *purple_status_type_new_full(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
192 const char *id, const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
193 gboolean saveable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
194 gboolean user_settable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
195 gboolean independent);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
196
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
197 /**
25445
b36f23e05c50 Thomas Gibson-Robinson noticed that the "saveable" attribute of a status type
Daniel Atallah <datallah@pidgin.im>
parents: 25231
diff changeset
198 * Creates a new status type with some default values (
24911
624850f5e6a7 s/savable/saveable/
Richard Laager <rlaager@pidgin.im>
parents: 24907
diff changeset
199 * saveable and not independent).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
200 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
201 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
202 * @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
203 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
204 * @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
205 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
206 * @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
207 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
208 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
209 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
210 PurpleStatusType *purple_status_type_new(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
211 const char *id, const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
212 gboolean user_settable);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
213
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
214 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
215 * Creates a new status type with attributes.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
216 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
217 * @param primitive The primitive status type.
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
218 * @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
219 * the primitive status type.
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
220 * @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
221 * name of the primitive status type.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
222 * @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
223 * user can be saved for future sessions.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
224 * @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
225 * @param independent TRUE if this is an independent (non-exclusive)
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
226 * status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
227 * @param attr_id The ID of the first attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
228 * @param attr_name The name of the first attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
229 * @param attr_value The value type of the first attribute attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
230 * @param ... Additional attribute information.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
231 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
232 * @return A new status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
233 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
234 PurpleStatusType *purple_status_type_new_with_attrs(PurpleStatusPrimitive primitive,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
235 const char *id,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
236 const char *name,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
237 gboolean saveable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
238 gboolean user_settable,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
239 gboolean independent,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
240 const char *attr_id,
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
241 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
242 GValue *attr_value, ...) G_GNUC_NULL_TERMINATED;
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
243
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
244 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
245 * Destroys a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
246 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
247 * @param status_type The status type to destroy.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
248 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
249 void purple_status_type_destroy(PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
250
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
251 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
252 * Returns the primitive type of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
253 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
254 * @param status_type The status type.
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 * @return The primitive type of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
257 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
258 PurpleStatusPrimitive purple_status_type_get_primitive(
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
259 const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
260
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
261 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
262 * Returns the ID of a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
263 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
264 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
265 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
266 * @return The ID of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
267 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
268 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
269
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
270 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
271 * Returns the name of a status type.
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 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
274 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
275 * @return The name of the status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
276 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
277 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
278
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
279 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
280 * Returns whether or not the status type is saveable.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
281 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
282 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
283 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
284 * @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
285 * FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
286 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
287 gboolean purple_status_type_is_saveable(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
288
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
289 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
290 * 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
291 * user.
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 * @param status_type The 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 * @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
296 * FALSE if it's a protocol-set setting.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
297 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
298 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
299
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
300 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
301 * Returns whether or not the status type is independent.
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 * Independent status types are non-exclusive. If other status types on
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
304 * 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
305 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
306 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
307 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
308 * @return TRUE if the status type is independent, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
309 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
310 gboolean purple_status_type_is_independent(const PurpleStatusType *status_type);
9944
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 /**
10071
d2ba11541693 [gaim-migrate @ 11047]
Jonathan Champ <royanee@users.sourceforge.net>
parents: 10067
diff changeset
313 * Returns whether the status type is exclusive.
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
314 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
315 * @param status_type The status type.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
316 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
317 * @return TRUE if the status type is exclusive, FALSE otherwise.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
318 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
319 gboolean purple_status_type_is_exclusive(const PurpleStatusType *status_type);
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
320
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
321 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
322 * Returns whether or not a status type is available.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
323 *
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
324 * 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
325 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
326 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
327 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
328 * @return TRUE if the status is available, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
329 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
330 gboolean purple_status_type_is_available(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
331
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
332 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
333 * Returns the attribute with the specified ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
334 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
335 * @param status_type The status type containing the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
336 * @param id The ID of the desired attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
337 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
338 * @return The attribute, if found. NULL otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
339 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
340 PurpleStatusAttr *purple_status_type_get_attr(const PurpleStatusType *status_type,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
341 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
342
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 * Returns a list of all attributes in a status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
345 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
346 * @param status_type The status type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
347 *
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
348 * @constreturn The list of attributes.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
349 */
18190
bcf28ef7e8ff Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents: 16870
diff changeset
350 GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
351
10348
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
352 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
353 * Find the PurpleStatusType with the given id.
10348
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
354 *
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
355 * @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
356 * @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
357 *
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
358 * @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
359 * not be found.
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
360 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
361 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
362 const char *id);
0ab5eb1a828e [gaim-migrate @ 11562]
Mark Doliner <markdoliner@pidgin.im>
parents: 10340
diff changeset
363
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
364 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
365
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
366 /**************************************************************************/
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
367 /** @name PurpleStatusAttr API */
9944
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 /*@{*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
370
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
371 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
372 * Creates a new status attribute.
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 * @param id The ID of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
375 * @param name The name presented to the user.
34799
f029b9598b8e Undo initial replacement of PurpleValue
Ankit Vani <a@nevitus.org>
parents: 34798
diff changeset
376 * @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
377 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
378 * @return A new status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
379 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
380 PurpleStatusAttr *purple_status_attr_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
381 GValue *value_type);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
382
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 * Destroys a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
385 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
386 * @param attr The status attribute to destroy.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
387 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
388 void purple_status_attr_destroy(PurpleStatusAttr *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
389
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
390 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
391 * Returns the ID of a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
392 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
393 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
394 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
395 * @return The status attribute's ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
396 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
397 const char *purple_status_attr_get_id(const PurpleStatusAttr *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
398
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
399 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
400 * Returns the name of a status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
401 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
402 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
403 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
404 * @return The status attribute's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
405 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
406 const char *purple_status_attr_get_name(const PurpleStatusAttr *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
407
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
408 /**
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
409 * Returns the value of a status attribute.
9944
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 * @param attr The status attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
412 *
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
413 * @return The status attribute's value.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
414 */
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
415 GValue *purple_status_attr_get_value(const PurpleStatusAttr *attr);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
416
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
417 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
418
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
419 /**************************************************************************/
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
420 /** @name PurpleStatus API */
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
421 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
422 /*@{*/
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 /**
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
425 * Returns the GType for the PurpleStatus boxed structure.
34788
38d1b844ddb6 Updated GBoxed functions. Boxing is intended to be temporary for buddy list, saved status, plugins, status.
Ankit Vani <a@nevitus.org>
parents: 34785
diff changeset
426 * TODO Boxing of PurpleStatus is a temporary solution to having a GType for
38d1b844ddb6 Updated GBoxed functions. Boxing is intended to be temporary for buddy list, saved status, plugins, status.
Ankit Vani <a@nevitus.org>
parents: 34785
diff changeset
427 * statuses. This should rather be a GObject instead of a GBoxed.
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
428 */
34798
c1cb4cd0543d Resolved conflicting function names
Ankit Vani <a@nevitus.org>
parents: 34788
diff changeset
429 GType purple_status_get_g_type(void);
34785
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
430
99bcdb44c75f Added boxed types for PurpleStatus and PurpleSavedStatus
Ankit Vani <a@nevitus.org>
parents: 34778
diff changeset
431 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
432 * Creates a new status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
433 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
434 * @param status_type The type of status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
435 * @param presence The parent presence.
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 * @return The new status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
438 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
439 PurpleStatus *purple_status_new(PurpleStatusType *status_type,
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
440 PurplePresence *presence);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
441
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
442 /**
34774
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
443 * Destroys a status.
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
444 *
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
445 * @param status The status to destroy.
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
446 */
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
447 void purple_status_destroy(PurpleStatus *status);
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
448
b2c82de968f6 Backed out changeset b0ccef093327
Ankit Vani <a@nevitus.org>
parents: 34773
diff changeset
449 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
450 * Sets whether or not a status is active.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
451 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
452 * 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
453 *
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
454 * @param status The status.
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
455 * @param active The active state.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
456 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
457 void purple_status_set_active(PurpleStatus *status, gboolean active);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
458
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
459 /**
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
460 * Sets whether or not a status is active.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
461 *
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
462 * 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
463 *
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
464 * @param status The status.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
465 * @param active The active state.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
466 * @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
467 * 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
468 * attribute name for this PurpleStatusType. The list should
10204
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
469 * be NULL terminated.
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
470 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
471 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
472 va_list args);
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
473
874e91e2a3b3 [gaim-migrate @ 11325]
Mark Doliner <markdoliner@pidgin.im>
parents: 10151
diff changeset
474 /**
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
475 * Sets whether or not a status is active.
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
476 *
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
477 * 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
478 *
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
479 * @param status The status.
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
480 * @param active The active state.
11580
41ecd9e08031 [gaim-migrate @ 13850]
Mark Doliner <markdoliner@pidgin.im>
parents: 11522
diff changeset
481 * @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
482 * 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
483 * 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
484 * not modified or freed by this function.
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
485 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
486 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
487 GList *attrs);
11249
efc82f3e1bd3 [gaim-migrate @ 13418]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11129
diff changeset
488
9944
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 * Returns the status's type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
491 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
492 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
493 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
494 * @return The status's type.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
495 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
496 PurpleStatusType *purple_status_get_type(const PurpleStatus *status);
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 * Returns the status's presence.
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 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
502 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
503 * @return The status's presence.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
504 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
505 PurplePresence *purple_status_get_presence(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
506
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 * Returns the status's type ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
509 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
510 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
511 * purple_status_type_get_id(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
512 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
513 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
514 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
515 * @return The status's ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
516 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
517 const char *purple_status_get_id(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
518
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
519 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
520 * Returns the status's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
521 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
522 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
523 * purple_status_type_get_name(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
524 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
525 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
526 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
527 * @return The status's name.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
528 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
529 const char *purple_status_get_name(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
530
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
531 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
532 * Returns whether or not a status is independent.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
533 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
534 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
535 * purple_status_type_is_independent(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
536 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
537 * @param status The status.
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 * @return TRUE if the status is independent, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
540 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
541 gboolean purple_status_is_independent(const PurpleStatus *status);
9944
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 /**
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
544 * Returns whether or not a status is exclusive.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
545 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
546 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
547 * purple_status_type_is_exclusive(purple_status_get_type(status)).
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
548 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
549 * @param status The status.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
550 *
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
551 * @return TRUE if the status is exclusive, FALSE otherwise.
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
552 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
553 gboolean purple_status_is_exclusive(const PurpleStatus *status);
10067
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
554
d04171b6f098 [gaim-migrate @ 11043]
Mark Doliner <markdoliner@pidgin.im>
parents: 10040
diff changeset
555 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
556 * Returns whether or not a status is available.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
557 *
12595
8108c22aa723 [gaim-migrate @ 14925]
Richard Laager <rlaager@pidgin.im>
parents: 12484
diff changeset
558 * 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
559 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
560 * This is a convenience method for
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
561 * purple_status_type_is_available(purple_status_get_type(status)).
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
562 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
563 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
564 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
565 * @return TRUE if the status is available, or FALSE otherwise.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
566 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
567 gboolean purple_status_is_available(const PurpleStatus *status);
9944
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 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
570 * Returns the active state of a status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
571 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
572 * @param status The status.
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 * @return The active state of the status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
575 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
576 gboolean purple_status_is_active(const PurpleStatus *status);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
577
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
578 /**
10040
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
579 * Returns whether or not a status is considered 'online'
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
580 *
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
581 * @param status The status.
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
582 *
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
583 * @return TRUE if the status is considered online, FALSE otherwise
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
584 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
585 gboolean purple_status_is_online(const PurpleStatus *status);
10040
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
586
b74aeb350fc5 [gaim-migrate @ 10999]
Dave West <kat@users.sourceforge.net>
parents: 10006
diff changeset
587 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
588 * 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
589 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
590 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
591 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
592 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
593 * @return The value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
594 */
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
595 GValue *purple_status_get_attr_value(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
596 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
597
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
598 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
599 * 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
600 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
601 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
602 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
603 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
604 * @return The boolean value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
605 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
606 gboolean purple_status_get_attr_boolean(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
607 const char *id);
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 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
610 * 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
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 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
614 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
615 * @return The integer value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
616 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
617 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
618
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
619 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
620 * 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
621 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
622 * @param status The status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
623 * @param id The attribute ID.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
624 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
625 * @return The string value of the attribute.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
626 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
627 const char *purple_status_get_attr_string(const PurpleStatus *status,
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
628 const char *id);
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
629
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
630 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
631 * Compares two statuses for availability.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
632 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
633 * @param status1 The first status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
634 * @param status2 The second status.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
635 *
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
636 * @return -1 if @a status1 is more available than @a status2.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
637 * 0 if @a status1 is equal to @a status2.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
638 * 1 if @a status2 is more available than @a status1.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
639 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
640 gint purple_status_compare(const PurpleStatus *status1, const PurpleStatus *status2);
9944
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 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
643
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
644 /**************************************************************************/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
645 /** @name Status subsystem */
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
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
649 /**
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
650 * Get the handle for the status subsystem.
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
651 *
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
652 * @return the handle to the status subsystem
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
653 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
654 void *purple_status_get_handle(void);
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
655
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 10071
diff changeset
656 /**
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
657 * Initializes the status subsystem.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
658 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
659 void purple_status_init(void);
9944
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 /**
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
662 * Uninitializes the status subsystem.
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
663 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
664 void purple_status_uninit(void);
9944
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
665
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
666 /*@}*/
71ef020ec4b0 [gaim-migrate @ 10838]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
667
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32303
diff changeset
668 G_END_DECLS
15124
68a8be380f54 [gaim-migrate @ 17846]
Sean Egan <seanegan@pidgin.im>
parents: 14988
diff changeset
669
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
670 #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
671

mercurial