#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;
};
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;
};
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 */
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 */
}
}
+/** @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;
};
#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
};
#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 }
#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;
"""Base class for DisOrder exceptions."""
class _splitError(Error):
+ """Error parsing a quoted string list"""
# _split failed
def __init__(self, value):
self.value = value
/* 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;
};
# 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;
};
;
}
+/** @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;
};