10 #include "uniconfroot.h"
11 #include "wvstringtable.h"
14 #define WvConf WvConfEmu
15 #define WvConfigSection WvConfigSectionEmu
16 #define WvConfigSectionList WvConfigSectionListEmu
17 #define WvConfigEntry WvConfigEntryEmu
18 #define WvConfigEntryList WvConfigEntryListEmu
25 class WvAuthDaemonSvc;
37 name(_name), value(_value)
49 WvConfigEntryEmuDict entries;
55 uniconf(_uniconf), entries(42), values(*_values), name(_name)
58 const char *
get(
WvStringParm entry,
const char *def_val = NULL);
83 sect(_sect), iter(_sect.uniconf), link(NULL,
false), entry(NULL)
98 typedef wv::function<void(void*, WvStringParm, WvStringParm, WvStringParm, WvStringParm)> WvConfCallback;
106 WvConfCallback callback;
111 CallbackInfo(WvConfCallback _callback,
void* _userdata,
114 callback(_callback), userdata(_userdata), section(_section),
115 key(_key), cookie(_cookie)
119 WvConfigSectionEmuDict sections;
132 bool isclean()
const;
135 void save(
WvStringParm filename,
int _create_mode = 0666);
141 void add_callback(WvConfCallback callback,
void *userdata,
157 const char *def_val = NULL);
161 const char *def_val = NULL);
163 void setraw(
WvString wvconfstr,
const char *&value,
int &parse_error);
178 {
return get_passwd(
"Users", user); }
191 return check_passwd(
"Users", user, passwd, s);
198 return user_exists(
"Users", user);
204 { set_passwd(
"Users", user, passwd); }
208 void convert_to_old_pw();
210 static int check_for_bool_string(
const char *s);
225 WvAuthDaemon *wvauthd;
227 friend class WvAuthDaemonSvc;
238 conf(_conf), iter(conf.uniconf), link(NULL,
false)
246 #endif // __WVCONFEMU_H
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
This iterator performs depth-first traversal of a subtree.
This iterator walks through all immediate children of a UniConf node.
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
WvLink is one element of a WvList.
UniConf instances function as handles to subtrees of a UniConf tree and expose a high-level interface...
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.