Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / apps / drwho / Rwho_DB_Manager.h
blob42e2c8611d7c804407572d27380cdda45316ddca
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Rwho_DB_Manager.h
7 * @author Douglas C. Schmidt
8 */
9 //=============================================================================
12 #ifndef _RWHO_DB_MANAGER_H
13 #define _RWHO_DB_MANAGER_H
15 #include <sys/types.h>
16 #include <protocols/rwhod.h>
17 #include "ace/Dirent.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "Protocol_Record.h"
25 /**
26 * @class RWho_DB_Manager
28 * @brief This class returns the user/machine pairs one at a time from
29 * the rwho database.
31 class RWho_DB_Manager
33 public:
34 RWho_DB_Manager ();
35 ~RWho_DB_Manager ();
36 int get_next_user (Protocol_Record &protocol_record);
38 private:
39 ACE_Dirent rwho_dir;
40 whod host_data;
41 int number_of_users;
42 int current_user;
43 const int WHOD_HEADER_SIZE;
44 char original_pathname[MAXPATHLEN + 1];
45 const char *rwho_dir_name;
47 int get_next_host ();
50 #endif /* _RWHO_DB_MANAGER_H */