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