9 #ifndef __WVSTREAMSDAEMON_H
10 #define __WVSTREAMSDAEMON_H
13 #include "iwvstream.h"
14 #include "wvistreamlist.h"
34 WvDaemonCallback callback;
39 void init(WvDaemonCallback cb);
43 virtual void do_start();
44 virtual void do_run();
45 virtual void do_stop();
49 void restart_close_cb(
IWvStream *s,
const char *
id);
50 void die_close_cb(
IWvStream *s,
const char *
id);
58 WvDaemonCallback cb) :
60 WvDaemonCallback(), WvDaemonCallback())
69 bool auto_free,
const char *
id);
76 bool auto_free,
const char *
id);
82 bool auto_free,
const char *
id);
103 const char *wstype()
const {
return "WvStreamsDaemon"; }
105 #endif // __WVSTREAMSDAEMON_H
void close_existing_connections_on_restart()
If this member is called then any existing streams on the globallist added after the WvDaemonCallback...
void add_stream(IWvStream *istream, bool auto_free, const char *id)
Add a stream to the daemon; don't do anything if it goes !isok().
WvString is an implementation of a simple and efficient printable-string class.
void add_restart_stream(IWvStream *istream, bool auto_free, const char *id)
Add a stream to the daemon; the daemon will restart, re-populating the initial streams using the call...
WvStreamsDaemon(WvStringParm name, WvStringParm version, WvDaemonCallback cb)
Construct a new WvStreamsDaemon with given name and version, and use the cb function to populate the ...
void setcallback(WvDaemonCallback cb)
Change the callback function and userdata.
WvStreamsDaemon - High-level abstraction for a daemon process that does nothing but add streams to th...
WvString name
The name and version of the daemon; used for -V and logging.
WvDaemon - High-level abstraction for creating daemon processes.
WvStreamList holds a list of WvStream objects – and its select() and callback() functions know how to...
void add_die_stream(IWvStream *istream, bool auto_free, const char *id)
Add a stream to the daemon; if the stream goes !isok() the daemon will exit.