pidgin 2.14.14dev
Loading...
Searching...
No Matches
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
58typedef struct _PurpleSavedStatus PurpleSavedStatus;
59typedef struct _PurpleSavedStatusSub PurpleSavedStatusSub;
60
61#include "status.h"
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
67/**************************************************************************/
69/**************************************************************************/
86
94 const char *title);
95
104
113 const char *message);
114
125 const PurpleAccount *account,
126 const PurpleStatusType *type,
127 const char *message);
128
139 const PurpleAccount *account);
140
151gboolean purple_savedstatus_delete(const char *title);
152
162
169
184GList *purple_savedstatuses_get_popular(unsigned int how_many);
185
195
204
213
221
229void purple_savedstatus_set_idleaway(gboolean idleaway);
230
238
247
257
269
288
299const char *purple_savedstatus_get_title(const PurpleSavedStatus *saved_status);
300
309
320const char *purple_savedstatus_get_message(const PurpleSavedStatus *saved_status);
321
338
350
362 const PurpleSavedStatus *saved_status,
363 const PurpleAccount *account);
364
372const PurpleStatusType *purple_savedstatus_substatus_get_type(const PurpleSavedStatusSub *substatus);
373
382const char *purple_savedstatus_substatus_get_message(const PurpleSavedStatusSub *substatus);
383
392
401
408
413
418
421#ifdef __cplusplus
422}
423#endif
424
425#endif /* _PURPLE_SAVEDSTATUSES_H_ */
time_t purple_savedstatus_get_creation_time(const PurpleSavedStatus *saved_status)
Return the time in seconds-since-the-epoch when this saved status was created.
PurpleSavedStatus * purple_savedstatus_find_by_creation_time(time_t creation_time)
Finds a saved status with the specified creation time.
void purple_savedstatus_set_message(PurpleSavedStatus *status, const char *message)
Set the message for the given saved status.
gboolean purple_savedstatus_delete(const char *title)
Delete a saved status.
PurpleSavedStatusSub * purple_savedstatus_get_substatus(const PurpleSavedStatus *saved_status, const PurpleAccount *account)
Get the substatus for an account in a saved status.
PurpleSavedStatus * purple_savedstatus_get_idleaway(void)
Returns the saved status that is used when your accounts become idle-away.
struct _PurpleSavedStatus PurpleSavedStatus
Saved statuses don't really interact much with the rest of Purple.
void purple_savedstatuses_uninit(void)
Uninitializes the status subsystem.
PurpleStatusPrimitive purple_savedstatus_get_type(const PurpleSavedStatus *saved_status)
Return the type of a given saved status.
GList * purple_savedstatuses_get_popular(unsigned int how_many)
Returns the n most popular saved statuses.
gboolean purple_savedstatus_is_idleaway(void)
Return TRUE if we are currently idle-away.
void purple_savedstatus_unset_substatus(PurpleSavedStatus *saved_status, const PurpleAccount *account)
Unset a substatus for an account in a saved status.
void purple_savedstatus_set_substatus(PurpleSavedStatus *status, const PurpleAccount *account, const PurpleStatusType *type, const char *message)
Set a substatus for an account in a saved status.
GList * purple_savedstatuses_get_all(void)
Returns all saved statuses.
const char * purple_savedstatus_get_message(const PurpleSavedStatus *saved_status)
Return the default message of a given saved status.
void purple_savedstatuses_init(void)
Initializes the status subsystem.
PurpleSavedStatus * purple_savedstatus_get_current(void)
Returns the currently selected saved status.
PurpleSavedStatus * purple_savedstatus_find(const char *title)
Finds a saved status with the specified title.
void purple_savedstatus_activate(PurpleSavedStatus *saved_status)
Sets the statuses for all your accounts to those specified by the given saved_status.
void purple_savedstatus_delete_by_status(PurpleSavedStatus *saved_status)
Delete a saved status.
void purple_savedstatus_set_idleaway(gboolean idleaway)
Set whether accounts in Purple are idle-away or not.
void purple_savedstatus_activate_for_account(const PurpleSavedStatus *saved_status, PurpleAccount *account)
Sets the statuses for a given account to those specified by the given saved_status.
const char * purple_savedstatus_get_title(const PurpleSavedStatus *saved_status)
Return the name of a given saved status.
PurpleSavedStatus * purple_savedstatus_find_transient_by_type_and_message(PurpleStatusPrimitive type, const char *message)
Finds a saved status with the specified primitive and message.
PurpleSavedStatus * purple_savedstatus_new(const char *title, PurpleStatusPrimitive type)
Create a new saved status.
PurpleSavedStatus * purple_savedstatus_get_startup(void)
Returns the status to be used when purple is starting up.
void purple_savedstatus_set_title(PurpleSavedStatus *status, const char *title)
Set the title for the given saved status.
void purple_savedstatus_set_type(PurpleSavedStatus *status, PurpleStatusPrimitive type)
Set the type for the given saved status.
PurpleSavedStatus * purple_savedstatus_get_default(void)
Returns the default saved status that is used when our accounts are not idle-away.
const PurpleStatusType * purple_savedstatus_substatus_get_type(const PurpleSavedStatusSub *substatus)
Get the status type of a given substatus.
const char * purple_savedstatus_substatus_get_message(const PurpleSavedStatusSub *substatus)
Get the message of a given substatus.
void * purple_savedstatuses_get_handle(void)
Get the handle for the status subsystem.
gboolean purple_savedstatus_is_transient(const PurpleSavedStatus *saved_status)
Determines if a given saved status is "transient." A transient saved status is one that was not expli...
gboolean purple_savedstatus_has_substatuses(const PurpleSavedStatus *saved_status)
Determine if a given saved status has "substatuses," or if it is a simple status (the same for all ac...
Status API.
struct _PurpleStatusType PurpleStatusType
PurpleStatusType's are created by each PRPL.
Definition status.h:85
PurpleStatusPrimitive
A primitive defining the basic structure of a status type.
Definition status.h:118
Structure representing an account.
Definition account.h:170