mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-18 18:05:20 -04:00
more doxygen stuff
This commit is contained in:
parent
71ec35efd3
commit
2801956df0
16
Doxyfile
16
Doxyfile
@ -169,7 +169,7 @@ DISTRIBUTE_GROUP_DOC = NO
|
|||||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
|
||||||
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
# Doxygen uses this value to replace tabs by spaces in code fragments.
|
||||||
|
|
||||||
TAB_SIZE = 4
|
TAB_SIZE = 8
|
||||||
|
|
||||||
# This tag can be used to specify a number of aliases that acts
|
# This tag can be used to specify a number of aliases that acts
|
||||||
# as commands in the documentation. An alias has the form "name=value".
|
# as commands in the documentation. An alias has the form "name=value".
|
||||||
@ -221,7 +221,7 @@ EXTRACT_PRIVATE = NO
|
|||||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||||
# will be included in the documentation.
|
# will be included in the documentation.
|
||||||
|
|
||||||
EXTRACT_STATIC = NO
|
EXTRACT_STATIC = YES
|
||||||
|
|
||||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||||
# defined locally in source files will be included in the documentation.
|
# defined locally in source files will be included in the documentation.
|
||||||
@ -425,7 +425,7 @@ INPUT = src
|
|||||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
|
||||||
# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
|
# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
|
||||||
|
|
||||||
FILE_PATTERNS = *.c *.h
|
FILE_PATTERNS =
|
||||||
|
|
||||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||||
# should be searched for input files as well. Possible values are YES and NO.
|
# should be searched for input files as well. Possible values are YES and NO.
|
||||||
@ -448,7 +448,7 @@ EXCLUDE_SYMLINKS = NO
|
|||||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||||
# certain files from those directories.
|
# certain files from those directories.
|
||||||
|
|
||||||
EXCLUDE_PATTERNS =
|
EXCLUDE_PATTERNS = mDNS* redblack*
|
||||||
|
|
||||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||||
# directories that contain example code fragments that are included (see
|
# directories that contain example code fragments that are included (see
|
||||||
@ -505,7 +505,7 @@ SOURCE_BROWSER = YES
|
|||||||
# Setting the INLINE_SOURCES tag to YES will include the body
|
# Setting the INLINE_SOURCES tag to YES will include the body
|
||||||
# of functions and classes directly in the documentation.
|
# of functions and classes directly in the documentation.
|
||||||
|
|
||||||
INLINE_SOURCES = NO
|
INLINE_SOURCES = YES
|
||||||
|
|
||||||
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
|
||||||
# doxygen to hide any special comment blocks from generated source code
|
# doxygen to hide any special comment blocks from generated source code
|
||||||
@ -1022,7 +1022,7 @@ HIDE_UNDOC_RELATIONS = YES
|
|||||||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||||
# have no effect if this option is set to NO (the default)
|
# have no effect if this option is set to NO (the default)
|
||||||
|
|
||||||
HAVE_DOT = NO
|
HAVE_DOT = YES
|
||||||
|
|
||||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||||
# will generate a graph for each documented class showing the direct and
|
# will generate a graph for each documented class showing the direct and
|
||||||
@ -1054,7 +1054,7 @@ TEMPLATE_RELATIONS = NO
|
|||||||
# file showing the direct and indirect include dependencies of the file with
|
# file showing the direct and indirect include dependencies of the file with
|
||||||
# other documented files.
|
# other documented files.
|
||||||
|
|
||||||
INCLUDE_GRAPH = YES
|
INCLUDE_GRAPH = NO
|
||||||
|
|
||||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
|
||||||
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
|
||||||
@ -1069,7 +1069,7 @@ INCLUDED_BY_GRAPH = YES
|
|||||||
# So in most cases it will be better to enable call graphs for selected
|
# So in most cases it will be better to enable call graphs for selected
|
||||||
# functions only using the \callgraph command.
|
# functions only using the \callgraph command.
|
||||||
|
|
||||||
CALL_GRAPH = NO
|
CALL_GRAPH = YES
|
||||||
|
|
||||||
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
|
||||||
# will graphical hierarchy of all classes instead of a textual one.
|
# will graphical hierarchy of all classes instead of a textual one.
|
||||||
|
63
src/daapd.h
63
src/daapd.h
@ -19,38 +19,51 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file daapd.h
|
||||||
|
*
|
||||||
|
* header file for main.c. Why it isn't main.h, I don't know.
|
||||||
|
* In fact...
|
||||||
|
*
|
||||||
|
* \todo make daapd.h into main.h
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _DAAPD_H_
|
#ifndef _DAAPD_H_
|
||||||
#define _DAAPD_H_
|
#define _DAAPD_H_
|
||||||
|
|
||||||
|
/** Simple struct for holding stat info.
|
||||||
|
* \todo wire up the tag_stats#bytes_served stuff into r_write() in restart.c
|
||||||
|
*/
|
||||||
typedef struct tag_stats {
|
typedef struct tag_stats {
|
||||||
time_t start_time;
|
time_t start_time; /**< When the server was started */
|
||||||
int songs_served;
|
int songs_served; /**< How many songs have been served */
|
||||||
|
|
||||||
unsigned int gb_served;
|
unsigned int gb_served; /**< How many gigs of data have been served (unused) */
|
||||||
unsigned int bytes_served;
|
unsigned int bytes_served; /**< How many bytes of data served (unused) */
|
||||||
} STATS;
|
} STATS;
|
||||||
|
|
||||||
|
/** Global config struct */
|
||||||
typedef struct tag_config {
|
typedef struct tag_config {
|
||||||
int use_mdns;
|
int use_mdns; /**< Should we do rendezvous advertisements? */
|
||||||
int stop;
|
int stop; /**< Time to exit? */
|
||||||
int reload;
|
int reload; /**< Time to reload and/or rescan the database? */
|
||||||
char *configfile;
|
char *configfile; /**< path to config file */
|
||||||
char *web_root;
|
char *web_root; /**< path to the directory containing the admin-root files */
|
||||||
int port;
|
int port; /**< port to listen on */
|
||||||
int rescan_interval;
|
int rescan_interval; /**< How often to do a background rescan of the file system */
|
||||||
int always_scan; /* 0 to minimize disk usage (embedded devices) - not in config */
|
int always_scan; /**< 0 to minimize disk usage (embedded devices) - not in config */
|
||||||
int process_m3u;
|
int process_m3u; /**< Should we process m3u files? */
|
||||||
char *adminpassword;
|
char *adminpassword; /**< Password to web management pages */
|
||||||
char *readpassword;
|
char *readpassword; /**< iTunes password */
|
||||||
char *mp3dir;
|
char *mp3dir; /**< root directory of the mp3 files */
|
||||||
char *servername;
|
char *servername; /**< Name advertised via rendezvous */
|
||||||
char *playlist;
|
char *playlist; /**< Path to the playlist file */
|
||||||
char *runas;
|
char *runas; /**< Who to drop privs to (if run as root) */
|
||||||
char *dbdir;
|
char *dbdir; /**< Where to put the db file */
|
||||||
char *extensions;
|
char *extensions; /**< What music file extentions to process */
|
||||||
char *artfilename;
|
char *artfilename; /**< What filename to merge coverart with */
|
||||||
char *logfile;
|
char *logfile; /**< What file to use as a logfile */
|
||||||
STATS stats;
|
STATS stats; /**< Stats structure (see above) */
|
||||||
} CONFIG;
|
} CONFIG;
|
||||||
|
|
||||||
extern CONFIG config;
|
extern CONFIG config;
|
||||||
|
20
src/err.c
20
src/err.c
@ -24,8 +24,8 @@
|
|||||||
* Error handling, logging, and memory leak checking.
|
* Error handling, logging, and memory leak checking.
|
||||||
*
|
*
|
||||||
* Most of these functions should not be used directly. For the most
|
* Most of these functions should not be used directly. For the most
|
||||||
* part, they are hidden in macros like DPRINTF and MEMNOTIFY. The
|
* part, they are hidden in macros like #DPRINTF and #MEMNOTIFY. The
|
||||||
* only function here that is really directly useable is log_setdest
|
* only function here that is really directly useable is log_setdest()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@ -83,13 +83,11 @@ static int err_unlock_mutex(void);
|
|||||||
/**
|
/**
|
||||||
* Write a printf-style formatted message to the log destination.
|
* Write a printf-style formatted message to the log destination.
|
||||||
* This can be stderr, syslog, or a logfile, as determined by
|
* This can be stderr, syslog, or a logfile, as determined by
|
||||||
* log_setdest. Note that this function should not be directly
|
* log_setdest(). Note that this function should not be directly
|
||||||
* used, rather it should be used via the DPRINTF macro.
|
* used, rather it should be used via the #DPRINTF macro.
|
||||||
*
|
*
|
||||||
* \param level Level at which to log \ref log_levels
|
* \param level Level at which to log \ref log_levels
|
||||||
* \param fmt printf-style
|
* \param fmt printf-style
|
||||||
*
|
|
||||||
* \relatesalso log_setdest
|
|
||||||
*/
|
*/
|
||||||
void log_err(int level, char *fmt, ...)
|
void log_err(int level, char *fmt, ...)
|
||||||
{
|
{
|
||||||
@ -139,9 +137,7 @@ void log_err(int level, char *fmt, ...)
|
|||||||
*
|
*
|
||||||
* \param app appname (used only for syslog destination)
|
* \param app appname (used only for syslog destination)
|
||||||
* \param destination where to log to \ref log_dests "as defined in err.h"
|
* \param destination where to log to \ref log_dests "as defined in err.h"
|
||||||
*
|
*/
|
||||||
* \relatesalso log_err
|
|
||||||
****************************************************/
|
|
||||||
void log_setdest(char *app, int destination) {
|
void log_setdest(char *app, int destination) {
|
||||||
if(err_logdestination == destination)
|
if(err_logdestination == destination)
|
||||||
return;
|
return;
|
||||||
@ -212,10 +208,10 @@ int err_unlock_mutex(void) {
|
|||||||
* Let the leak detector know about a chunk of memory
|
* Let the leak detector know about a chunk of memory
|
||||||
* that needs to be freed, but came from an external library.
|
* that needs to be freed, but came from an external library.
|
||||||
* Example: gdbm functions. Note that this should only
|
* Example: gdbm functions. Note that this should only
|
||||||
* be called via the MEMNOTIFY macro.
|
* be called via the #MEMNOTIFY macro.
|
||||||
*
|
*
|
||||||
* \param file filled in from the MEMNOTIFY macro with __FILE__
|
* \param file filled in from the #MEMNOTIFY macro with __FILE__
|
||||||
* \param line filled in from the MEMNOTIFY macro with __LINE__
|
* \param line filled in from the #MEMNOTIFY macro with __LINE__
|
||||||
* \param ptr ptr to block of memory which must be freed
|
* \param ptr ptr to block of memory which must be freed
|
||||||
*/
|
*/
|
||||||
void err_notify(char *file, int line, void *ptr) {
|
void err_notify(char *file, int line, void *ptr) {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
* \todo Refactor daap_handler()
|
* \todo Refactor daap_handler()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* \mainpage mt-daapd
|
/** \mainpage mt-daapd
|
||||||
* \section about_section About
|
* \section about_section About
|
||||||
*
|
*
|
||||||
* This is mt-daapd, an attempt to create an iTunes server for
|
* This is mt-daapd, an attempt to create an iTunes server for
|
||||||
@ -105,7 +105,8 @@
|
|||||||
# define SIGCLD SIGCHLD
|
# define SIGCLD SIGCHLD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAIN_SLEEP_INTERVAL 2 /**< seconds to sleep before checking for shutdown/reload */
|
/** Seconds to sleep before checking for a shutdown or reload */
|
||||||
|
#define MAIN_SLEEP_INTERVAL 2
|
||||||
/*
|
/*
|
||||||
* Globals
|
* Globals
|
||||||
*/
|
*/
|
||||||
@ -119,6 +120,8 @@ static void write_pid_file(void);
|
|||||||
static void usage(char *program);
|
static void usage(char *program);
|
||||||
static void *signal_handler(void *arg);
|
static void *signal_handler(void *arg);
|
||||||
static int start_signal_handler(void);
|
static int start_signal_handler(void);
|
||||||
|
static void daap_handler(WS_CONNINFO *pwsc);
|
||||||
|
static int daap_auth(char *username, char *password);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles authentication for the daap server. This isn't the
|
* Handles authentication for the daap server. This isn't the
|
||||||
@ -152,6 +155,8 @@ int daap_auth(char *username, char *password) {
|
|||||||
* into multiple functions, and perhaps moved into daap.c
|
* into multiple functions, and perhaps moved into daap.c
|
||||||
*
|
*
|
||||||
* \param pwsc Webserver connection info, passed from the webserver
|
* \param pwsc Webserver connection info, passed from the webserver
|
||||||
|
*
|
||||||
|
* \todo Decomplexify this!
|
||||||
*/
|
*/
|
||||||
void daap_handler(WS_CONNINFO *pwsc) {
|
void daap_handler(WS_CONNINFO *pwsc) {
|
||||||
int close;
|
int close;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user