Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / apps / drwho / File_Manager.h
blob9482608698a43fa3810b700948f983fdb6727423
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file File_Manager.h
7 * @author Douglas C. Schmidt
8 */
9 //=============================================================================
12 #ifndef _FILE_MANAGER_H
13 #define _FILE_MANAGER_H
15 #include "global.h"
16 #include "ace/Singleton.h"
17 #include "ace/Null_Mutex.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/Mem_Map.h"
25 /**
26 * @class File_Manager
28 * @brief This class provides a file ADT for our friends info.
30 class File_Manager
32 public:
33 /// Constructor.
34 File_Manager ();
36 int open_file (const char *filename);
37 void get_login_and_real_name (const char *&login_name,
38 const char *&real_name);
39 private:
40 int number_of_friends;
41 int max_key_length;
43 char *buffer_ptr;
44 char *current_ptr;
45 int buffer_size;
47 int open_friends_file (const char *filename);
48 int open_passwd_file ();
50 ACE_Mem_Map mmap_;
53 // Make a Singleton.
54 typedef ACE_Singleton <File_Manager, ACE_Null_Mutex> FILE_MANAGER;
56 #endif /* _FILE_MANAGER_H */