"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/userlist.h" (9 Apr 2008, 746 Bytes) of package /linux/privat/postal-0.76.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "userlist.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef USERLIST_H
    2 #define USERLIST_H
    3 
    4 using namespace std;
    5 
    6 #include "conf.h"
    7 
    8 #ifdef HAVE_VECTOR
    9 #include <vector>
   10 #else
   11 #include <vector.h>
   12 #endif
   13 
   14 #include <string>
   15 
   16 typedef vector<string> STR_VEC;
   17 
   18 #include "postal.h"
   19 
   20 class UserList
   21 {
   22 public:
   23   UserList(const char *userListFile, bool usePass, bool stripDom = false);
   24   UserList(UserList &list);
   25   ~UserList();
   26 
   27   const string &randomUser();
   28   string password(); // get the password from the last user we got
   29   string sequentialUser();
   30   size_t maxNameLen() const { return m_maxNameLen; }
   31 
   32 private:
   33   STR_VEC *m_users;
   34   STR_VEC *m_passwords;
   35   unsigned int m_index;
   36   size_t m_maxNameLen;
   37   bool m_primary;
   38 
   39   UserList(const UserList&);
   40   UserList & operator=(const UserList&);
   41 };
   42 
   43 #endif