diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:10:39 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:10:39 +0000 |
commit | e7b830ab561638ed25822054be80ce12e8801d38 (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h | |
parent | 9b720f395833b3ce2f499463e5fed37a0da926f4 (diff) | |
download | ATCD-DiffServ-Merge.tar.gz |
branching/taggingDiffServ-Merge
Diffstat (limited to 'modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h')
-rw-r--r-- | modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h b/modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h new file mode 100644 index 00000000000..0aec98cec65 --- /dev/null +++ b/modules/CIAO/DAnCE/NodeApplicationManager/URL_Parser.h @@ -0,0 +1,67 @@ + +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file URL_Parser.h + * + * $Id$ + * + * Parses a URL into its logical chunks + * + * @author Stoyan Paunov + */ +//============================================================================= + + +#ifndef URL_PARSER_H +#define URL_PARSER_H + +#include "ace/Get_Opt.h" +#include "ace/ARGV.h" +#include "ace/Singleton.h" //for ACE_Singleton +#include "ace/Null_Mutex.h" //for ACE_Null_Mutex + +//forward declaration +class URL_Parser; + +typedef ACE_Singleton <URL_Parser, ACE_Null_Mutex> TheURL_Parser; + + +class URL_Parser +{ +public: + + friend class ACE_Singleton <URL_Parser, ACE_Null_Mutex>; + + /// Parses commandline arguments + bool parse_args (int argc, ACE_TCHAR *argv[]); + + // Return false on failure + bool parseURL (char* url); + + void Error (void); + + /// Hostname to connect to + ACE_TCHAR *hostname_; + + /// Port number to use + u_short port_; + + /// Filename to upload/download + ACE_TCHAR *filename_; + + /// turns on verbosity + int debug_; + + /// Destructor + ~URL_Parser (void); + +protected: + /// protected constructor, singleton + URL_Parser (void); +}; + + + +#endif /* URL_PARSER_H */ |