00001
00002
00003
00004
00005
00006
00007 #ifndef __UNICONFDAEMON_H
00008 #define __UNICONFDAEMON_H
00009
00010 #include "wvlog.h"
00011 #include "wvistreamlist.h"
00012 #include "uniconf.h"
00013 #include "wvaddr.h"
00014
00015 class WvX509Mgr;
00016
00017 class UniConfDaemon : public WvIStreamList
00018 {
00019 UniConf cfg;
00020 WvLog log, debug;
00021 bool authenticate;
00022 IUniConfGen *permgen;
00023
00024 public:
00029 UniConfDaemon(const UniConf &cfg, bool auth, IUniConfGen *permgen);
00030 virtual ~UniConfDaemon();
00031
00032 virtual void close();
00033
00034 void accept(WvStream *stream);
00035
00040 bool setupunixsocket(WvStringParm path, int create_mode = 0755);
00045 bool setuptcpsocket(const WvIPPortAddr &addr);
00050 bool setupsslsocket(const WvIPPortAddr &addr, WvX509Mgr *x509);
00051
00052 private:
00053 void unixcallback(WvStream &s, void *userdata);
00054 void tcpcallback(WvStream &s, void *userdata);
00055 void sslcallback(WvStream &s, void *userdata);
00056 };
00057
00058 #endif // __UNICONFDAEMON_H