WvStreams
uniconfdaemonconn.h
1/*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * Manages a UniConf daemon session.
6 */
7#ifndef __UNICONFDAEMONCONN_H
8#define __UNICONFDAEMONCONN_H
9
10#include "uniconf.h"
11#include "uniclientconn.h"
12#include "unipermgen.h"
13#include "wvlog.h"
14#include "wvhashtable.h"
15
16#define NUM_WATCHES 113
17#define CONTINUE_SELECT_AT 100
18
19class UniConfDaemon;
20
26{
27public:
28 UniConfDaemonConn(WvStream *s, const UniConf &root);
29 virtual ~UniConfDaemonConn();
30
31 virtual void close();
32
33 virtual void execute();
34
35protected:
36 UniConf root;
37
38 virtual void do_invalid(WvStringParm c);
39 virtual void do_malformed(UniClientConn::Command);
40 virtual void do_noop();
41 virtual void do_reply(WvStringParm reply);
42 virtual void do_get(const UniConfKey &key);
43 virtual void do_set(const UniConfKey &key, WvStringParm value);
44 virtual void do_remove(const UniConfKey &key);
45 virtual void do_subtree(const UniConfKey &key, bool recursive);
46 virtual void do_haschildren(const UniConfKey &key);
47 virtual void do_commit();
48 virtual void do_refresh();
49 virtual void do_quit();
50 virtual void do_help();
51
52 virtual void addcallback();
53 virtual void delcallback();
54
55 void deltacallback(const UniConf &cfg, const UniConfKey &key);
56};
57
58#endif // __UNICONFDAEMONCONN_H
Represents a connection to a UniConf daemon via any WvStream.
Definition: uniclientconn.h:28
Retains all state and behavior related to a single UniConf daemon connection.
virtual void close()
Close this stream.
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
Definition: uniconfkey.h:39
UniConf instances function as handles to subtrees of a UniConf tree and expose a high-level interface...
Definition: uniconf.h:51
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Definition: wvstring.h:94
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
Definition: wvstream.h:25