diff libpurple/util.h @ 22000:af0426c34c27

Utility functions to set and format song information. Closes #4398.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 05 Jan 2008 11:08:48 +0000
parents 39b078ac8a81
children 02eda4bd2b22 dc47e908965f
line wrap: on
line diff
--- a/libpurple/util.h	Sat Jan 05 10:45:29 2008 +0000
+++ b/libpurple/util.h	Sat Jan 05 11:08:48 2008 +0000
@@ -85,6 +85,31 @@
  */
 void purple_menu_action_free(PurpleMenuAction *act);
 
+/**
+ * Set the appropriate presence values for the currently playing song.
+ *
+ * @param title     The title of the song, @c NULL to unset the value.
+ * @param artist    The artist of the song, can be @c NULL.
+ * @param album     The album of the song, can be @c NULL.
+ * @since 2.4.0
+ */
+void purple_util_set_current_song(const char *title, const char *artist,
+		const char *album);
+
+/**
+ * Format song information.
+ *
+ * @param title     The title of the song, @c NULL to unset the value.
+ * @param artist    The artist of the song, can be @c NULL.
+ * @param album     The album of the song, can be @c NULL.
+ * @param unused    Currently unused, must be @c NULL.
+ *
+ * @return   The formatted string. The caller must #g_free the returned string.
+ * @since 2.4.0
+ */
+char * purple_util_format_song_info(const char *title, const char *artist,
+		const char *album, gpointer unused);
+
 /**************************************************************************/
 /** @name Utility Subsystem                                               */
 /**************************************************************************/