24 #ifndef _SIPWITCH_CONTROL_H_
25 #define _SIPWITCH_CONTROL_H_
27 #ifndef _UCOMMON_LINKED_H_
28 #include <ucommon/linked.h>
31 #ifndef _UCOMMON_THREAD_H_
32 #include <ucommon/thread.h>
35 #ifndef _UCOMMON_SHELL_H
36 #include <ucommon/shell.h>
39 #ifndef _UCOMMON_STRING_H_
40 #include <ucommon/string.h>
43 #ifndef _SIPWITCH_NAMESPACE_H_
49 #define DEBUG1 shell::DEBUG0
50 #define DEBUG2 (shell::loglevel_t(((unsigned)shell::DEBUG0 + 1)))
51 #define DEBUG3 (shell::loglevel_t(((unsigned)shell::DEBUG0 + 2)))
72 static bool send(
const char *format, ...) __PRINTF(1, 2);
78 static
char *receive(
void);
84 static
void reply(const
char *error = NULL);
93 static
size_t attach(shell_t *env);
98 static
void release(
void);
106 static
bool state(const
char *
value);
116 static
bool libexec(const
char *fmt, ...) __PRINTF(1, 2);
123 static FILE *output(const
char *
id);
131 inline static const
char *env(const
char *
id)
132 {
return args->getsym(
id);}
141 inline static String
path(
const char *
id)
142 {
return (String)(args->getsym(
id));}
static String path(const char *id)
Get a string from a server environment variable.
Server control interfaces and functions.
static void config(shell *envp)
GNU SIP Witch library namespace.