diff src/savedstatuses.h @ 12056:6dc48f991b8d

[gaim-migrate @ 14351] Part of sf patch #1354886, from Sadrul Habib Chowdhury "Allow custom-saved statuses" I'm still working on the UI parts committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 12 Nov 2005 22:33:41 +0000
parents a8ec0a291d14
children 3b52d94437f3
line wrap: on
line diff
--- a/src/savedstatuses.h	Sat Nov 12 20:19:39 2005 +0000
+++ b/src/savedstatuses.h	Sat Nov 12 22:33:41 2005 +0000
@@ -63,6 +63,15 @@
 									  GaimStatusPrimitive type);
 
 /**
+ * Set the title for the given saved status.
+ *
+ * @param status  The saved status.
+ * @param title   The title of the saved status.
+ */
+void gaim_savedstatus_set_title(GaimSavedStatus *status,
+								const char *title);
+
+/**
  * Set the type for the given saved status.
  *
  * @param status  The saved status.
@@ -82,6 +91,32 @@
 								  const char *message);
 
 /**
+ * Set a substatus for an account in a saved status.
+ *
+ * @param status	The saved status.
+ * @param account	The account.
+ * @param type		The status type for the account in the staved
+ *                  status.
+ * @param message	The message for the account in the substatus.
+ */
+void gaim_savedstatus_set_substatus_for_account(GaimSavedStatus *status,
+												const GaimAccount *account,
+												const GaimStatusType *type,
+												const char *message);
+
+/**
+ * Unset a substatus for an account in a saved status.  This clears
+ * the previosly set substatus for the GaimSavedStatus.  If this
+ * saved status is activated then this account will use the default
+ * status type and message.
+ *
+ * @param status	The saved status.
+ * @param account	The account.
+*/
+void gaim_savedstatus_unset_substatus_for_account(GaimSavedStatus *saved_status,
+												  const GaimAccount *account);
+
+/**
  * Delete a saved status.  This removes the saved status from the list
  * of saved statuses, and writes the revised list to status.xml.
  *
@@ -138,7 +173,7 @@
 const char *gaim_savedstatus_get_title(const GaimSavedStatus *saved_status);
 
 /**
- * Return the name of a given saved status.
+ * Return the type of a given saved status.
  *
  * @param saved_status The saved status.
  *
@@ -147,7 +182,7 @@
 GaimStatusPrimitive gaim_savedstatus_get_type(const GaimSavedStatus *saved_status);
 
 /**
- * Return the name of a given saved status.
+ * Return the default message of a given saved status.
  *
  * @param saved_status The saved status.
  *
@@ -168,6 +203,39 @@
 gboolean gaim_savedstatus_has_substatuses(const GaimSavedStatus *saved_status);
 
 /**
+ * Get the substatus for an account in a saved status.
+ *
+ * @param status  The saved status.
+ * @param account The account.
+ *
+ * @return The GaimSavedStatusSub for the account, or NULL if
+ *         the given account does not have a substatus that
+ *         differs from the default status of this GaimSavedStatus.
+ */
+GaimSavedStatusSub *gaim_savedstatus_get_substatus_for_account(
+									const GaimSavedStatus *saved_status,
+									const GaimAccount *account);
+
+/**
+ * Get the status type of a given substatus.
+ *
+ * @param substatus The substatus.
+ *
+ * @return The status type.
+ */
+const GaimStatusType *gaim_savedstatus_substatus_get_type(const GaimSavedStatusSub *substatus);
+
+/**
+ * Get the message of a given substatus.
+ *
+ * @param substatus The substatus.
+ *
+ * @return The message of the substatus, or NULL if this substatus does
+ *         not have a message.
+ */
+const char *gaim_savedstatus_substatus_get_message(const GaimSavedStatusSub *substatus);
+
+/**
  * Sets the statuses for all your accounts to those specified
  * by the given saved_status.  This function calls
  * gaim_savedstatus_activate_for_account() for all your accounts.