00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef SH_ARGUMENTS_H
00022
#define SH_ARGUMENTS_H
00023
00024
#include <string>
00025
#include <vector>
00026
00027
#include "Arg.h"
00028
00029
00030
#ifdef HAVE_CONFIG_H
00031
#include "config.h"
00032
#endif
00033
00038 class Arguments {
00039
public:
00040 Arguments (
void) {} ;
00041
00045
Arguments (
int argc,
char *argv[]) ;
00046
00050
void parse (
void) ;
00051
00055
bool stdin_isused (
void) const ;
00056
00058 ArgCommand Command ;
00060 std::string CommandString ;
00061
00063 ArgString EmbFn ;
00065 ArgString ExtFn ;
00067 ArgString CvrFn ;
00069 ArgString StgFn ;
00070 ArgString Passphrase ;
00071 ArgBool Checksum ;
00072 ArgInt Compression ;
00073 ArgBool EmbedEmbFn ;
00074 ArgEncAlgo EncAlgo ;
00075 ArgEncMode EncMode ;
00076 ArgULong Radius ;
00077 ArgFloat Goal ;
00078 ArgBool Force ;
00079 ArgVerbosity Verbosity ;
00080 ArgDebugCommand DebugCommand ;
00081 ArgBool Check ;
00082 ArgStringList FileList ;
00083 ArgUInt DebugLevel ;
00084 ArgUInt GmlGraphRecDepth ;
00085 ArgUInt GmlStartVertex ;
00086
00087 std::string getPassphrase (
bool doublecheck = false) ;
00088
00089 private:
00090 typedef std::vector<std::string>::const_iterator
ArgIt ;
00091
00092 static const
int NoCompression = 0 ;
00093
00094 static const
EncryptionAlgorithm Default_EncAlgo ;
00095 static const
EncryptionMode Default_EncMode ;
00096 static const
bool Default_Checksum = true ;
00097 static const
int Default_Compression = 9 ;
00098 static const
bool Default_EmbedEmbFn = true ;
00099 static const
bool Default_Force = false ;
00100 static const VERBOSITY Default_Verbosity = NORMAL ;
00101 static const
unsigned long Default_Radius = 0 ;
00102 static const
unsigned int Max_Algorithm = 3 ;
00103 static const
float Default_Goal = 100.0 ;
00104 static const DEBUGCOMMAND Default_DebugCommand = NONE ;
00105 static const
bool Default_Check = false ;
00106 static const
unsigned int Default_DebugLevel = 0 ;
00107 static const
unsigned int Default_GmlGraphRecDepth = 0 ;
00108 static const
unsigned int Default_GmlStartVertex = 0 ;
00109
00116
void parse_Command (ArgIt& curarg) ;
00117
00122
bool parse_EmbFn (ArgIt& curarg) ;
00123
00124
bool parse_ExtFn (ArgIt& curarg) ;
00125
bool parse_CvrFn (ArgIt& curarg) ;
00126
bool parse_StgFn (ArgIt& curarg) ;
00127
bool parse_Passphrase (ArgIt& curarg) ;
00128
bool parse_Checksum (ArgIt& curarg) ;
00129
bool parse_Compression (ArgIt& curarg) ;
00130
bool parse_EmbedEmbFn (ArgIt& curarg) ;
00131
bool parse_Encryption (ArgIt& curarg) ;
00132
bool parse_Radius (ArgIt& curarg) ;
00133
bool parse_Goal (ArgIt& curarg) ;
00134
bool parse_Force (ArgIt& curarg) ;
00135
bool parse_Verbosity (ArgIt& curarg) ;
00136
bool parse_Debug (ArgIt& curarg) ;
00137
00138
void setDefaults (
void) ;
00139
00140 std::vector<std::string> TheArguments ;
00141 } ;
00142
00143
00144 #include "
Arg.cc"
00145
00146 #endif