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 
32 class UniSecureGen : public UniFilterGen
33 {
34  UniPermGen *perms;
36 
37 public:
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 
55 private:
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