summaryrefslogtreecommitdiff
path: root/apps/JAWS/clients/Blobby/Options.h
blob: 086fa003a37f48483c8f5ecda874719f7b4bd5e7 (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
66
/* -*- C++ -*- */
// $Id$

//============================================================================
//
// = LIBRARY
//    JAWS
// 
// = FILENAME
//    Options.h
//
// = DESCRIPTION
//     Options is an Singleton for blobby
//
// = AUTHOR
//    Prashant Jain and Sumedh Mungee
// 
//============================================================================

#if !defined (ACE_BLOBBY_OPTIONS_H)
#define ACE_BLOBBY_OPTIONS_H

#include "Blob.h"
#include "Blob_Handler.h"
#include "ace/Get_Opt.h"
#include "ace/ARGV.h"

class Options 
{
public:
  static Options *instance (void);
  // Returns the singleton instance

  void parse_args (int argc, char *argv[]);
  // parses commandline arguments

  char *hostname_;
  // Hostname to connect to

  u_short port_;
  // Port number to use 

  char *filename_;
  // Filename to upload/download

  int length_;
  // number of bytes to read/write

  int offset_;
  // offset to read/write

  char operation_;
  // "r" means download (read), and "w" means upload (write).

  int debug_;
  // turns on verbosity

protected:
  Options (void);
  // protected constructor, singleton

  static Options *instance_;
  // the singleton
};

#endif /* ACE_BLOBBY_OPTIONS_H */