paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Macros | Functions | Variables
client.c File Reference

The client program used to connect to para_server. More...

#include <regex.h>
#include <signal.h>
#include <lopsub.h>
#include "client.lsg.h"
#include "para.h"
#include "list.h"
#include "sched.h"
#include "crypt.h"
#include "string.h"
#include "stdin.h"
#include "stdout.h"
#include "client.h"
#include "buffer_tree.h"
#include "error.h"
#include "version.h"
#include "interactive.h"
#include "server_cmd.lsg.h"

Macros

#define DEFINE_BLOB_COMPLETER(cmd, blob_type)
 
#define LSG_SERVER_CMD_CMD(_name)
 

Functions

int main (int argc, char *argv[])
 The client program to connect to para_server. More...
 

Variables

 DEFINE_PARA_ERRLIST
 Array of error strings. More...
 
__printf_2_3 void(* para_log )(int, const char *,...) = stderr_log
 

Detailed Description

The client program used to connect to para_server.

Macro Definition Documentation

◆ DEFINE_BLOB_COMPLETER

#define DEFINE_BLOB_COMPLETER (   cmd,
  blob_type 
)
Value:
static void cmd ## blob_type ## _completer( \
struct i9e_completion_info *ci, \
struct i9e_completion_result *cr) \
{complete_ ## cmd ## blob(#blob_type, ci, cr);}

◆ LSG_SERVER_CMD_CMD

#define LSG_SERVER_CMD_CMD (   _name)
Value:
{.name = #_name, \
.completer = _name ## _completer}

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

The client program to connect to para_server.

Parameters
argcUsual argument count.
argvUsual argument vector.

When called without a paraslash command, an interactive session is started. Otherwise, the client task and the supervisor task are started. The former communicates with para_server while the latter monitors whether the client task intends to read from stdin or write to stdout.

Once it has been determined whether the client command corresponds to a stdin command (addmood, addimg, ..), either the stdin task or the stdout task is set up to replace the supervisor task.

Returns
EXIT_SUCCESS or EXIT_FAILURE
See also
client_open(), stdin.c, stdout.c, para_client(1), para_server(1).

References client_parse_config(), crypt_init(), and sched::default_timeout.

Variable Documentation

◆ DEFINE_PARA_ERRLIST

DEFINE_PARA_ERRLIST

Array of error strings.

◆ para_log

__printf_2_3 void(* para_log) (int, const char *,...) = stderr_log
i9e_completion_result
Completion information returned by the completers.
Definition: interactive.h:18
i9e_completion_info
Structure passed as input to the completers.
Definition: interactive.h:8