changeset 2045:04961c9a5242 trunk

[svn] - document the formatter class
author nenolod
date Mon, 04 Dec 2006 01:37:47 -0800
parents 7d8bb80e3a40
children 456c74b6880a
files ChangeLog doc/libaudacious/tmpl/formatter.sgml libaudacious/formatter.c
diffstat 3 files changed, 72 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 04 01:30:01 2006 -0800
+++ b/ChangeLog	Mon Dec 04 01:37:47 2006 -0800
@@ -1,3 +1,15 @@
+2006-12-04 09:30:01 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [3091]
+  - bye bye dirbrowser
+  
+  trunk/doc/libaudacious/libaudacious-main.sgml |    1 
+  trunk/doc/libaudacious/tmpl/dirbrowser.sgml   |   31 --
+  trunk/libaudacious/Makefile                   |    3 
+  trunk/libaudacious/dirbrowser.c               |  400 --------------------------
+  trunk/libaudacious/dirbrowser.h               |   34 --
+  5 files changed, 1 insertion(+), 468 deletions(-)
+
+
 2006-12-04 09:26:08 +0000  Daniel Bradshaw <nazca@atheme.org>
   revision [3089]
   Seek controls (left and right) now seek 5 seconds like the main window
--- a/doc/libaudacious/tmpl/formatter.sgml	Mon Dec 04 01:30:01 2006 -0800
+++ b/doc/libaudacious/tmpl/formatter.sgml	Mon Dec 04 01:37:47 2006 -0800
@@ -1,8 +1,8 @@
 <!-- ##### SECTION Title ##### -->
-formatter
+Formatter
 
 <!-- ##### SECTION Short_Description ##### -->
-
+A simple id->substitution class.
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
--- a/libaudacious/formatter.c	Mon Dec 04 01:30:01 2006 -0800
+++ b/libaudacious/formatter.c	Mon Dec 04 01:37:47 2006 -0800
@@ -1,3 +1,26 @@
+/*  Audacious
+ *  Copyright (C) 2005-2007  Audacious team
+ *
+ *  XMMS - Cross-platform multimedia player
+ *  Copyright (C) 1998-2003  Peter Alm, Mikael Alm, Olle Hallnas,
+ *                           Thomas Nilsson and 4Front Technologies
+ *  Copyright (C) 1999-2003  Haavard Kvaalen
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
@@ -6,7 +29,11 @@
 #include <string.h>
 #include "formatter.h"
 
-
+/**
+ * xmms_formatter_new:
+ *
+ * Factory for #Formatter objects.
+ **/
 Formatter *
 xmms_formatter_new(void)
 {
@@ -16,6 +43,12 @@
     return formatter;
 }
 
+/**
+ * xmms_formatter_destroy:
+ * @formatter: A #Formatter object to destroy.
+ *
+ * Destroys #Formatter objects.
+ **/
 void
 xmms_formatter_destroy(Formatter * formatter)
 {
@@ -27,6 +60,14 @@
     g_free(formatter);
 }
 
+/**
+ * xmms_formatter_associate:
+ * @formatter: A #Formatter object to use.
+ * @id: The character to use for replacement.
+ * @value: The value to replace with.
+ *
+ * Adds a id->replacement set to the formatter's stack.
+ **/
 void
 xmms_formatter_associate(Formatter * formatter, guchar id, char *value)
 {
@@ -34,6 +75,13 @@
     formatter->values[id] = g_strdup(value);
 }
 
+/**
+ * xmms_formatter_dissociate:
+ * @formatter: A #Formatter object to use.
+ * @id: The id to remove the id->replacement mapping for.
+ *
+ * Removes an id->replacement mapping from the formatter's stack.
+ **/
 void
 xmms_formatter_dissociate(Formatter * formatter, guchar id)
 {
@@ -42,6 +90,15 @@
     formatter->values[id] = 0;
 }
 
+/**
+ * xmms_formatter_format:
+ * @formatter: A #Formatter object to use.
+ * @format: A string to format.
+ *
+ * Performs id->replacement substitution on a string.
+ *
+ * Returns: The formatted string.
+ **/
 gchar *
 xmms_formatter_format(Formatter * formatter, char *format)
 {