WvStreams
debian/libwvstreams-dev/usr/include/wvstreams/unisecuregen.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 */
6#ifndef __UNISECUREGEN_H
7#define __UNISECUREGEN_H
8
9#include "unifiltergen.h"
10#include "unipermgen.h"
11#include "wvstring.h"
12#include "wvstringlist.h"
13
33{
34 UniPermGen *perms;
36
37public:
38 UniSecureGen(IUniConfGen *_gen, UniPermGen *_perms);
39 UniSecureGen(WvStringParm moniker, UniPermGen *_perms = NULL);
40
41 void setcredentials(const UniPermGen::Credentials &_cred);
42 void setcredentials(WvStringParm user, const WvStringList &groups);
43
45 virtual void flush_buffers() { }
46 virtual WvString get(const UniConfKey &key);
47 virtual bool exists(const UniConfKey &key);
48 virtual void set(const UniConfKey &key, WvStringParm value);
49 virtual bool haschildren(const UniConfKey &key);
50 virtual Iter *iterator(const UniConfKey &key);
51 virtual Iter *recursiveiterator(const UniConfKey &key);
52 virtual bool refresh();
53 virtual void commit();
54
55private:
56
58 bool findperm(const UniConfKey &key, UniPermGen::Type type);
59
65 bool drilldown(const UniConfKey &key);
66
68 virtual void gencallback(const UniConfKey &key, WvStringParm value);
69};
70
71
72#endif // __UNISECUREGEN_H
An abstract data container that backs a UniConf tree.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
A UniConfGen that delegates all requests to an inner generator.
UniPermGen wraps a tree encoding Unix-style permissions, and provides an API for setting and checking...
UniSecureGen wraps a given generator and checks permissions (using a Unix-style scheme) before respon...
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
virtual Iter * recursiveiterator(const UniConfKey &key)
Like iterator(), but the returned iterator is recursive, that is, it will return children of the imme...
virtual bool refresh()
Refreshes information about a key recursively.
virtual void commit()
Commits any changes.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual bool exists(const UniConfKey &key)
Without fetching its value, returns true if a key exists.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
This is a WvList of WvStrings, and is a really handy way to parse strings.
WvString is an implementation of a simple and efficient printable-string class.