annotate src/status.h @ 11976:e33a9171aceb

[gaim-migrate @ 14269] When upgrading from Gaim < 2.x Do The Right Thing with auto-login/enabled accounts (make them sign in as available just like they used to) committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 04 Nov 2005 19:18:39 +0000
parents 8094a66d574b
children d799f242be3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11035
11e465b55fe6 [gaim-migrate @ 12922]
Gary Kramlich <grim@reaperworld.com>
parents: 10860
diff changeset
1 /*
6065
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * gaim
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6065
diff changeset
4 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6065
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 6065
diff changeset
6 * source distribution.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
7 *
6065
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * (at your option) any later version.
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 *
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * GNU General Public License for more details.
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 *
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 */
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
22 #ifndef _GAIM_STATUS_H_
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
23 #define _GAIM_STATUS_H_
6065
3a40666c08b4 [gaim-migrate @ 6515]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
25 /**
11505
6e40226a3321 [gaim-migrate @ 13750]
Gary Kramlich <grim@reaperworld.com>
parents: 11491
diff changeset
26 * @file status.h Status API
6e40226a3321 [gaim-migrate @ 13750]
Gary Kramlich <grim@reaperworld.com>
parents: 11491
diff changeset
27 * @ingroup core
6e40226a3321 [gaim-migrate @ 13750]
Gary Kramlich <grim@reaperworld.com>
parents: 11491
diff changeset
28 *
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
29 * A brief explanation of the status API:
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
30 *
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
31 * GaimStatusType's are created by each PRPL. They outline the
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
32 * available statuses of the protocol. AIM, for example, supports
11491
26791d1e69ff [gaim-migrate @ 13734]
Tim Ringenbach <marv@pidgin.im>
parents: 11257
diff changeset
33 * an available state with an optional available message, an away
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
34 * state with a mandatory message, and an invisible state (which is
10754
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
35 * technically "independent" of the other two, but we'll get into
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
36 * that later). GaimStatusTypes are very permanent. They are
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
37 * hardcoded in each PRPL and will not change often. And because
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
38 * they are hardcoded, they do not need to be saved to any XML file.
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
39 *
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
40 * A GaimStatus can be thought of as an "instance" of a GaimStatusType.
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
41 * If you've familiar with object-oriented programming languages
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
42 * then this should be immediately clear. Say, for example, that
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
43 * one of your AIM buddies has set himself as "away." You have a
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
44 * GaimBuddy node for this person in your buddy list. Gaim wants
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
45 * to mark this buddy as "away," so it creates a new GaimStatus.
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
46 * The GaimStatus has its GaimStatusType set to the "away" state
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
47 * for the oscar PRPL. The GaimStatus also contains the buddy's
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
48 * away message. GaimStatuses are sometimes saved, depending on
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
49 * the context. The current GaimStatuses associated with each of
11696
8094a66d574b [gaim-migrate @ 13982]
Ethan Blanton <elb@pidgin.im>
parents: 11651
diff changeset
50 * your accounts are saved so that the next time you start Gaim,
8094a66d574b [gaim-migrate @ 13982]
Ethan Blanton <elb@pidgin.im>
parents: 11651
diff changeset
51 * your accounts will be set to their last known statuses. There
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
52 * is also a list of saved statuses that are written to the
10740
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10737
diff changeset
53 * status.xml file. Also, each GaimStatus has a "savable" boolean.
94cc67130789 [gaim-migrate @ 12342]
Mark Doliner <mark@kingant.net>
parents: 10737
diff changeset
54 * If "savable" is set to FALSE then the status is NEVER saved.
10754
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
55 * All GaimStatuses should be inside a GaimPresence.
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
56 *
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
57 *
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
58 * A GaimStatus is either "indepedent" or "exclusive."
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
59 * Independent statuses can be active or inactive and it doesn't
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
60 * affect anything else. However, you can only have one exclusive
11696
8094a66d574b [gaim-migrate @ 13982]
Ethan Blanton <elb@pidgin.im>
parents: 11651
diff changeset
61 * status per GaimPresence. If you activate one exlusive status,
10754
8a97b59f0071 [gaim-migrate @ 12357]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
62 * then the previous exclusive status is automatically deactivated.
10737
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
63 *
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
64 * A GaimPresence is like a collection of GaimStatuses (plus some
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
65 * other random info). For any buddy, or for any one of your accounts,
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
66 * or for any person you're chatting with, you may know various
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
67 * amounts of information. This information is all contained in
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
68 * one GaimPresence. If one of your buddies is away and idle,
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
69 * then the presence contains the GaimStatus for their awayness,
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
70 * and it contains their current idle time. GaimPresences are
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
71 * never saved to disk. The information they contain is only relevent
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
72 * for the current GaimSession.
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
73 */
b7f0bc436179 [gaim-migrate @ 12339]
Mark Doliner <mark@kingant.net>
parents: 10567
diff changeset
74
10337
682201b69107 [gaim-migrate @ 11545]
Mark Doliner <mark@kingant.net>
parents: 10204
diff changeset
75 typedef struct _GaimStatusType GaimStatusType;
682201b69107 [gaim-migrate @ 11545]
Mark Doliner <mark@kingant.net>
parents: 10204
diff changeset
76 typedef struct _GaimStatusAttr GaimStatusAttr;
682201b69107 [gaim-migrate @ 11545]
Mark Doliner <mark@kingant.net>
parents: 10204
diff changeset
77 typedef struct _GaimPresence GaimPresence;
682201b69107 [gaim-migrate @ 11545]
Mark Doliner <mark@kingant.net>
parents: 10204
diff changeset
78 typedef struct _GaimStatus GaimStatus;
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
79
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
80 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
81 * A context for a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
82 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
83 * The context indicates what the presence applies to.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
84 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
85 typedef enum
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
86 {
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
87 GAIM_PRESENCE_CONTEXT_UNSET = 0,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
88 GAIM_PRESENCE_CONTEXT_ACCOUNT,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
89 GAIM_PRESENCE_CONTEXT_CONV,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
90 GAIM_PRESENCE_CONTEXT_BUDDY
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
91
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
92 } GaimPresenceContext;
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
93
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
94 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
95 * A primitive defining the basic structure of a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
96 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
97 typedef enum
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
98 {
10151
d83e6f2125b1 [gaim-migrate @ 11228]
Christian Hammond <chipx86@chipx86.com>
parents: 10087
diff changeset
99 GAIM_STATUS_UNSET = 0,
d83e6f2125b1 [gaim-migrate @ 11228]
Christian Hammond <chipx86@chipx86.com>
parents: 10087
diff changeset
100 GAIM_STATUS_OFFLINE,
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
101 GAIM_STATUS_AVAILABLE,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
102 GAIM_STATUS_UNAVAILABLE,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
103 GAIM_STATUS_HIDDEN,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
104 GAIM_STATUS_AWAY,
10348
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
105 GAIM_STATUS_EXTENDED_AWAY,
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
106 GAIM_STATUS_NUM_PRIMITIVES
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
107
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
108 } GaimStatusPrimitive;
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
109
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
110 #include "account.h"
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
111 #include "blist.h"
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
112 #include "conversation.h"
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
113 #include "value.h"
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
114
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
115 /**************************************************************************/
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
116 /** @name GaimStatusPrimtive API */
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
117 /**************************************************************************/
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
118 /*@{*/
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
119
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
120 /**
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
121 * Lookup the id of a primitive status type based on the type. This
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
122 * ID is a unique plain-text name of the status, without spaces.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
123 *
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
124 * @param type A primitive status type.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
125 *
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
126 * @return The unique ID for this type.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
127 */
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
128 const char *gaim_primitive_get_id_from_type(GaimStatusPrimitive type);
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
129
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
130 /**
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
131 * Lookup the name of a primitive status type based on the type. This
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
132 * name is the plain-English name of the status type. It is usually one
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
133 * or two works.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
134 *
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
135 * @param type A primitive status type.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
136 *
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
137 * @return The name of this type, suitable for users to see.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
138 */
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
139 const char *gaim_primitive_get_name_from_type(GaimStatusPrimitive type);
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
140
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
141 /**
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
142 * Lookup the value of a primitive status type based on the id. The
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
143 * ID is a unique plain-text name of the status, without spaces.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
144 *
10469
51b87da4e9f0 [gaim-migrate @ 11751]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
145 * @param id The unique ID of a primitive status type.
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
146 *
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
147 * @return The GaimStatusPrimitive value.
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
148 */
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
149 GaimStatusPrimitive gaim_primitive_get_type_from_id(const char *id);
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
150
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
151 /*@}*/
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
152
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
153 /**************************************************************************/
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
154 /** @name GaimStatusType API */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
155 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
156 /*@{*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
157
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
158 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
159 * Creates a new status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
160 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
161 * @param primitive The primitive status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
162 * @param id The ID of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
163 * @param name The name presented to the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
164 * @param saveable TRUE if the information set for this status by the
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
165 * user can be saved for future sessions.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
166 * @param user_settable TRUE if this is a status the user can manually set.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
167 * @param independent TRUE if this is an independent (non-exclusive)
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
168 * status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
169 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
170 * @return A new status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
171 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
172 GaimStatusType *gaim_status_type_new_full(GaimStatusPrimitive primitive,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
173 const char *id, const char *name,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
174 gboolean saveable,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
175 gboolean user_settable,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
176 gboolean independent);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
177
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
178 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
179 * Creates a new status type with some default values.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
180 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
181 * @param primitive The primitive status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
182 * @param id The ID of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
183 * @param name The name presented to the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
184 * @param user_settable TRUE if this is a status the user can manually set.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
185 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
186 * @return A new status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
187 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
188 GaimStatusType *gaim_status_type_new(GaimStatusPrimitive primitive,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
189 const char *id, const char *name,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
190 gboolean user_settable);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
191
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
192 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
193 * Creates a new status type with attributes.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
194 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
195 * @param primitive The primitive status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
196 * @param id The ID of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
197 * @param name The name presented to the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
198 * @param saveable TRUE if the information set for this status by the
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
199 * user can be saved for future sessions.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
200 * @param user_settable TRUE if this is a status the user can manually set.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
201 * @param independent TRUE if this is an independent (non-exclusive)
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
202 * status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
203 * @param attr_id The ID of the first attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
204 * @param attr_name The name of the first attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
205 * @param attr_value The value type of the first attribute attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
206 * @param ... Additional attribute information.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
207 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
208 * @return A new status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
209 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
210 GaimStatusType *gaim_status_type_new_with_attrs(GaimStatusPrimitive primitive,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
211 const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
212 const char *name,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
213 gboolean saveable,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
214 gboolean user_settable,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
215 gboolean independent,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
216 const char *attr_id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
217 const char *attr_name,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
218 GaimValue *attr_value, ...);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
219
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
220 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
221 * Destroys a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
222 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
223 * @param status_type The status type to destroy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
224 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
225 void gaim_status_type_destroy(GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
226
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
227 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
228 * Sets a status type's primary attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
229 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
230 * The value for the primary attribute is used as the description for
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
231 * the particular status type. An example is an away message. The message
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
232 * would be the primary attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
233 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
234 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
235 * @param attr_id The ID of the primary attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
236 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
237 void gaim_status_type_set_primary_attr(GaimStatusType *status_type,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
238 const char *attr_id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
239
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
240 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
241 * Adds an attribute to a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
242 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
243 * @param status_type The status type to add the attribute to.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
244 * @param id The ID of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
245 * @param name The name presented to the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
246 * @param value The value type of this attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
247 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
248 void gaim_status_type_add_attr(GaimStatusType *status_type, const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
249 const char *name, GaimValue *value);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
250
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
251 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
252 * Adds multiple attributes to a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
253 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
254 * @param status_type The status type to add the attribute to.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
255 * @param id The ID of the first attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
256 * @param name The description of the first attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
257 * @param value The value type of the first attribute attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
258 * @param ... Additional attribute information.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
259 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
260 void gaim_status_type_add_attrs(GaimStatusType *status_type, const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
261 const char *name, GaimValue *value, ...);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
262
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
263 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
264 * Adds multiple attributes to a status type using a va_list.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
265 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
266 * @param status_type The status type to add the attribute to.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
267 * @param args The va_list of attributes.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
268 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
269 void gaim_status_type_add_attrs_vargs(GaimStatusType *status_type,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
270 va_list args);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
271
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
272 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
273 * Returns the primitive type of a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
274 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
275 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
276 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
277 * @return The primitive type of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
278 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
279 GaimStatusPrimitive gaim_status_type_get_primitive(
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
280 const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
281
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
282 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
283 * Returns the ID of a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
284 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
285 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
286 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
287 * @return The ID of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
288 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
289 const char *gaim_status_type_get_id(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
290
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
291 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
292 * Returns the name of a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
293 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
294 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
295 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
296 * @return The name of the status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
297 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
298 const char *gaim_status_type_get_name(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
299
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
300 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
301 * Returns whether or not the status type is saveable.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
302 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
303 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
304 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
305 * @return TRUE if user-defined statuses based off this type are saveable.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
306 * FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
307 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
308 gboolean gaim_status_type_is_saveable(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
309
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
310 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
311 * Returns whether or not the status type can be set or modified by the
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
312 * user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
313 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
314 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
315 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
316 * @return TRUE if the status type can be set or modified by the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
317 * FALSE if it's a protocol-set setting.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
318 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
319 gboolean gaim_status_type_is_user_settable(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
320
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
321 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
322 * Returns whether or not the status type is independent.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
323 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
324 * Independent status types are non-exclusive. If other status types on
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
325 * the same hierarchy level are set, this one will not be affected.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
326 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
327 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
328 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
329 * @return TRUE if the status type is independent, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
330 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
331 gboolean gaim_status_type_is_independent(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
332
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
333 /**
10071
af06746954de [gaim-migrate @ 11047]
Mark Doliner <mark@kingant.net>
parents: 10067
diff changeset
334 * Returns whether the status type is exclusive.
10067
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
335 *
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
336 * @param status_type The status type.
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
337 *
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
338 * @return TRUE if the status type is exclusive, FALSE otherwise.
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
339 */
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
340 gboolean gaim_status_type_is_exclusive(const GaimStatusType *status_type);
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
341
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
342 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
343 * Returns whether or not a status type is available.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
344 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
345 * Available status types are online and possibly hidden, but not away.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
346 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
347 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
348 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
349 * @return TRUE if the status is available, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
350 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
351 gboolean gaim_status_type_is_available(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
352
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
353 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
354 * Returns a status type's primary attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
355 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
356 * @param type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
357 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
358 * @return The primary attribute's ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
359 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
360 const char *gaim_status_type_get_primary_attr(const GaimStatusType *type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
361
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
362 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
363 * Returns the attribute with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
364 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
365 * @param status_type The status type containing the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
366 * @param id The ID of the desired attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
367 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
368 * @return The attribute, if found. NULL otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
369 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
370 GaimStatusAttr *gaim_status_type_get_attr(const GaimStatusType *status_type,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
371 const char *id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
372
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
373 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
374 * Returns a list of all attributes in a status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
375 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
376 * @param status_type The status type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
377 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
378 * @return The list of attributes.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
379 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
380 const GList *gaim_status_type_get_attrs(const GaimStatusType *status_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
381
10348
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
382 /**
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
383 * Find the GaimStatusType with the given id.
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
384 *
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
385 * @param status_types A list of status types. Often account->status_types.
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
386 * @param id The unique ID of the status type you wish to find.
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
387 *
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
388 * @return The status type with the given ID, or NULL if one could
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
389 * not be found.
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
390 */
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
391 const GaimStatusType *gaim_status_type_find_with_id(GList *status_types,
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
392 const char *id);
64bc206c7473 [gaim-migrate @ 11562]
Mark Doliner <mark@kingant.net>
parents: 10340
diff changeset
393
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
394 /*@}*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
395
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
396 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
397 /** @name GaimStatusAttr API */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
398 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
399 /*@{*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
400
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
401 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
402 * Creates a new status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
403 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
404 * @param id The ID of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
405 * @param name The name presented to the user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
406 * @param value_type The type of data contained in the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
407 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
408 * @return A new status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
409 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
410 GaimStatusAttr *gaim_status_attr_new(const char *id, const char *name,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
411 GaimValue *value_type);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
412
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
413 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
414 * Destroys a status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
415 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
416 * @param attr The status attribute to destroy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
417 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
418 void gaim_status_attr_destroy(GaimStatusAttr *attr);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
419
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
420 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
421 * Returns the ID of a status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
422 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
423 * @param attr The status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
424 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
425 * @return The status attribute's ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
426 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
427 const char *gaim_status_attr_get_id(const GaimStatusAttr *attr);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
428
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
429 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
430 * Returns the name of a status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
431 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
432 * @param attr The status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
433 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
434 * @return The status attribute's name.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
435 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
436 const char *gaim_status_attr_get_name(const GaimStatusAttr *attr);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
437
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
438 /**
11249
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
439 * Returns the value of a status attribute.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
440 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
441 * @param attr The status attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
442 *
11249
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
443 * @return The status attribute's value.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
444 */
11249
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
445 GaimValue *gaim_status_attr_get_value(const GaimStatusAttr *attr);
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
446
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
447 /*@}*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
448
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
449 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
450 /** @name GaimStatus API */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
451 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
452 /*@{*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
453
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
454 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
455 * Creates a new status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
456 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
457 * @param status_type The type of status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
458 * @param presence The parent presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
459 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
460 * @return The new status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
461 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
462 GaimStatus *gaim_status_new(GaimStatusType *status_type,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
463 GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
464
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
465 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
466 * Destroys a status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
467 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
468 * @param status The status to destroy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
469 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
470 void gaim_status_destroy(GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
471
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
472 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
473 * Sets whether or not a status is active.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
474 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
475 * This should only be called by the account, conversation, and buddy APIs.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
476 *
10204
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
477 * @param status The status.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
478 * @param active The active state.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
479 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
480 void gaim_status_set_active(GaimStatus *status, gboolean active);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
481
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
482 /**
10204
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
483 * Sets whether or not a status is active.
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
484 *
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
485 * This should only be called by the account, conversation, and buddy APIs.
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
486 *
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
487 * @param status The status.
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
488 * @param active The active state.
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
489 * @param args A list of attributes to set on the status. This list is
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
490 * composed of key/value pairs, where each key is a valid
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
491 * attribute name for this GaimStatusType. The list should
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
492 * be NULL terminated.
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
493 */
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
494 void gaim_status_set_active_with_attrs(GaimStatus *status, gboolean active,
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
495 va_list args);
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
496
393f85d9f8dd [gaim-migrate @ 11325]
Mark Doliner <mark@kingant.net>
parents: 10151
diff changeset
497 /**
11249
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
498 * Sets whether or not a status is active.
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
499 *
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
500 * This should only be called by the account, conversation, and buddy APIs.
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
501 *
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
502 * @param status The status.
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
503 * @param active The active state.
11580
24169af08585 [gaim-migrate @ 13850]
Mark Doliner <mark@kingant.net>
parents: 11522
diff changeset
504 * @param attrs A list of attributes to set on the status. This list is
11249
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
505 * composed of key/value pairs, where each key is a valid
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
506 * attribute name for this GaimStatusType.
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
507 */
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
508 void gaim_status_set_active_with_attrs_list(GaimStatus *status, gboolean active,
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
509 const GList *attrs);
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
510
b4b1be482b4e [gaim-migrate @ 13418]
Mark Doliner <mark@kingant.net>
parents: 11129
diff changeset
511 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
512 * Sets the boolean value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
513 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
514 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
515 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
516 * @param value The boolean value.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
517 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
518 void gaim_status_set_attr_boolean(GaimStatus *status, const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
519 gboolean value);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
520
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
521 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
522 * Sets the integer value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
523 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
524 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
525 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
526 * @param value The integer value.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
527 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
528 void gaim_status_set_attr_int(GaimStatus *status, const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
529 int value);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
530
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
531 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
532 * Sets the string value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
533 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
534 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
535 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
536 * @param value The string value.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
537 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
538 void gaim_status_set_attr_string(GaimStatus *status, const char *id,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
539 const char *value);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
540
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
541 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
542 * Returns the status's type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
543 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
544 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
545 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
546 * @return The status's type.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
547 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
548 GaimStatusType *gaim_status_get_type(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
549
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
550 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
551 * Returns the status's presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
552 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
553 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
554 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
555 * @return The status's presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
556 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
557 GaimPresence *gaim_status_get_presence(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
558
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
559 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
560 * Returns the status's type ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
561 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
562 * This is a convenience method for
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
563 * gaim_status_type_get_id(gaim_status_get_type(status)).
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
564 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
565 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
566 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
567 * @return The status's ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
568 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
569 const char *gaim_status_get_id(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
570
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
571 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
572 * Returns the status's name.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
573 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
574 * This is a convenience method for
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
575 * gaim_status_type_get_name(gaim_status_get_type(status)).
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
576 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
577 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
578 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
579 * @return The status's name.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
580 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
581 const char *gaim_status_get_name(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
582
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
583 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
584 * Returns whether or not a status is independent.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
585 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
586 * This is a convenience method for
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
587 * gaim_status_type_is_independent(gaim_status_get_type(status)).
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
588 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
589 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
590 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
591 * @return TRUE if the status is independent, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
592 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
593 gboolean gaim_status_is_independent(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
594
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
595 /**
10067
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
596 * Returns whether or not a status is exclusive.
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
597 *
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
598 * This is a convenience method for
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
599 * gaim_status_type_is_exclusive(gaim_status_get_type(status)).
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
600 *
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
601 * @param status The status.
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
602 *
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
603 * @return TRUE if the status is exclusive, FALSE otherwise.
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
604 */
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
605 gboolean gaim_status_is_exclusive(const GaimStatus *status);
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
606
39142bdd5ba6 [gaim-migrate @ 11043]
Mark Doliner <mark@kingant.net>
parents: 10040
diff changeset
607 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
608 * Returns whether or not a status is available.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
609 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
610 * Available statuses are online and possibly hidden, but not away or idle.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
611 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
612 * This is a convenience method for
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
613 * gaim_status_type_is_available(gaim_status_get_type(status)).
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
614 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
615 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
616 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
617 * @return TRUE if the status is available, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
618 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
619 gboolean gaim_status_is_available(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
620
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
621 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
622 * Returns the active state of a status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
623 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
624 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
625 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
626 * @return The active state of the status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
627 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
628 gboolean gaim_status_is_active(const GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
629
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
630 /**
10040
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
631 * Returns whether or not a status is considered 'online'
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
632 *
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
633 * @param status The status.
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
634 *
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
635 * @return TRUE if the status is considered online, FALSE otherwise
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
636 */
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
637 gboolean gaim_status_is_online(const GaimStatus *status);
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
638
81059dce3aed [gaim-migrate @ 10999]
Luke Schierer <lschiere@pidgin.im>
parents: 10006
diff changeset
639 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
640 * Returns the value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
641 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
642 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
643 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
644 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
645 * @return The value of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
646 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
647 GaimValue *gaim_status_get_attr_value(const GaimStatus *status,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
648 const char *id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
649
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
650 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
651 * Returns the boolean value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
652 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
653 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
654 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
655 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
656 * @return The boolean value of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
657 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
658 gboolean gaim_status_get_attr_boolean(const GaimStatus *status,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
659 const char *id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
660
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
661 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
662 * Returns the integer value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
663 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
664 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
665 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
666 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
667 * @return The integer value of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
668 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
669 int gaim_status_get_attr_int(const GaimStatus *status, const char *id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
670
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
671 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
672 * Returns the string value of an attribute in a status with the specified ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
673 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
674 * @param status The status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
675 * @param id The attribute ID.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
676 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
677 * @return The string value of the attribute.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
678 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
679 const char *gaim_status_get_attr_string(const GaimStatus *status,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
680 const char *id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
681
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
682 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
683 * Compares two statuses for availability.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
684 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
685 * @param status1 The first status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
686 * @param status2 The second status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
687 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
688 * @return -1 if @a status1 is more available than @a status2.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
689 * 0 if @a status1 is equal to @a status2.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
690 * 1 if @a status2 is more available than @a status1.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
691 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
692 gint gaim_status_compare(const GaimStatus *status1, const GaimStatus *status2);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
693
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
694 /*@}*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
695
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
696 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
697 /** @name GaimPresence API */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
698 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
699 /*@{*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
700
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
701 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
702 * Creates a new presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
703 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
704 * @param context The presence context.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
705 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
706 * @return A new presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
707 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
708 GaimPresence *gaim_presence_new(GaimPresenceContext context);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
709
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
710 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
711 * Creates a presence for an account.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
712 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
713 * @param account The account.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
714 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
715 * @return The new presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
716 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
717 GaimPresence *gaim_presence_new_for_account(GaimAccount *account);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
718
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
719 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
720 * Creates a presence for a conversation.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
721 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
722 * @param conv The conversation.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
723 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
724 * @return The new presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
725 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
726 GaimPresence *gaim_presence_new_for_conv(GaimConversation *conv);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
727
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
728 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
729 * Creates a presence for a buddy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
730 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
731 * @param buddy The buddy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
732 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
733 * @return The new presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
734 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
735 GaimPresence *gaim_presence_new_for_buddy(GaimBuddy *buddy);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
736
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
737 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
738 * Destroys a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
739 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
740 * All statuses added to this list will be destroyed along with
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
741 * the presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
742 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
743 * If this presence belongs to a buddy, you must call
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
744 * gaim_presence_remove_buddy() first.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
745 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
746 * @param presence The presence to destroy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
747 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
748 void gaim_presence_destroy(GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
749
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
750 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
751 * Removes a buddy from a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
752 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
753 * This must be done before destroying a buddy in a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
754 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
755 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
756 * @param buddy The buddy.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
757 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
758 void gaim_presence_remove_buddy(GaimPresence *presence, GaimBuddy *buddy);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
759
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
760 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
761 * Adds a status to a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
762 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
763 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
764 * @param status The status to add.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
765 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
766 void gaim_presence_add_status(GaimPresence *presence, GaimStatus *status);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
767
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
768 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
769 * Adds a list of statuses to the presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
770 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
771 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
772 * @param source_list The source list of statuses to add.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
773 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
774 void gaim_presence_add_list(GaimPresence *presence, const GList *source_list);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
775
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
776 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
777 * Sets the active state of a status in a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
778 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
779 * Only independent statuses can be set unactive. Normal statuses can only
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
780 * be set active, so if you wish to disable a status, set another
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
781 * non-independent status to active, or use gaim_presence_switch_status().
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
782 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
783 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
784 * @param status_id The ID of the status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
785 * @param active The active state.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
786 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
787 void gaim_presence_set_status_active(GaimPresence *presence,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
788 const char *status_id, gboolean active);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
789
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
790 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
791 * Switches the active status in a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
792 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
793 * This is similar to gaim_presence_set_status_active(), except it won't
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
794 * activate independent statuses.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
795 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
796 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
797 * @param status_id The status ID to switch to.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
798 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
799 void gaim_presence_switch_status(GaimPresence *presence,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
800 const char *status_id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
801
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
802 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
803 * Sets the idle state and time on a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
804 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
805 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
806 * @param idle The idle state.
10860
d01d81de94d8 [gaim-migrate @ 12543]
Mark Doliner <mark@kingant.net>
parents: 10754
diff changeset
807 * @param idle_time The idle time, if @a idle is TRUE. This
d01d81de94d8 [gaim-migrate @ 12543]
Mark Doliner <mark@kingant.net>
parents: 10754
diff changeset
808 * is the time at which the user became idle,
d01d81de94d8 [gaim-migrate @ 12543]
Mark Doliner <mark@kingant.net>
parents: 10754
diff changeset
809 * in seconds since the epoch.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
810 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
811 void gaim_presence_set_idle(GaimPresence *presence, gboolean idle,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
812 time_t idle_time);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
813
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
814 /**
10006
9baedaca25c7 [gaim-migrate @ 10923]
Mark Doliner <mark@kingant.net>
parents: 9978
diff changeset
815 * Sets the login time on a presence.
9baedaca25c7 [gaim-migrate @ 10923]
Mark Doliner <mark@kingant.net>
parents: 9978
diff changeset
816 *
10071
af06746954de [gaim-migrate @ 11047]
Mark Doliner <mark@kingant.net>
parents: 10067
diff changeset
817 * @param presence The presence.
af06746954de [gaim-migrate @ 11047]
Mark Doliner <mark@kingant.net>
parents: 10067
diff changeset
818 * @param login_time The login time.
10006
9baedaca25c7 [gaim-migrate @ 10923]
Mark Doliner <mark@kingant.net>
parents: 9978
diff changeset
819 */
9baedaca25c7 [gaim-migrate @ 10923]
Mark Doliner <mark@kingant.net>
parents: 9978
diff changeset
820 void gaim_presence_set_login_time(GaimPresence *presence, time_t login_time);
9baedaca25c7 [gaim-migrate @ 10923]
Mark Doliner <mark@kingant.net>
parents: 9978
diff changeset
821
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
822
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
823 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
824 * Returns the presence's context.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
825 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
826 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
827 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
828 * @return The presence's context.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
829 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
830 GaimPresenceContext gaim_presence_get_context(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
831
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
832 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
833 * Returns a presence's account.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
834 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
835 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
836 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
837 * @return The presence's account.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
838 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
839 GaimAccount *gaim_presence_get_account(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
840
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
841 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
842 * Returns a presence's conversation.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
843 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
844 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
845 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
846 * @return The presence's conversation.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
847 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
848 GaimConversation *gaim_presence_get_conversation(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
849
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
850 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
851 * Returns a presence's chat user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
852 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
853 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
854 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
855 * @return The chat's user.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
856 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
857 const char *gaim_presence_get_chat_user(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
858
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
859 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
860 * Returns a presence's list of buddies.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
861 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
862 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
863 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
864 * @return The presence's list of buddies.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
865 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
866 const GList *gaim_presence_get_buddies(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
867
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
868 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
869 * Returns all the statuses in a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
870 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
871 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
872 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
873 * @return The statuses.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
874 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
875 const GList *gaim_presence_get_statuses(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
876
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
877 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
878 * Returns the status with the specified ID from a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
879 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
880 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
881 * @param status_id The ID of the status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
882 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
883 * @return The status if found, or NULL.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
884 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
885 GaimStatus *gaim_presence_get_status(const GaimPresence *presence,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
886 const char *status_id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
887
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
888 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
889 * Returns the active exclusive status from a presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
890 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
891 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
892 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
893 * @return The active exclusive status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
894 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
895 GaimStatus *gaim_presence_get_active_status(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
896
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
897 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
898 * Returns whether or not a presence is available.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
899 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
900 * Available presences are online and possibly hidden, but not away or idle.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
901 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
902 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
903 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
904 * @return TRUE if the presence is available, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
905 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
906 gboolean gaim_presence_is_available(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
907
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
908 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
909 * Returns whether or not a presence is online.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
910 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
911 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
912 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
913 * @return TRUE if the presence is online, or FALSE otherwise.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
914 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
915 gboolean gaim_presence_is_online(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
916
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
917 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
918 * Returns whether or not a status in a presence is active.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
919 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
920 * A status is active if itself or any of its sub-statuses are active.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
921 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
922 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
923 * @param status_id The ID of the status.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
924 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
925 * @return TRUE if the status is active, or FALSE.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
926 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
927 gboolean gaim_presence_is_status_active(const GaimPresence *presence,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
928 const char *status_id);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
929
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
930 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
931 * Returns whether or not a status with the specified primitive type
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
932 * in a presence is active.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
933 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
934 * A status is active if itself or any of its sub-statuses are active.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
935 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
936 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
937 * @param primitive The status primitive.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
938 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
939 * @return TRUE if the status is active, or FALSE.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
940 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
941 gboolean gaim_presence_is_status_primitive_active(
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
942 const GaimPresence *presence, GaimStatusPrimitive primitive);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
943
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
944 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
945 * Returns whether or not a presence is idle.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
946 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
947 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
948 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
949 * @return TRUE if the presence is idle, or FALSE otherwise.
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 11580
diff changeset
950 * If the presence is offline (gaim_presence_is_online()
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 11580
diff changeset
951 * returns FALSE) then FALSE is returned.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
952 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
953 gboolean gaim_presence_is_idle(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
954
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
955 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
956 * Returns the presence's idle time.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
957 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
958 * @param presence The presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
959 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
960 * @return The presence's idle time.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
961 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
962 time_t gaim_presence_get_idle_time(const GaimPresence *presence);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
963
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
964 /**
10567
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
965 * Returns the presence's login time.
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
966 *
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
967 * @param presence The presence.
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
968 *
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
969 * @return The presence's login time.
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
970 */
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
971 time_t gaim_presence_get_login_time(const GaimPresence *presence);
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
972
54f7939df8e3 [gaim-migrate @ 11951]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10469
diff changeset
973 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
974 * Compares two presences for availability.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
975 *
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
976 * @param presence1 The first presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
977 * @param presence2 The second presence.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
978 *
10860
d01d81de94d8 [gaim-migrate @ 12543]
Mark Doliner <mark@kingant.net>
parents: 10754
diff changeset
979 * @return -1 if @a presence1 is more available than @a presence2.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
980 * 0 if @a presence1 is equal to @a presence2.
10860
d01d81de94d8 [gaim-migrate @ 12543]
Mark Doliner <mark@kingant.net>
parents: 10754
diff changeset
981 * 1 if @a presence1 is less available than @a presence2.
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
982 */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
983 gint gaim_presence_compare(const GaimPresence *presence1,
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
984 const GaimPresence *presence2);
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
985
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
986 /*@}*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
987
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
988 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
989 /** @name Status subsystem */
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
990 /**************************************************************************/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
991 /*@{*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
992
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
993 /**
10087
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
994 * Get the handle for the status subsystem.
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
995 *
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
996 * @return the handle to the status subsystem
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
997 */
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents: 10348
diff changeset
998 void *gaim_status_get_handle();
10087
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
999
9fdbfe832fac [gaim-migrate @ 11098]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10071
diff changeset
1000 /**
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1001 * Initializes the status subsystem.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1002 */
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents: 10348
diff changeset
1003 void gaim_status_init(void);
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1004
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1005 /**
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1006 * Uninitializes the status subsystem.
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1007 */
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents: 10348
diff changeset
1008 void gaim_status_uninit(void);
9944
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1009
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1010 /*@}*/
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1011
e4a27c9aec4c [gaim-migrate @ 10838]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
1012 #endif /* _GAIM_STATUS_H_ */