Mercurial > pidgin
diff src/savedstatuses.h @ 11651:723487d07aa0
[gaim-migrate @ 13935]
Getting some stuff out of my tree.
I think I mostly just added a "transient" boolean to savedstatuses.
If a savedstatus is transient, it means it was created on the fly
by Gaim when the user set himself to "away." Transient statuses
will hang around for a few days in case the user wants to use it
again, but eventually it'll disappear. They should also not appear
in the saved status editor.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Thu, 13 Oct 2005 01:29:43 +0000 |
| parents | 6feef0a9098a |
| children | a8ec0a291d14 |
line wrap: on
line diff
--- a/src/savedstatuses.h Thu Oct 13 00:53:01 2005 +0000 +++ b/src/savedstatuses.h Thu Oct 13 01:29:43 2005 +0000 @@ -32,6 +32,12 @@ * to the settings of that state. */ +/* + * TODO: Hmm. We should probably just be saving GaimPresences. That's + * something we should look into once the status box gets fleshed + * out more. + */ + typedef struct _GaimSavedStatus GaimSavedStatus; typedef struct _GaimSavedStatusSub GaimSavedStatusSub; @@ -46,8 +52,9 @@ * Create a new saved status. This will add the saved status to the * list of saved statuses and writes the revised list to status.xml. * - * @param title The title of the saved status. This must be unique. - * @param type The type of saved status. + * @param title The title of the saved status. This must be + * unique. + * @param type The type of saved status. * * @return The newly created saved status, or NULL if the title you * used was already taken. @@ -56,6 +63,15 @@ GaimStatusPrimitive type); /** + * Set the type for the given saved status. + * + * @param status The saved status. + * @param type The type of saved status. + */ +void gaim_savedstatus_set_type(GaimSavedStatus *status, + GaimStatusPrimitive type); + +/** * Set the message for the given saved status. * * @param status The saved status. @@ -94,6 +110,25 @@ GaimSavedStatus *gaim_savedstatus_find(const char *title); /** + * Determines if a given saved status is "transient." + * A transient saved status is one that was not + * explicitly added by the user. Transient statuses + * are automatically removed if they are not used + * for a period of time. + * + * A transient saved statuses is automatically + * created by the status box when the user sets himself + * to one of the generic primitive statuses. The reason + * we need to save this status information is so we can + * restore it when Gaim restarts. + * + * @param saved_status The saved status. + * + * @return TRUE if the saved status is transient. + */ +gboolean gaim_savedstatus_is_transient(const GaimSavedStatus *saved_status); + +/** * Return the name of a given saved status. * * @param saved_status The saved status. @@ -121,6 +156,18 @@ const char *gaim_savedstatus_get_message(const GaimSavedStatus *saved_status); /** + * Determine if a given saved status has "substatuses," + * or if it is a simple status (the same for all + * accounts). + * + * @param saved_status The saved status. + * + * @return TRUE if the saved_status has substatuses. + * FALSE otherwise. + */ +gboolean gaim_savedstatus_has_substatuses(const GaimSavedStatus *saved_status); + +/** * Get the handle for the status subsystem. * * @return the handle to the status subsystem
