Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / apps / JAWS / server / HTTP_Config.h
blob84c8afbcad7e270592ca7bb3fc5c5e78ee05f9a3
1 /* -*- c++ -*- */
3 //=============================================================================
4 /**
5 * @file HTTP_Config.h
7 * @author James Hu
8 */
9 //=============================================================================
12 // = Forward declaration.
13 class HTTP_Config_Info;
15 /**
16 * @class HTTP_Config
18 * @brief Stores server configuration information.
19 * Someday, this will be hip and cool and be able to parse
20 * NCSA httpd style config files like Apache does. For now,
21 * I'm just going to hack in environment variable stuff.
22 * Designed around Singleton pattern.
24 class HTTP_Config
26 public:
27 /// Access the Singleton.
28 static HTTP_Config_Info *instance ();
30 private:
31 /// Store the Singleton.
32 static HTTP_Config_Info *instance_;
35 /**
36 * @class HTTP_Config_Info
38 * @brief This is where the information is really stored.
40 class HTTP_Config_Info
42 friend class HTTP_Config;
43 public:
44 HTTP_Config_Info ();
45 ~HTTP_Config_Info ();
47 // Accessors to the information
49 /// Where the root of the document tree begins. This prevents
50 /// clients from being able to examine your entire filesystem.
51 const char *document_root () const;
53 /// A search path for CGI files.
54 const char *cgi_path () const;
56 /// The directory which is appended to a home user directory, e.g.,
57 /// ".www-docs" or "public_html".
58 const char *user_dir () const;
60 /// What is the default index file for a directory, e.g.,
61 /// "index.html".
62 const char *dir_index () const;
64 /// Will the server support proxy requests?
65 int proxy_flag () const;
67 private:
68 // = Accesors that can set the data
70 const char *document_root (const char *dr_string);
71 const char *cgi_path (const char *cp_string);
72 const char *user_dir (const char *ud_string);
73 const char *dir_index (const char *di_string);
75 int proxy_flag (int pf);
77 private:
78 // = Data members
80 /// The directory root from which documents will be fetched
81 const char *document_root_;
83 /// The directories from which to expect CGI scripts
84 const char *cgi_path_;
86 /// Name of the sub-directory where user Web pages are
87 const char *user_dir_;
89 /// Name of the Web page to present in place of a directory listing
90 const char *dir_index_;
92 /// Should we support proxy requests? Ignored for now.
93 int proxy_flag_;