doxygen: add some missing docstrings.
authorRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 7 Aug 2011 15:49:06 +0000 (16:49 +0100)
committerRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 7 Aug 2011 15:51:54 +0000 (16:51 +0100)
cgi/options.c
clients/disorder.c
disobedience/properties.c
disobedience/queue-generic.c
lib/resample.h
lib/signame.c
lib/trackdb.c
python/disorder.py.in
server/disorderd.c
server/plugin.c
server/rescan.c

index 2403833..521ce35 100644 (file)
 
 #include "disorder-cgi.h"
 
+/** @brief State for parsing an options file */
 struct read_options_state {
+  /** @brief Filename */
   const char *name;
+
+  /** @brief Line number */
   int line;
 };
 
index 6d0a29d..64694ef 100644 (file)
@@ -504,9 +504,15 @@ static void cf_setup_guest(char **argv) {
     exit(EXIT_FAILURE);
 }
 
+/** @brief A scheduled event read from the server */
 struct scheduled_event {
+  /** @brief When event should occur */
   time_t when;
+
+  /** @brief Details of action */
   struct kvp *actiondata;
+
+  /** @brief Event ID */
   char *id;
 };
 
index 6600cf9..fb39ea4 100644 (file)
@@ -61,23 +61,26 @@ struct prefdata {
   GtkWidget *widget;
 };
 
-/* The type of a preference is the collection of callbacks needed to get,
- * display and set it */
+/** @brief Type of a track preference
+ *
+ * The type of a preference is the collection of callbacks needed to get,
+ * display and set it.
+ */
 struct preftype {
+  /** @brief Kick off the request to fetch the pref from the server. */
   void (*kickoff)(struct prefdata *f);
-  /* Kick off the request to fetch the pref from the server. */
 
+  /** @brief Called when the value comes back in; creates the widget. */
   void (*completed)(struct prefdata *f);
-  /* Called when the value comes back in; creates the widget. */
 
+  /** @brief Get the edited value from the widget. */
   const char *(*get_edited)(struct prefdata *f);
-  /* Get the edited value from the widget. */
 
   /** @brief Update the edited value */
   void (*set_edited)(struct prefdata *f, const char *value);
 
+  /** @brief Set the new value and (if necessary) arrange for our display to update. */
   void (*set)(struct prefdata *f, const char *value);
-  /* Set the new value and (if necessary) arrange for our display to update. */
 };
 
 /* A namepart pref */
@@ -107,7 +110,7 @@ static const struct preftype preftype_boolean = {
   set_boolean
 };
 
-/* @brief The known prefs for each track */
+/** @brief The known prefs for each track */
 static const struct pref {
   const char *label;                    /**< @brief user-level description */
   const char *part;                     /**< @brief protocol-level tag */
index a4cb793..2c0ac19 100644 (file)
@@ -227,6 +227,10 @@ void ql_update_list_store(struct queuelike *ql) {
   }
 }
 
+/** @brief Old and new queue data
+ *
+ * Used when updating a @ref queuelike with new data from the server.
+ */
 struct newqueue_data {
   struct queue_entry *old, *new;
 };
index e99aaeb..a789325 100644 (file)
 
 #include "byte-order.h"
 
+/** @brief An audio resampler */
 struct resampler {
-  int input_bits, input_channels, input_rate, input_signed, input_endian;
-  int output_bits, output_channels, output_rate, output_signed, output_endian;
+  /** @brief Bits/sample in input */
+  int input_bits;
+
+  /** @brief Number of input channels */
+  int input_channels;
+
+  /** @brief Frames/second in input */
+  int input_rate;
+
+  /** @brief Whether input samples are signed or unsigned */
+  int input_signed;
+
+  /** @brief Input endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE) */
+  int input_endian;
+
+  /** @brief Bits/sample in output */
+  int output_bits;
+
+  /** @brief Number of output channels */
+  int output_channels;
+
+  /** @brief Frames/second in output */
+  int output_rate;
+
+  /** @brief Whether output samples are signed or unsigned */
+  int output_signed;
+
+  /** @brief Output endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE) */
+  int output_endian;
+
+  /** @brief  */
   int input_bytes_per_sample;
+
+  /** @brief  */
   int input_bytes_per_frame;
 #if HAVE_SAMPLERATE_H
+  /** @brief Libsamplerate handle */
   SRC_STATE *state;
 #endif
 };
index 27f9509..316fe6a 100644 (file)
 #include "table.h"
 #include "signame.h"
 
+/** @brief Mapping between signal names and numbers */
 static const struct sigtable {
+  /** @brief Signal number */
   int signal;
+
+  /* @brief Signal name ("SIGwhatever") */
   const char *name;
 } signals[] = {
 #define S(sig) { sig, #sig }
index 4afd925..7be53c1 100644 (file)
@@ -1389,6 +1389,7 @@ int trackdb_obsolete(const char *track, DB_TXN *tid) {
 #define H(name) { #name, offsetof(DB_HASH_STAT, name) }
 #define B(name) { #name, offsetof(DB_BTREE_STAT, name) }
 
+/** @brief Table of libdb stats to return */
 static const struct statinfo {
   const char *name;
   size_t offset;
index 8584c85..8a758c9 100644 (file)
@@ -87,6 +87,7 @@ class Error(Exception):
   """Base class for DisOrder exceptions."""
 
 class _splitError(Error):
+  """Error parsing a quoted string list"""
   # _split failed
   def __init__(self, value):
     self.value = value
index 2000a2f..3e1ab44 100644 (file)
@@ -80,8 +80,12 @@ static int handle_sigterm(ev_source attribute((unused)) *ev_,
 
 /* periodic actions --------------------------------------------------------- */
 
+/** @brief A job executed periodically by the server */
 struct periodic_data {
+  /** @brief Callback to process job */
   void (*callback)(ev_source *);
+
+  /** @brief Period of job in seconds */
   int period;
 };
 
index 7afbde9..013aa94 100644 (file)
 # define SOSUFFIX ".so"
 #endif
 
+/** @brief A loaded plugin */
 struct plugin {
+  /** @brief Next plugin */
   struct plugin *next;
+
+  /** @brief Handle returned from dlopen() */
   void *dlhandle;
+
+  /** @brief Plugin name */
   const char *name;
 };
 
index 7cb24b6..71b998a 100644 (file)
@@ -164,14 +164,33 @@ done:
       ;
 }
 
+/** @brief State for the recheck phase of the rescan */
 struct recheck_state {
+  /** @brief Collection being rechecked */
   const struct collection *c;
-  long nobsolete, nnocollection, nlength;
+
+  /** @brief Number of tracks obsoleted */
+  long nobsolete;
+
+  /** @brief Number of tracks belonging to no collection */
+  long nnocollection;
+
+  /** @brief Number of lengths computed */
+  long nlength;
+
+  /** @brief Linked list of tracks to recheck */
   struct recheck_track *tracks;
 };
 
+/** @brief A track to recheck
+ *
+ * A node in a linked list.
+ */
 struct recheck_track {
+  /** @brief Next track */
   struct recheck_track *next;
+
+  /** @brief Track */
   const char *track;
 };