Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / drwho / Options.h
blobf8d60f68b8d26f620c3b3962b696d8d9fa16cf1e
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Options.h
7 * @author Douglas C. Schmidt
8 */
9 //=============================================================================
12 #ifndef _OPTIONS_H
13 #define _OPTIONS_H
15 #include "global.h"
17 /**
18 * @class Options
20 * @brief This file is used to provide a consolidated Options handling facility.
22 class Options
24 public:
25 enum Option_Types
27 REMOTE_USAGE = 01,
28 PRINT_LOGIN_NAME = 02,
29 DEBUGGING = 04,
30 STAND_ALONE_SERVER = 010,
31 SORT_BY_LOGIN_NAME = 020,
32 SORT_BY_REAL_NAME = 040,
33 USE_VERBOSE_FORMAT = 0100,
34 BE_A_DAEMON = 0200
37 // Different types of messages.
38 enum Protocol_Types
40 PROTO_USR = 1, // Only return info on one user.
41 PROTO_ALL = 2, // Return info on all users logged in around the system.
42 PROTO_FLO = 3, // Return info on friends logged in.
43 PROTO_RUSER = 4, // Return info in ruser format!
44 PROTO_RWHO = 5, // Return info in rwho format.
45 PROTO_WHO = 6, // Return info in who format.
46 PROTO_RUPTIME = 7 // Return info in ruptime format.
49 static void set_options (int argc, char *argv[]);
50 static void set_opt (Option_Types opt);
51 static int get_opt (Option_Types opt);
53 static short port_number;
54 static Protocol_Types protocol_type;
55 static int max_server_timeout;
56 static char *program_name;
57 static const char *friend_file;
58 static char *user_name;
60 static void print_usage_and_die [[noreturn]] (int long_msg);
61 static unsigned int option_word;
64 #endif /* _OPTIONS_H */