1#include "wvdbusserver.h"
2#include "wvstreamsdaemon.h"
5#include "wvsslstream.h"
7#include "uniconfroot.h"
18 wv::bind(&WvDBusDaemon::cb,
this)),
19 log(
"WvDBusDaemon", WvLog::Debug), configfile(
"wvdbus.ini")
21 args.add_option(
'c',
"config",
"Specify path to configuration file",
22 "FILENAME", configfile);
23 args.add_required_arg(
"MONIKER",
true);
26 virtual ~WvDBusDaemon()
33 log(
"WvDBusDaemon starting.\n");
34 conf.mount(
WvString(
"ini:%s", configfile));
36 if (!cert && conf[
"cert"].exists() && conf[
"privrsa"].exists())
39 cert->
decode(WvX509::CertPEM, *conf[
"cert"]);
40 cert->decode(WvRSAKey::RsaPEM, *conf[
"privrsa"]);
44 log(
"Certificate found in ini file, but failed to load!\n");
48 log(
"Certificate found in ini file, and loaded!\n");
53 for (i.rewind(); i.next(); )
67 return new WvSSLStream(IWvStream::create(s, obj), cert, 0,
true);
73int main(
int argc,
char *argv[])
The basic interface which is included by all other XPLC interfaces and objects.
Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated strin...
void listen(WvStringParm moniker)
Listen using a given WvListener moniker.
const WvStringList & extra_args() const
Remaining args.
int run(const char *argv0)
Run the daemon with no argument processing. Returns exit status.
WvLog log
The daemon's log mechanism.
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
SSL Stream, handles SSLv2, SSLv3, and TLS Methods - If you want it to be a server,...
WvStreamsDaemon(WvStringParm name, WvStringParm version, WvDaemonCallback cb)
void add_die_stream(IWvStream *istream, bool auto_free, const char *id)
WvString is an implementation of a simple and efficient printable-string class.
virtual void decode(const WvX509::DumpMode mode, WvStringParm encoded)
Load the information from the format requested by mode into the class - this overwrites the certifica...