1 #include "ace/Get_Opt.h"
4 #include "Blob_Handler.h"
7 Options
*Options::instance_
= 0;
12 if (Options::instance_
== 0)
13 Options::instance_
= new Options
;
15 return Options::instance_
;
19 Options::parse_args (int argc
, ACE_TCHAR
*argv
[])
21 ACE_Get_Opt
get_opt (argc
, argv
, ACE_TEXT ("rwh:p:f:l:o:d"));
25 while ((c
= get_opt ()) != -1)
32 this->operation_
= 'r';
35 this->operation_
= 'w';
38 this->hostname_
= get_opt
.opt_arg ();
41 this->port_
= ACE_OS::atoi (get_opt
.opt_arg ());
44 this->filename_
= get_opt
.opt_arg ();
47 this->length_
= ACE_OS::atoi (get_opt
.opt_arg ());
50 this->offset_
= ACE_OS::atoi (get_opt
.opt_arg ());
53 ACE_DEBUG ((LM_DEBUG
, "%s -h hostname -f filename -[r/w] [-p port] [-l length] [-o offset] [-d]\n", argv
[0]));
56 if (this->hostname_
== 0 || this->filename_
== 0)
59 "%s -h hostname -f filename -[r/w] [-p port] [-l length] [-o offset] [-d]\n",
69 port_ (ACE_DEFAULT_HTTP_SERVER_PORT
),