16 #include "wvlinklist.h"
18 #include "wvstringlist.h"
23 #warning "disabling wvconfemu transparent emulation"
25 #undef WvConfigSection
26 #undef WvConfigSectionList
28 #undef WvConfigEntryList
61 const char *
get(
WvStringParm entry,
const char *def_val = NULL);
75 typedef wv::function<void(void*, WvStringParm, WvStringParm, WvStringParm, WvStringParm)> WvConfCallback;
81 WvConfCallback callback;
82 void *userdata, *cookie;
88 : callback(_callback), section(_section), entry(_entry)
89 { userdata = _userdata; cookie = _cookie; }
98 class WvAuthDaemonSvc;
104 class WvConf :
public WvConfigSectionList
113 {
return isok() && !dirty; }
120 static int check_for_bool_string(
const char *s);
121 int parse_wvconf_request(
char *request,
char *§ion,
char *&entry,
127 const char *def_val = NULL);
133 const char *def_val = NULL);
138 const char *def_val = NULL);
143 void setraw(
WvString wvconfstr,
const char *&value,
int &parse_error);
156 void add_callback(WvConfCallback callback,
void *userdata,
161 void run_all_callbacks();
164 void setbool(
void *userdata,
169 void addname(
void *userdata,
174 void addfile(
void *userdata,
179 { add_callback(wv::bind(&WvConf::addfile,
this, _1, _2, _3, _4, _5),
180 filename, sect, ent,
new int); }
183 { add_callback(wv::bind(&WvConf::addname,
this, _1, _2, _3, _4, _5),
184 list, sect, ent, list); }
186 { del_callback(sect, ent, list); }
189 { add_callback(wv::bind(&WvConf::setbool,
this, _1, _2, _3, _4, _5),
190 b, section, entry, b); }
192 { del_callback(section, entry, b); }
195 { load_file(filename); }
201 {
return get_passwd(
"Users", user); }
211 return check_passwd(
"Users", user, passwd);
218 return user_exists(
"Users", user);
224 { set_passwd(
"Users", user, passwd); }
228 void convert_to_old_pw();
244 WvConfCallbackInfoList callbacks;
246 char *parse_section(
char *s);
247 char *parse_value(
char *s);
258 WvAuthDaemon *wvauthd;
260 friend class WvAuthDaemonSvc;
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
WvConf configuration file management class: used to read/write config files that are formatted in the...
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
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.
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's...