3 //=============================================================================
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 //=============================================================================
15 #include "ace/Null_Mutex.h"
16 #include "ace/Singleton.h"
17 #include "ace/Time_Value.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 class Command_Processor
;
30 * @brief Maintains the global options.
32 * This class is converted into a Singleton by the
33 * <ACE_Singleton> template.
38 /// Parse the command-line arguments and initialize the options.
39 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
41 /// If non-0 and the link is an HTML file then recursively check all
42 /// links that are embedded in the body of file.
45 /// Return the hostname of the initial Web server.
46 const ACE_TCHAR
*hostname () const;
48 /// Return the initial URI.
49 const ACE_TCHAR
*path_name () const;
51 /// String used to filter out which URLs to validate.
52 const ACE_TCHAR
*url_filter () const;
57 /// Are we being verbose?
60 /// Which order? LIFO|FIFO??
61 const ACE_TCHAR
*order () const;
66 /// Return the timeout used to prevent hanging on <recv> and
67 /// <connect> calls to broken servers.
68 const ACE_Time_Value
*timeout () const;
70 // = Get/set the <Command_Processor>.
71 Command_Processor
*command_processor () const;
72 void command_processor (Command_Processor
*);
74 // = Get/set the <URL_Visitor>.
75 URL_Visitor
*visitor () const;
76 void visitor (URL_Visitor
*);
78 // Get the handle_limit.
81 /// Are we recursving.
84 /// Initial Web server name.
85 const ACE_TCHAR
*hostname_
;
88 const ACE_TCHAR
*uri_
;
93 /// Are we being verbose?
96 /// Whether the URLs are traversed in FIFO or LIFO order.
97 const ACE_TCHAR
*order_
;
99 /// Timeout on <recv> and <connect> to broken Web servers.
100 ACE_Time_Value timeout_
;
102 /// String used to filter out which URLs to validate.
103 const ACE_TCHAR
*url_filter_
;
105 /// Pointer to the Command_Processor.
106 Command_Processor
*command_processor_
;
108 /// Pointer to the <URL_Visitor>.
109 URL_Visitor
*visitor_
;
114 /// The limit of the number of descriptors to be given for this process.
118 // Typedef an Options Singleton.
119 typedef ACE_Singleton
<Options
, ACE_Null_Mutex
> OPTIONS
;
121 #endif /* _OPTIONS_H */