blob: 5f973fb40626b758ec0deca9e61394dce1af8b78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// $Id$
/* -*- C++ -*- */
// URL_Parser.h, Stoyan
//============================================================================
//
// = FILENAME
// URL_Parser.h
//
// = DESCRIPTION
// parses a URL
//
// = AUTHOR
// Stoyan Paunov
//
//============================================================================
#ifndef URL_PARSER_H
#define URL_PARSER_H
#include "ace/Get_Opt.h"
//#if !defined (ACE_LACKS_PRAGMA_ONCE)
//# pragma once
//#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/ARGV.h"
class URL_Parser
{
public:
static URL_Parser *instance (void);
// Returns the singleton instance
bool parse_args (int argc, ACE_TCHAR *argv[]);
// parses commandline arguments
bool parseURL (char* url);
void exitOnError (void);
ACE_TCHAR *hostname_;
// Hostname to connect to
u_short port_;
// Port number to use
ACE_TCHAR *filename_;
// Filename to upload/download
int debug_;
// turns on verbosity
//destructor
~URL_Parser (void);
protected:
URL_Parser (void);
// protected constructor, singleton
static URL_Parser *instance_;
// the singleton
};
#endif /* URL_PARSER_H */
|