WvStreams
|
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2002 Net Integration Technologies, Inc. 00004 * 00005 */ 00006 #ifndef __UNISECUREGEN_H 00007 #define __UNISECUREGEN_H 00008 00009 #include "unifiltergen.h" 00010 #include "unipermgen.h" 00011 #include "wvstring.h" 00012 #include "wvstringlist.h" 00013 00032 class UniSecureGen : public UniFilterGen 00033 { 00034 UniPermGen *perms; 00035 UniPermGen::Credentials cred; 00036 00037 public: 00038 UniSecureGen(IUniConfGen *_gen, UniPermGen *_perms); 00039 UniSecureGen(WvStringParm moniker, UniPermGen *_perms = NULL); 00040 00041 void setcredentials(const UniPermGen::Credentials &_cred); 00042 void setcredentials(WvStringParm user, const WvStringList &groups); 00043 00045 virtual void flush_buffers() { } 00046 virtual WvString get(const UniConfKey &key); 00047 virtual bool exists(const UniConfKey &key); 00048 virtual void set(const UniConfKey &key, WvStringParm value); 00049 virtual bool haschildren(const UniConfKey &key); 00050 virtual Iter *iterator(const UniConfKey &key); 00051 virtual Iter *recursiveiterator(const UniConfKey &key); 00052 virtual bool refresh(); 00053 virtual void commit(); 00054 00055 private: 00056 00058 bool findperm(const UniConfKey &key, UniPermGen::Type type); 00059 00065 bool drilldown(const UniConfKey &key); 00066 00068 virtual void gencallback(const UniConfKey &key, WvStringParm value); 00069 }; 00070 00071 00072 #endif // __UNISECUREGEN_H