/**
* data specific to the aacdec filter
*
- * \sa filter, filter_node
+ * \sa \ref filter, \ref filter_node.
*/
struct private_aacdec_data {
/** the return value of aac_open */
* success, the function must return a positive value and fill in the
* given struct afh_info.
*
- * \sa struct afh_info
+ * \sa struct \ref afh_info.
*/
int (*get_file_info)(char *map, size_t numbytes, int fd,
struct afh_info *afhi);
#include "sideband.h"
#include "command.h"
-/** The osl tables used by afs. \sa blob.c. */
+/** The osl tables used by afs. \sa \ref blob.c. */
enum afs_table_num {
- /** Contains audio file information. See aft.c. */
+ /** Contains audio file information. See \ref aft.c. */
TBLNUM_AUDIO_FILES,
- /** The table for the paraslash attributes. See attribute.c. */
+ /** The table for the paraslash attributes. See \ref attribute.c. */
TBLNUM_ATTRIBUTES,
/**
* Paraslash's scoring system is based on Gaussian normal
* distributions, and the relevant data is stored in the rbtrees of an
- * osl table containing only volatile columns. See score.c for
+ * osl table containing only volatile columns. See \ref score.c for
* details.
*/
TBLNUM_SCORES,
/**
* A standard blob table containing the mood definitions. For details
- * see mood.c.
+ * see \ref mood.c.
*/
TBLNUM_MOODS,
/** A blob table containing lyrics on a per-song basis. */
* command socket, so that the handler process can read the id, attach the
* shared memory area and use the result.
*
- * \sa struct callback_result.
+ * \sa \ref struct callback_result.
*/
struct callback_query {
/** The function to be called. */
* into the shared memory area holding the result, mainly to let the command
* handler know the size of the result.
*
- * \sa struct callback_query.
+ * \sa \ref struct callback_query.
*/
struct callback_result {
/** The number of bytes of the result. */
*
* \return Standard.
*
- * \sa open_and_update_audio_file().
+ * \sa \ref open_and_update_audio_file().
*/
static int open_next_audio_file(void)
{
unsigned loop_col_num;
/** Data from this column is matched against the given patterns. */
unsigned match_col_num;
- /** \see pattern_match_flags. */
+ /** \see \ref pattern_match_flags. */
unsigned pm_flags;
/** This value is passed verbatim to fnmatch(). */
int fnmatch_flags;
* Therefore afs commands typically consist of two functions: The command
* handler and the corresponding callback function that runs in afs context.
*
- * \sa send_callback_request().
+ * \sa \ref send_callback_request().
*/
typedef int afs_callback(struct afs_callback_arg *aca);
/**
* Describes the layout of the mmapped-afs info struct.
*
- * \sa struct afs_info.
+ * \sa struct \ref afs_info.
*/
enum afsi_offsets {
/** Where .last_played is stored. */
* \param afsi Pointer to the audio file info to be converted.
* \param obj Result pointer.
*
- * \sa load_afsi().
+ * \sa \ref load_afsi().
*/
static void save_afsi(struct afs_info *afsi, struct osl_object *obj)
{
*
* \return Standard.
*
- * \sa save_afsi().
+ * \sa \ref save_afsi().
*/
static int load_afsi(struct afs_info *afsi, struct osl_object *obj)
{
*
* \return The return value of the underlying call to osl_get_object().
*
- * \sa get_hash_of_row().
+ * \sa \ref get_hash_of_row().
*/
static int get_hash_object_of_aft_row(const struct osl_row *row,
struct osl_object *obj)
*
* \param flags Usual flags that are passed to osl_close_table().
*
- * \sa osl_close_table().
+ * \sa \ref osl_close_table().
*/
static void aft_close(void)
{
*
* \return Standard.
*
- * \sa osl_open_table().
+ * \sa \ref osl_open_table().
*/
static int aft_open(const char *dir)
{
/**
* Close the attribute table.
*
- * \sa osl_close_table().
+ * \sa \ref osl_close_table().
*/
static void attribute_close(void)
{
*
* \return Positive on success, negative on errors.
*
- * \sa osl_open_table().
+ * \sa \ref osl_open_table().
*/
static int attribute_open(const char *dir)
{
*
* \return EXIT_SUCCESS or EXIT_FAILURE.
*
- * \sa send_cred_buffer(), para_audioc(1), para_audiod(1).
+ * \sa \ref send_cred_buffer(), para_audioc(1), para_audiod(1).
*/
int main(int argc, char *argv[])
{
/**
* The task that calls the status command of para_server.
*
- * \sa struct status_task
+ * \sa \ref struct status_task.
*/
static struct status_task *stat_task = &status_task_struct;
* \return Positive on success, negative on errors, zero if there was no
* connection to accept.
*
- * \sa para_accept(), recv_cred_buffer()
+ * \sa \ref para_accept(), \ref recv_cred_buffer().
* */
int handle_connect(int accept_fd, fd_set *rfds)
{
* \return \p -ENOTSUP if no parent node of \a btrn understands \a command.
* Otherwise the return value of the command handler is returned.
*
- * \sa \ref receiver::execute, filter::execute, writer::execute.
+ * \sa \ref receiver::execute, \ref filter::execute, \ref writer::execute.
*/
int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result)
{
*
* \return A pointer to the \a context address specified at node creation time.
*
- * \sa btr_new_node(), struct \ref btr_node_description.
+ * \sa \ref btr_new_node(), struct \ref btr_node_description.
*/
void *btr_context(struct btr_node *btrn)
{
*
* \return EXIT_SUCCESS or EXIT_FAILURE
*
- * \sa client_open(), stdin.c, stdout.c, para_client(1), para_server(1)
+ * \sa \ref client_open(), \ref stdin.c, \ref stdout.c, para_client(1),
+ * para_server(1).
*/
int main(int argc, char *argv[])
{
/**
* Describes an element of the close-on-fork list.
*
- * \sa list.h
+ * \sa \ref list.h.
*/
struct close_on_fork {
/** The file descriptor which should be closed after fork(). */
clock_get_realtime(¤t_time);
/*
* The calls to WRITE_STATUS_ITEM() below never fail because
- * b->max_size is zero (unlimited), see para_printf(). However, clang
- * is not smart enough to prove this and complains nevertheless.
+ * b->max_size is zero (unlimited), see \ref para_printf(). However,
+ * clang is not smart enough to prove this and complains nevertheless.
* Casting the return value to void silences clang.
*/
(void)WRITE_STATUS_ITEM(&b, SI_STATUS, "%s\n", status);
* the function if the connection was not authenticated when the timeout
* expires.
*
- * \sa alarm(2), crypt.c, crypt.h
+ * \sa alarm(2), \ref crypt.c, \ref crypt.h.
*/
__noreturn void handle_connect(int fd, const char *peername)
{
/*
* Bypass unused CCID paths: the sender does not receive application data
* from the client; by shutting down this unused communication path we can
- * reduce processing costs a bit. See analogous comment in dccp_recv.c.
+ * reduce processing costs a bit. See analogous comment in \ref dccp_recv.c.
*/
if (shutdown(sc->fd, SHUT_RD) < 0) {
PARA_WARNING_LOG("%s\n", strerror(errno));
/**
* Wrapper for lopsub library calls.
*
- * \param ret See osl().
- * \return See osl().
+ * \param ret See \ref osl().
+ * \return See \ref osl().
*/
_static_inline_ int lls(int ret)
{
* This wrapper for FD_SET() passes its first two arguments to \p FD_SET. Upon
* return, \a max_fileno contains the maximum of the old_value and \a fd.
*
- * \sa para_select.
+ * \sa \ref para_select.
*/
void para_fd_set(int fd, fd_set *fds, int *max_fileno)
{
*
* \return Standard.
*
- * \sa munmap(2), mmap_full_file().
+ * \sa munmap(2), \ref mmap_full_file().
*/
int para_munmap(void *start, size_t length)
{
* time, all these filter functions must be reentrant; no static non-constant
* variables may be used.
*
- * \sa mp3dec_filter.c, oggdec_filter.c, wav_filter.c, compress_filter.c, filter_node
+ * \sa \ref filter_node.
*/
struct filter {
/**
/**
* the possible states of a http receiver node
*
- * \sa receiver_node
+ * \sa \ref receiver_node.
*/
enum http_recv_status {HTTP_CONNECTED, HTTP_SENT_GET_REQUEST, HTTP_STREAMING};
* It gets initialized to \p HTTP_CONNECTED by the open function of the
* http receiver.
*
- * \sa receiver::open, receiver_node.
+ * \sa \ref receiver::open, \ref receiver_node.
*/
enum http_recv_status status;
};
*
* This function either succeeds or aborts.
*
- * \sa semop(2), struct misc_meta_data.
+ * \sa semop(2), struct \ref misc_meta_data.
*/
void mutex_lock(int id)
{
*
* This function either succeeds or aborts.
*
- * \sa semop(2), struct misc_meta_data.
+ * \sa semop(2), struct \ref misc_meta_data.
*/
void mutex_unlock(int id)
{
* Mood score functions must return values between -100 and +100 inclusively.
* Boolean score functions should always return either -100 or +100.
*
- * \sa struct mood_method, mood_parser.
+ * \sa struct \ref mood_method, \ref mood_parser.
*/
typedef int mood_score_function(const char *path, const struct afs_info *afsi,
const struct afh_info *afhi, const void *data);
* later in the mood_score_function of the mood_method. The mood_parser may
* store a pointer to its structure via the void** pointer.
*
- * \sa mood_open(), mood_cleanup_function, mood_score_function.
+ * \sa \ref mood_cleanup_function, \ref mood_score_function.
*/
typedef int mood_parser(int, char **, void **);
};
/*
- * Created from the mood definition by change_current_mood().
+ * Created from the mood definition by \ref change_current_mood().
*
* When a mood is opened, each line of its definition is investigated, and a
* corresponding mood item is produced. Each mood line starts with accept,
*
* \return Positive on success, negative on errors.
*
- * \sa score_delete().
+ * \sa \ref score_delete().
*/
static int mood_delete_audio_file(const struct osl_row *aft_row)
{
* \return Positive on success, negative on errors. Loading the dummy mood
* always succeeds.
*
- * \sa struct admissible_file_info, struct admissible_array, struct
- * afs_info::last_played, mood_close().
+ * \sa struct \ref afs_info::last_played.
*/
int change_current_mood(const char *mood_name)
{
* directly after makesock(). The 'pre_conn_opt' structure is for internal use
* only and should not be visible elsewhere.
*
- * \sa setsockopt(2), makesock()
+ * \sa setsockopt(2), \ref makesock().
*/
struct pre_conn_opt {
int sock_level; /**< Second argument to setsockopt() */
* \return A static character string identifying hostname and port of the
* chosen side in numeric host:port format.
*
- * \sa getsockname(2), getpeername(2), parse_url(), getnameinfo(3),
+ * \sa getsockname(2), getpeername(2), \ref parse_url(), getnameinfo(3),
* services(5), nsswitch.conf(5).
*/
char *remote_name(int fd)
*
* \return The return value of the underlying call to \a recv_bin_buffer().
*
- * \sa recv_bin_buffer()
+ * \sa \ref recv_bin_buffer()
*/
int recv_buffer(int fd, char *buf, size_t size)
{
* \return The file descriptor of the connected socket on success, negative on
* errors.
*
- * \sa create_local_socket(), unix(7), connect(2).
+ * \sa \ref create_local_socket(), unix(7), connect(2).
*/
int connect_local_socket(const char *name)
{
* \return On success, this call returns the number of bytes sent. On errors,
* \p -E_SENDMSG is returned.
*
- * \sa \ref recv_cred_buffer, sendmsg(2), socket(7), unix(7), okir's Black Hats
- * Manual.
+ * \sa \ref recv_cred_buffer, sendmsg(2), socket(7), unix(7).
*/
ssize_t send_cred_buffer(int sock, char *buf)
{
struct filter_node fn;
struct writer_node wn;
- /* See comment to enum state_change_request_type above */
+ /* See comment to enum \ref state_change_request_type above. */
enum state_change_request_type rq;
/* only relevant if rq == CRT_FILE_CHANGE */
unsigned next_file;
/**
* Close the current playlist.
*
- * \sa playlist_open().
+ * \sa \ref playlist_open().
*/
void playlist_close(void)
{
/**
* Describes one supported paraslash receiver.
*
- * \sa http_recv.c, udp_recv.c
+ * \sa \ref http_recv.c, \ref udp_recv.c.
*/
struct receiver {
/**
* It should free all resources associated with given receiver node
* that were allocated during the corresponding open call.
*
- * \sa receiver_node.
+ * \sa \ref receiver_node.
*/
void (*close)(struct receiver_node *rn);
/**
* add any file descriptors to the sets of file descriptors given by \a
* s.
*
- * \sa select(2), time.c struct task, struct sched.
+ * \sa select(2), \ref time.c, struct \ref sched.
*/
void (*pre_select)(struct sched *s, void *context);
/**
* then use any non-blocking I/O to establish a connection or to
* receive the audio data.
*
- * \sa select(2), struct receiver.
+ * \sa select(2), struct \ref receiver.
*/
int (*post_select)(struct sched *s, void *context);
* function does nothing. Otherwise the timeout for the next select() call is
* set to the given value.
*
- * \sa sched_request_timeout_ms().
+ * \sa \ref sched_request_timeout_ms().
*/
void sched_request_timeout(struct timeval *to, struct sched *s)
{
* \return If \a barrier is in the past, this function does nothing and returns
* zero. Otherwise it returns one.
*
- * \sa sched_request_barrier_or_min_delay().
+ * \sa \ref sched_request_barrier_or_min_delay().
*/
int sched_request_barrier(struct timeval *barrier, struct sched *s)
{
* \return If \a barrier is in the past, this function requests a minimal
* timeout and returns zero. Otherwise it returns one.
*
- * \sa sched_min_delay(), sched_request_barrier().
+ * \sa \ref sched_min_delay(), \ref sched_request_barrier().
*/
int sched_request_barrier_or_min_delay(struct timeval *barrier, struct sched *s)
{
* \return Positive on success, negative on errors. Possible errors:
* Errors returned by osl_get_row() and osl_del_row().
*
- * \sa score_add(), score_shutdown().
+ * \sa \ref score_add().
*/
int score_delete(const struct osl_row *aft_row)
{
/**
* Describes one supported sender of para_server.
*
- * \sa http_send.c udp_send.c, dccp_send.c.
+ * \sa \ref http_send.c \ref udp_send.c, \ref dccp_send.c.
*/
struct sender {
/** The name of the sender. */
* list, destroy the chunk queue of this client, delete the client from the
* list of connected clients and free the sender_client struct.
*
- * \sa shutdown_clients().
+ * \sa \ref shutdown_clients().
*/
void shutdown_client(struct sender_client *sc, struct sender_status *ss)
{
* \param scd Contains the IP and the netmask.
* \param ss The sender.
*
- * \sa generic_com_deny().
+ * \sa \ref generic_com_deny().
*/
void generic_com_allow(struct sender_command_data *scd,
struct sender_status *ss)
* \param scd see \ref generic_com_allow().
* \param ss see \ref generic_com_allow().
*
- * \sa generic_com_allow().
+ * \sa \ref generic_com_allow().
*/
void generic_com_deny(struct sender_command_data *scd,
struct sender_status *ss)
*
* \param ss The sender to deactivate.
*
- * \sa \ref del_close_on_fork_list(), shutdown_clients().
+ * \sa \ref del_close_on_fork_list(), \ref shutdown_clients().
*/
void generic_com_off(struct sender_status *ss)
{
.name = "stdout",
};
- /* See stdin.c for details. */
+ /* See \ref stdin.c for details. */
ret = fcntl(STDOUT_FILENO, F_GETFL);
if (ret < 0) {
PARA_EMERG_LOG("F_GETFL: %s\n", strerror(errno));
* \return This function either returns a pointer to a string that must be
* freed by the caller or aborts without returning.
*
- * \sa printf(3), xasprintf().
+ * \sa printf(3), \ref xasprintf().
*/
__must_check __printf_1_2 __malloc char *make_message(const char *fmt, ...)
{
*
* \return Standard.
*
- * \sa para_atoi32(), strtol(3), atoi(3).
+ * \sa \ref para_atoi32(), strtol(3), atoi(3).
*/
int para_atoi64(const char *str, int64_t *value)
{
*
* \return Standard.
*
- * \sa para_atoi64().
+ * \sa \ref para_atoi64().
*/
int para_atoi32(const char *str, int32_t *value)
{
size_t size;
/** The maximal size this buffer may grow. Zero means unlimited. */
size_t max_size;
- /** \sa para_buffer_flags. */
+ /** \sa \ref para_buffer_flags. */
unsigned flags;
/** The next para_printf() will write at this offset. */
size_t offset;
/**
* Controls the behavior of for_each_line().
*
- * \sa for_each_line().
+ * \sa \ref for_each_line().
*/
enum for_each_line_flags {
/** Activate read-only mode. */