|
0
|
1 |
#ifndef VMAILMGR__VPWENTRY__H__
|
|
|
2 |
#define VMAILMGR__VPWENTRY__H__
|
|
|
3 |
|
|
|
4 |
#include "mystring/mystring.h"
|
|
|
5 |
#include "misc/strlist.h"
|
|
|
6 |
|
|
|
7 |
struct vpwentry
|
|
|
8 |
{
|
|
|
9 |
protected:
|
|
|
10 |
const char* decode_flags(const char*, const char*);
|
|
|
11 |
const char* decode_base(const char*, const char*);
|
|
|
12 |
const char* decode_values(const char*, const char*);
|
|
|
13 |
|
|
|
14 |
bool from_ver1_record(const mystring& text);
|
|
|
15 |
bool from_ver2_record(const mystring& text);
|
|
|
16 |
bool from_old_record(const mystring& text);
|
|
|
17 |
|
|
|
18 |
public:
|
|
|
19 |
mystring name;
|
|
|
20 |
mystring pass;
|
|
|
21 |
mystring mailbox;
|
|
|
22 |
mystring forwards;
|
|
|
23 |
mystring personal;
|
|
|
24 |
unsigned hardquota;
|
|
|
25 |
unsigned softquota;
|
|
|
26 |
unsigned msgsize;
|
|
|
27 |
unsigned msgcount;
|
|
|
28 |
unsigned ctime;
|
|
|
29 |
unsigned expiry;
|
|
|
30 |
bool is_mailbox_enabled;
|
|
|
31 |
// keystrlist data;
|
|
|
32 |
|
|
|
33 |
vpwentry();
|
|
|
34 |
vpwentry(const mystring&, const mystring&, const mystring&, const mystring&);
|
|
|
35 |
~vpwentry();
|
|
|
36 |
|
|
|
37 |
//mystring get(const mystring& var) const { return data.get(var); }
|
|
|
38 |
//void set(const mystring& var, const mystring& val)
|
|
|
39 |
// {
|
|
|
40 |
// return data.set(var, val);
|
|
|
41 |
// }
|
|
|
42 |
|
|
|
43 |
void set_defaults(bool ctime_now, bool set_flags);
|
|
|
44 |
|
|
|
45 |
bool authenticate(const mystring& phrase) const;
|
|
|
46 |
|
|
|
47 |
bool from_record(const mystring& name, const mystring& text);
|
|
|
48 |
mystring to_record() const;
|
|
|
49 |
|
|
|
50 |
bool export_env() const;
|
|
|
51 |
};
|
|
|
52 |
|
|
|
53 |
#endif
|