pidgin: savedstatuses.h Source File

pidgin 2.14.4

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
58 typedef struct _PurpleSavedStatus PurpleSavedStatus;
59typedef struct _PurpleSavedStatusSub PurpleSavedStatusSub;
60
61#include "status.h"
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
67/**************************************************************************/
69/**************************************************************************/
84 PurpleSavedStatus *purple_savedstatus_new(const char *title,
85 PurpleStatusPrimitive type);
86
93 void purple_savedstatus_set_title(PurpleSavedStatus *status,
94 const char *title);
95
102 void purple_savedstatus_set_type(PurpleSavedStatus *status,
103 PurpleStatusPrimitive type);
104
112 void purple_savedstatus_set_message(PurpleSavedStatus *status,
113 const char *message);
114
124 void purple_savedstatus_set_substatus(PurpleSavedStatus *status,
125 const PurpleAccount *account,
126 const PurpleStatusType *type,
127 const char *message);
128
138 void purple_savedstatus_unset_substatus(PurpleSavedStatus *saved_status,
139 const PurpleAccount *account);
140
151gboolean purple_savedstatus_delete(const char *title);
152
161 void purple_savedstatus_delete_by_status(PurpleSavedStatus *saved_status);
162
168GList *purple_savedstatuses_get_all(void);
169
184GList *purple_savedstatuses_get_popular(unsigned int how_many);
185
194 PurpleSavedStatus *purple_savedstatus_get_current(void);
195
203 PurpleSavedStatus *purple_savedstatus_get_default(void);
204
212 PurpleSavedStatus *purple_savedstatus_get_idleaway(void);
213
220gboolean purple_savedstatus_is_idleaway(void);
221
229 void purple_savedstatus_set_idleaway(gboolean idleaway);
230
237 PurpleSavedStatus *purple_savedstatus_get_startup(void);
238
246 PurpleSavedStatus *purple_savedstatus_find(const char *title);
247
256 PurpleSavedStatus *purple_savedstatus_find_by_creation_time(time_t creation_time);
257
268 PurpleSavedStatus *purple_savedstatus_find_transient_by_type_and_message(PurpleStatusPrimitive type, const char *message);
269
287gboolean purple_savedstatus_is_transient(const PurpleSavedStatus *saved_status);
288
299 const char *purple_savedstatus_get_title(const PurpleSavedStatus *saved_status);
300
308 PurpleStatusPrimitive purple_savedstatus_get_type(const PurpleSavedStatus *saved_status);
309
320 const char *purple_savedstatus_get_message(const PurpleSavedStatus *saved_status);
321
337time_t purple_savedstatus_get_creation_time(const PurpleSavedStatus *saved_status);
338
349gboolean purple_savedstatus_has_substatuses(const PurpleSavedStatus *saved_status);
350
361PurpleSavedStatusSub *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
391 void purple_savedstatus_activate(PurpleSavedStatus *saved_status);
392
400 void purple_savedstatus_activate_for_account(const PurpleSavedStatus *saved_status, PurpleAccount *account);
401
407 void *purple_savedstatuses_get_handle(void);
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_ */
purple_savedstatus_get_creation_time
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.
purple_savedstatus_find_by_creation_time
PurpleSavedStatus * purple_savedstatus_find_by_creation_time(time_t creation_time)
Finds a saved status with the specified creation time.
purple_savedstatus_set_message
void purple_savedstatus_set_message(PurpleSavedStatus *status, const char *message)
Set the message for the given saved status.
purple_savedstatus_delete
gboolean purple_savedstatus_delete(const char *title)
Delete a saved status.
purple_savedstatus_get_substatus
PurpleSavedStatusSub * purple_savedstatus_get_substatus(const PurpleSavedStatus *saved_status, const PurpleAccount *account)
Get the substatus for an account in a saved status.
purple_savedstatus_get_idleaway
PurpleSavedStatus * purple_savedstatus_get_idleaway(void)
Returns the saved status that is used when your accounts become idle-away.
PurpleSavedStatus
struct _PurpleSavedStatus PurpleSavedStatus
Saved statuses don't really interact much with the rest of Purple.
Definition: savedstatuses.h:58
purple_savedstatuses_uninit
void purple_savedstatuses_uninit(void)
Uninitializes the status subsystem.
purple_savedstatus_get_type
PurpleStatusPrimitive purple_savedstatus_get_type(const PurpleSavedStatus *saved_status)
Return the type of a given saved status.
purple_savedstatuses_get_popular
GList * purple_savedstatuses_get_popular(unsigned int how_many)
Returns the n most popular saved statuses.
purple_savedstatus_is_idleaway
gboolean purple_savedstatus_is_idleaway(void)
Return TRUE if we are currently idle-away.
purple_savedstatus_unset_substatus
void purple_savedstatus_unset_substatus(PurpleSavedStatus *saved_status, const PurpleAccount *account)
Unset a substatus for an account in a saved status.
purple_savedstatus_set_substatus
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.
purple_savedstatuses_get_all
GList * purple_savedstatuses_get_all(void)
Returns all saved statuses.
purple_savedstatus_get_message
const char * purple_savedstatus_get_message(const PurpleSavedStatus *saved_status)
Return the default message of a given saved status.
purple_savedstatuses_init
void purple_savedstatuses_init(void)
Initializes the status subsystem.
purple_savedstatus_get_current
PurpleSavedStatus * purple_savedstatus_get_current(void)
Returns the currently selected saved status.
purple_savedstatus_find
PurpleSavedStatus * purple_savedstatus_find(const char *title)
Finds a saved status with the specified title.
purple_savedstatus_activate
void purple_savedstatus_activate(PurpleSavedStatus *saved_status)
Sets the statuses for all your accounts to those specified by the given saved_status.
purple_savedstatus_delete_by_status
void purple_savedstatus_delete_by_status(PurpleSavedStatus *saved_status)
Delete a saved status.
purple_savedstatus_set_idleaway
void purple_savedstatus_set_idleaway(gboolean idleaway)
Set whether accounts in Purple are idle-away or not.
purple_savedstatus_activate_for_account
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.
purple_savedstatus_get_title
const char * purple_savedstatus_get_title(const PurpleSavedStatus *saved_status)
Return the name of a given saved status.
purple_savedstatus_find_transient_by_type_and_message
PurpleSavedStatus * purple_savedstatus_find_transient_by_type_and_message(PurpleStatusPrimitive type, const char *message)
Finds a saved status with the specified primitive and message.
purple_savedstatus_new
PurpleSavedStatus * purple_savedstatus_new(const char *title, PurpleStatusPrimitive type)
Create a new saved status.
purple_savedstatus_get_startup
PurpleSavedStatus * purple_savedstatus_get_startup(void)
Returns the status to be used when purple is starting up.
purple_savedstatus_set_title
void purple_savedstatus_set_title(PurpleSavedStatus *status, const char *title)
Set the title for the given saved status.
purple_savedstatus_set_type
void purple_savedstatus_set_type(PurpleSavedStatus *status, PurpleStatusPrimitive type)
Set the type for the given saved status.
purple_savedstatus_get_default
PurpleSavedStatus * purple_savedstatus_get_default(void)
Returns the default saved status that is used when our accounts are not idle-away.
purple_savedstatus_substatus_get_type
const PurpleStatusType * purple_savedstatus_substatus_get_type(const PurpleSavedStatusSub *substatus)
Get the status type of a given substatus.
purple_savedstatus_substatus_get_message
const char * purple_savedstatus_substatus_get_message(const PurpleSavedStatusSub *substatus)
Get the message of a given substatus.
purple_savedstatuses_get_handle
void * purple_savedstatuses_get_handle(void)
Get the handle for the status subsystem.
purple_savedstatus_is_transient
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...
purple_savedstatus_has_substatuses
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.h
Status API.
PurpleStatusType
struct _PurpleStatusType PurpleStatusType
PurpleStatusType's are created by each PRPL.
Definition: status.h:85
PurpleStatusPrimitive
PurpleStatusPrimitive
A primitive defining the basic structure of a status type.
Definition: status.h:118
_PurpleAccount
Structure representing an account.
Definition: account.h:170