38 #ifndef CCXX_LIBEXEC_H_
39 #define CCXX_LIBEXEC_H_
41 #ifndef CCXX_BAYONNE_H_
42 #include <cc++/bayonne.h>
46 #include <cc++/slog.h>
49 #ifndef CCXX_PROCESS_H_
50 #include <cc++/process.h>
89 const char *getEnv(
const char *
id);
97 const char *getArg(
const char *
id);
107 const char *getPath(
const char *filename,
char *buffer,
unsigned size);
115 const char *getFile(
const char *filename);
136 void hangupSession(
void);
141 void detachSession(
unsigned code);
151 result_t sendCommand(
const char *text,
char *buffer = NULL,
unsigned size = 0);
159 result_t sendResult(
const char *text);
166 void sendError(
const char *msg);
174 result_t xferCall(
const char *dest);
182 result_t replayFile(
const char *file);
191 result_t replayOffset(
const char *file,
const char *offset);
201 result_t recordFile(
const char *file, timeout_t duration, timeout_t silence = 0);
209 result_t speak(
const char *format, ...);
219 result_t playTone(
const char *name, timeout_t duration = 0,
unsigned level = 0);
220 result_t playSingleTone(
short f1, timeout_t duration,
unsigned level = 0);
221 result_t playDualTone(
short f1,
short f2, timeout_t duration,
unsigned level = 0);
232 result_t recordOffset(
const char *file,
const char *offset, timeout_t duration, timeout_t silence = 0);
240 result_t eraseFile(
const char *file);
249 result_t moveFile(
const char *file1,
const char *file2);
254 result_t clearInput(
void);
261 bool waitInput(timeout_t timeout);
271 result_t readInput(
char *buffer,
unsigned size, timeout_t timeout);
279 char readKey(timeout_t timeout);
281 result_t sizeSym(
const char *
id,
unsigned size);
282 result_t addSym(
const char *
id,
const char *value);
283 result_t setSym(
const char *
id,
const char *value);
284 result_t getSym(
const char *
id,
char *buf,
unsigned size);
293 void postSym(
const char *
id,
const char *value);
301 void sysPost(
const char *sid,
char *
id,
const char *value);
302 void sysVar(
const char *tsid,
char *
id,
const char *value,
int size);
303 void sysHeader(
const char *tsid);
304 void sysArgs(
const char *tsid);
305 void sysStatus(
const char *tsid);
306 void sysRecord(
const char *tsid,
char *token);
307 void sysReplay(
const char *tsid,
char *token);
308 void sysFlush(
const char *tsid);
309 void sysWait(
const char *tsid,
char *token);
310 void sysTone(
const char *tsid,
char *token);
311 void sysSTone(
const char *tsid,
char *token);
312 void sysDTone(
const char *tsid,
char *token);
313 void sysPrompt(
const char *tsid,
const char *voice,
const char *text);
314 void sysInput(
const char *tsid,
char *token);
315 void sysHangup(
const char *tsid);
316 void sysExit(
const char *tsid,
char *token);
317 void sysError(
const char *tsid,
char *token);
318 void sysReturn(
const char *tsid,
const char *text);
319 void sysXfer(
const char *tsid,
const char *dest);
333 static int iopair[2];
337 static void readline(
char *buf,
unsigned max);
346 static void allocate(
const char *path,
size_t bs = 0,
int pri = 0,
const char *modpath = NULL);
347 static void cleanup(
void);
348 static void startup(
void);
const char * tsid
Definition: libexec.h:67
Container class for applications implimenting the libexec process method of Bayonne interfacing...
Definition: libexec.h:63
Definition: libexec.h:296
Generic Bayonne master class to reference various useful data types and core static members used for ...
Definition: bayonne.h:251
The primary session object representing a server timeslot and active communication endpoint in Bayonn...
Definition: bayonne.h:2464
void setLevel(Audio::Level level)
Set the effective audio level for tones...
Definition: libexec.h:130
const char * voice
Definition: libexec.h:68
unsigned reply
Definition: libexec.h:76
result_t result
Definition: libexec.h:72
Audio::Level level
Definition: libexec.h:69
Core class for any server which impliments libexec functionality.
Definition: libexec.h:328
Keydata head
Definition: libexec.h:66
void setVoice(const char *voice)
Set the effective voice library to use.
Definition: libexec.h:122