annotate src/savedstatuses.h @ 12775:4dc5e71c5a57

[gaim-migrate @ 15122] sf patch #1399993, from John Bailey and Sadrul Habib Chowdhury, I think "Add ability to idle all accounts to I'dle Ma'ker" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 09 Jan 2006 04:54:16 +0000
parents d03afaccd41c
children e5f780a6137b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
1 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
2 * @file savedstatuses.h Saved Status API
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
3 * @ingroup core
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
4 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
5 * gaim
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
6 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
9 * source distribution.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
10 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
14 * (at your option) any later version.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
15 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
19 * GNU General Public License for more details.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
20 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
24 */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
25 #ifndef _GAIM_SAVEDSTATUSES_H_
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
26 #define _GAIM_SAVEDSTATUSES_H_
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
27
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
28 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
29 * Saved statuses don't really interact much with the rest of Gaim. It
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
30 * could really be a plugin. It's just a list of away states. When
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
31 * a user chooses one of the saved states, their Gaim accounts are set
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
32 * to the settings of that state.
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
33 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
34 * In the savedstatus API, there is the concept of a 'transient'
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
35 * saved status. A transient saved status is one that is not
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
36 * permanent. Gaim will removed it automatically if it isn't
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
37 * used for a period of time. Transient saved statuses don't
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
38 * have titles and they don't show up in the list of saved
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
39 * statuses. In fact, if a saved status does not have a title
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
40 * then it is transient. If it does have a title, then it is not
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
41 * transient.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
42 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
43 * What good is a transient status, you ask? They can be used to
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
44 * keep track of the user's 5 most recently used statuses, for
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
45 * example. Basically if they just set a message on the fly,
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
46 * we'll cache it for them in case they want to use it again. If
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
47 * they don't use it again, we'll just delete it.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
48 */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
49
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
50 /*
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
51 * TODO: Hmm. We should probably just be saving GaimPresences. That's
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
52 * something we should look into once the status box gets fleshed
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
53 * out more.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
54 */
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
55
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
56 typedef struct _GaimSavedStatus GaimSavedStatus;
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
57 typedef struct _GaimSavedStatusSub GaimSavedStatusSub;
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
58
10447
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 10420
diff changeset
59 #include "status.h"
6feef0a9098a [gaim-migrate @ 11712]
Mark Doliner <mark@kingant.net>
parents: 10420
diff changeset
60
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
61 /**************************************************************************/
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
62 /** @name Saved status subsystem */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
63 /**************************************************************************/
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
64 /*@{*/
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
65
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
66 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
67 * Create a new saved status. This will add the saved status to the
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
68 * list of saved statuses and writes the revised list to status.xml.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
69 *
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
70 * @param title The title of the saved status. This must be
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
71 * unique. Or, if you want to create a transient
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
72 * saved status, then pass in NULL.
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
73 * @param type The type of saved status.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
74 *
10420
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
75 * @return The newly created saved status, or NULL if the title you
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
76 * used was already taken.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
77 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
78 GaimSavedStatus *gaim_savedstatus_new(const char *title,
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
79 GaimStatusPrimitive type);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
80
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
81 /**
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
82 * Set the title for the given saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
83 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
84 * @param status The saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
85 * @param title The title of the saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
86 */
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
87 void gaim_savedstatus_set_title(GaimSavedStatus *status,
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
88 const char *title);
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
89
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
90 /**
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
91 * Set the type for the given saved status.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
92 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
93 * @param status The saved status.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
94 * @param type The type of saved status.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
95 */
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
96 void gaim_savedstatus_set_type(GaimSavedStatus *status,
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
97 GaimStatusPrimitive type);
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
98
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
99 /**
10420
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
100 * Set the message for the given saved status.
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
101 *
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
102 * @param status The saved status.
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
103 * @param message The message, or NULL if you want to unset the
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
104 * message for this status.
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
105 */
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
106 void gaim_savedstatus_set_message(GaimSavedStatus *status,
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
107 const char *message);
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
108
854c972ea863 [gaim-migrate @ 11671]
Mark Doliner <mark@kingant.net>
parents: 10419
diff changeset
109 /**
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
110 * Set a substatus for an account in a saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
111 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
112 * @param status The saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
113 * @param account The account.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
114 * @param type The status type for the account in the staved
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
115 * status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
116 * @param message The message for the account in the substatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
117 */
12080
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
118 void gaim_savedstatus_set_substatus(GaimSavedStatus *status,
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
119 const GaimAccount *account,
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
120 const GaimStatusType *type,
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
121 const char *message);
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
122
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
123 /**
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
124 * Unset a substatus for an account in a saved status. This clears
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
125 * the previosly set substatus for the GaimSavedStatus. If this
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
126 * saved status is activated then this account will use the default
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
127 * status type and message.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
128 *
12245
465ddcb3e9e8 [gaim-migrate @ 14547]
Mark Doliner <mark@kingant.net>
parents: 12125
diff changeset
129 * @param saved_status The saved status.
465ddcb3e9e8 [gaim-migrate @ 14547]
Mark Doliner <mark@kingant.net>
parents: 12125
diff changeset
130 * @param account The account.
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
131 */
12080
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
132 void gaim_savedstatus_unset_substatus(GaimSavedStatus *saved_status,
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
133 const GaimAccount *account);
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
134
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
135 /**
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
136 * Delete a saved status. This removes the saved status from the list
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
137 * of saved statuses, and writes the revised list to status.xml.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
138 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
139 * @param title The title of the saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
140 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
141 * @return TRUE if the status was successfully deleted. FALSE if the
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
142 * status could not be deleted because no saved status exists
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
143 * with the given title.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
144 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
145 gboolean gaim_savedstatus_delete(const char *title);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
146
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
147 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
148 * Returns all saved statuses.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
149 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
150 * @return A list of saved statuses.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
151 */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
152 const GList *gaim_savedstatuses_get_all(void);
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
153
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
154 /**
12688
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
155 * Returns the n most popular saved statuses. "Popularity" is
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
156 * determined by when the last time a saved_status was used and
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
157 * how many times it has been used.
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
158 *
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
159 * @param how_many The maximum number of saved statuses
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
160 * to return, or '0' to get all saved
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
161 * statuses sorted by popularity.
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
162 * @return A linked list containing at most how_many
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
163 * GaimSavedStatuses. This list should be
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
164 * g_list_free'd by the caller (but the
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
165 * GaimSavedStatuses must not be free'd).
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
166 */
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
167 GList *gaim_savedstatuses_get_popular(unsigned int how_many);
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
168
473c23442a36 [gaim-migrate @ 15031]
Mark Doliner <mark@kingant.net>
parents: 12323
diff changeset
169 /**
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
170 * Returns the currently selected saved status.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
171 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
172 * @return A pointer to the in-use GaimSavedStatus.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
173 */
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12245
diff changeset
174 GaimSavedStatus *gaim_savedstatus_get_current(void);
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
175
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
176 /**
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
177 * Returns the saved status that gets used when your
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
178 * accounts become idle-away.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
179 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
180 * @return A pointer to the idle-away GaimSavedStatus.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
181 */
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12245
diff changeset
182 GaimSavedStatus *gaim_savedstatus_get_idleaway(void);
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
183
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
184 /**
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
185 * Finds a saved status with the specified title.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
186 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
187 * @param title The name of the saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
188 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
189 * @return The saved status if found, or NULL.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
190 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
191 GaimSavedStatus *gaim_savedstatus_find(const char *title);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
192
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
193 /**
12690
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
194 * Finds a saved status with the specified creation time.
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
195 *
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
196 * @param creation_time The timestamp when the saved
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
197 * status was created.
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
198 *
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
199 * @return The saved status if found, or NULL.
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
200 */
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
201 GaimSavedStatus *gaim_savedstatus_find_by_creation_time(time_t creation_time);
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
202
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
203 /**
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
204 * Determines if a given saved status is "transient."
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
205 * A transient saved status is one that was not
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
206 * explicitly added by the user. Transient statuses
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
207 * are automatically removed if they are not used
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
208 * for a period of time.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
209 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
210 * A transient saved statuses is automatically
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
211 * created by the status box when the user sets himself
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
212 * to one of the generic primitive statuses. The reason
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
213 * we need to save this status information is so we can
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
214 * restore it when Gaim restarts.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
215 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
216 * @param saved_status The saved status.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
217 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
218 * @return TRUE if the saved status is transient.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
219 */
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
220 gboolean gaim_savedstatus_is_transient(const GaimSavedStatus *saved_status);
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
221
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
222 /**
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
223 * Return the name of a given saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
224 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
225 * @param saved_status The saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
226 *
12690
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
227 * @return The title. This value may be a static buffer which may
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
228 * be overwritten on subsequent calls to this function. If
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
229 * you need a reference to the title for prolonged use then
d03afaccd41c [gaim-migrate @ 15033]
Mark Doliner <mark@kingant.net>
parents: 12688
diff changeset
230 * you should make a copy of it.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
231 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
232 const char *gaim_savedstatus_get_title(const GaimSavedStatus *saved_status);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
233
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
234 /**
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
235 * Return the type of a given saved status.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
236 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
237 * @param saved_status The saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
238 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
239 * @return The name.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
240 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
241 GaimStatusPrimitive gaim_savedstatus_get_type(const GaimSavedStatus *saved_status);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
242
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
243 /**
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
244 * Return the default message of a given saved status.
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
245 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
246 * @param saved_status The saved status.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
247 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
248 * @return The name.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
249 */
10419
c9b1f3fac753 [gaim-migrate @ 11670]
Mark Doliner <mark@kingant.net>
parents: 10418
diff changeset
250 const char *gaim_savedstatus_get_message(const GaimSavedStatus *saved_status);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
251
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
252 /**
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
253 * Return the time in seconds-since-the-epoch when this
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
254 * saved status was created. Note: For any status created
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
255 * by Gaim 1.5.0 or older this value will be invalid and
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
256 * very small (close to 0). This is because Gaim 1.5.0
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
257 * and older did not record the timestamp when the status
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
258 * was created.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
259 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
260 * However, this value is guaranteed to be a unique
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
261 * identifier for the given saved status.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
262 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
263 * @param saved_status The saved status.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
264 *
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
265 * @return The timestamp when this saved status was created.
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
266 */
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
267 time_t gaim_savedstatus_get_creation_time(const GaimSavedStatus *saved_status);
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
268
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
269 /**
11651
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
270 * Determine if a given saved status has "substatuses,"
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
271 * or if it is a simple status (the same for all
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
272 * accounts).
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
273 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
274 * @param saved_status The saved status.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
275 *
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
276 * @return TRUE if the saved_status has substatuses.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
277 * FALSE otherwise.
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
278 */
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
279 gboolean gaim_savedstatus_has_substatuses(const GaimSavedStatus *saved_status);
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
280
723487d07aa0 [gaim-migrate @ 13935]
Mark Doliner <mark@kingant.net>
parents: 10447
diff changeset
281 /**
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
282 * Get the substatus for an account in a saved status.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
283 *
12245
465ddcb3e9e8 [gaim-migrate @ 14547]
Mark Doliner <mark@kingant.net>
parents: 12125
diff changeset
284 * @param saved_status The saved status.
465ddcb3e9e8 [gaim-migrate @ 14547]
Mark Doliner <mark@kingant.net>
parents: 12125
diff changeset
285 * @param account The account.
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
286 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
287 * @return The GaimSavedStatusSub for the account, or NULL if
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
288 * the given account does not have a substatus that
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
289 * differs from the default status of this GaimSavedStatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
290 */
12080
3b52d94437f3 [gaim-migrate @ 14377]
Mark Doliner <mark@kingant.net>
parents: 12056
diff changeset
291 GaimSavedStatusSub *gaim_savedstatus_get_substatus(
12056
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
292 const GaimSavedStatus *saved_status,
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
293 const GaimAccount *account);
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
294
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
295 /**
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
296 * Get the status type of a given substatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
297 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
298 * @param substatus The substatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
299 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
300 * @return The status type.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
301 */
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
302 const GaimStatusType *gaim_savedstatus_substatus_get_type(const GaimSavedStatusSub *substatus);
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
303
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
304 /**
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
305 * Get the message of a given substatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
306 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
307 * @param substatus The substatus.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
308 *
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
309 * @return The message of the substatus, or NULL if this substatus does
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
310 * not have a message.
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
311 */
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
312 const char *gaim_savedstatus_substatus_get_message(const GaimSavedStatusSub *substatus);
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
313
6dc48f991b8d [gaim-migrate @ 14351]
Mark Doliner <mark@kingant.net>
parents: 11724
diff changeset
314 /**
11724
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
315 * Sets the statuses for all your accounts to those specified
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
316 * by the given saved_status. This function calls
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
317 * gaim_savedstatus_activate_for_account() for all your accounts.
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
318 *
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
319 * @param saved_status The status you want to set your accounts to.
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
320 */
12125
3c1bac709234 [gaim-migrate @ 14425]
Mark Doliner <mark@kingant.net>
parents: 12080
diff changeset
321 void gaim_savedstatus_activate(GaimSavedStatus *saved_status);
11724
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
322
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
323 /**
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
324 * Sets the statuses for a given account to those specified
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
325 * by the given saved_status.
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
326 *
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
327 * @param saved_status The status you want to set your accounts to.
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
328 * @param account The account whose statuses you want to change.
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
329 */
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
330 void gaim_savedstatus_activate_for_account(const GaimSavedStatus *saved_status, GaimAccount *account);
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
331
a8ec0a291d14 [gaim-migrate @ 14015]
Mark Doliner <mark@kingant.net>
parents: 11651
diff changeset
332 /**
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
333 * Get the handle for the status subsystem.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
334 *
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
335 * @return the handle to the status subsystem
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
336 */
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12245
diff changeset
337 void *gaim_savedstatuses_get_handle(void);
10418
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
338
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
339 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
340 * Initializes the status subsystem.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
341 */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
342 void gaim_savedstatuses_init(void);
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
343
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
344 /**
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
345 * Uninitializes the status subsystem.
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
346 */
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
347 void gaim_savedstatuses_uninit(void);
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
348
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
349 /*@}*/
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
350
bed2c96bc1fb [gaim-migrate @ 11669]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
351 #endif /* _GAIM_SAVEDSTATUSES_H_ */