savedstatuses.h
Go to the documentation of this file.
1 
7 /* purple
8  *
9  * Purple is the legal property of its developers, whose names are too numerous
10  * to list here. Please refer to the COPYRIGHT file distributed with this
11  * source distribution.
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26  */
27 #ifndef _PURPLE_SAVEDSTATUSES_H_
28 #define _PURPLE_SAVEDSTATUSES_H_
29 
52 /*
53  * TODO: Hmm. We should probably just be saving PurplePresences. That's
54  * something we should look into once the status box gets fleshed
55  * out more.
56  */
57 
58 typedef struct _PurpleSavedStatus PurpleSavedStatus;
59 typedef struct _PurpleSavedStatusSub PurpleSavedStatusSub;
60 
61 #include "status.h"
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
67 /**************************************************************************/
69 /**************************************************************************/
84 PurpleSavedStatus *purple_savedstatus_new(const char *title,
86 
94  const char *title);
95 
103  PurpleStatusPrimitive type);
104 
113  const char *message);
114 
125  const PurpleAccount *account,
126  const PurpleStatusType *type,
127  const char *message);
128 
139  const PurpleAccount *account);
140 
151 gboolean purple_savedstatus_delete(const char *title);
152 
162 
168 GList *purple_savedstatuses_get_all(void);
169 
184 GList *purple_savedstatuses_get_popular(unsigned int how_many);
185 
195 
204 
213 
220 gboolean purple_savedstatus_is_idleaway(void);
221 
229 void purple_savedstatus_set_idleaway(gboolean idleaway);
230 
238 
246 PurpleSavedStatus *purple_savedstatus_find(const char *title);
247 
257 
269 
287 gboolean purple_savedstatus_is_transient(const PurpleSavedStatus *saved_status);
288 
299 const char *purple_savedstatus_get_title(const PurpleSavedStatus *saved_status);
300 
309 
320 const char *purple_savedstatus_get_message(const PurpleSavedStatus *saved_status);
321 
337 time_t purple_savedstatus_get_creation_time(const PurpleSavedStatus *saved_status);
338 
349 gboolean purple_savedstatus_has_substatuses(const PurpleSavedStatus *saved_status);
350 
361 PurpleSavedStatusSub *purple_savedstatus_get_substatus(
362  const PurpleSavedStatus *saved_status,
363  const PurpleAccount *account);
364 
372 const PurpleStatusType *purple_savedstatus_substatus_get_type(const PurpleSavedStatusSub *substatus);
373 
382 const char *purple_savedstatus_substatus_get_message(const PurpleSavedStatusSub *substatus);
383 
392 
401 
408 
412 void purple_savedstatuses_init(void);
413 
417 void purple_savedstatuses_uninit(void);
418 
421 #ifdef __cplusplus
422 }
423 #endif
424 
425 #endif /* _PURPLE_SAVEDSTATUSES_H_ */