lib/vpwentry/vpwentry.h
changeset 2 b3afb9f1e801
parent 0 6f7a81934006
equal deleted inserted replaced
1:30113bfbe723 2:b3afb9f1e801
    13 
    13 
    14   bool from_ver1_record(const mystring& text);
    14   bool from_ver1_record(const mystring& text);
    15   bool from_ver2_record(const mystring& text);
    15   bool from_ver2_record(const mystring& text);
    16   bool from_old_record(const mystring& text);
    16   bool from_old_record(const mystring& text);
    17   
    17   
       
    18   void set_defaults(bool ctime_now, bool set_flags);
       
    19 
    18 public:
    20 public:
    19   mystring name;
    21   mystring name;
    20   mystring pass;
    22   mystring pass;
    21   mystring mailbox;
    23   mystring directory;
    22   mystring forwards;
    24   mystring forwards;
    23   mystring personal;
    25   mystring personal;
    24   unsigned hardquota;
    26   unsigned hardquota;
    25   unsigned softquota;
    27   unsigned softquota;
    26   unsigned msgsize;
    28   unsigned msgsize;
    27   unsigned msgcount;
    29   unsigned msgcount;
    28   unsigned ctime;
    30   unsigned ctime;
    29   unsigned expiry;
    31   unsigned expiry;
       
    32   bool has_mailbox;
    30   bool is_mailbox_enabled;
    33   bool is_mailbox_enabled;
    31   // keystrlist data;
    34   // keystrlist data;
    32   
    35   
       
    36 private:
    33   vpwentry();
    37   vpwentry();
    34   vpwentry(const mystring&, const mystring&, const mystring&, const mystring&);
    38 
       
    39 public:
       
    40   static vpwentry* new_from_record(const mystring& name, const mystring& text);
       
    41   
       
    42   vpwentry(const mystring&, const mystring&, const mystring&, const mystring&,
       
    43 	   bool);
    35   ~vpwentry();
    44   ~vpwentry();
    36 
    45 
    37   //mystring get(const mystring& var) const { return data.get(var); }
    46   //mystring get(const mystring& var) const { return data.get(var); }
    38   //void set(const mystring& var, const mystring& val)
    47   //void set(const mystring& var, const mystring& val)
    39   //  {
    48   //  {
    40   //    return data.set(var, val);
    49   //    return data.set(var, val);
    41   //  }
    50   //  }
    42 
    51 
    43   void set_defaults(bool ctime_now, bool set_flags);
    52   bool authenticate(const mystring& phrase) const;
    44 
    53 
    45   bool authenticate(const mystring& phrase) const;
       
    46   
       
    47   bool from_record(const mystring& name, const mystring& text);
    54   bool from_record(const mystring& name, const mystring& text);
    48   mystring to_record() const;
    55   mystring to_record() const;
    49 
    56 
    50   bool export_env() const;
    57   bool export_env() const;
    51 };
    58 };