S_New4/parameterManager.h

56 lines
1.3 KiB
C
Raw Normal View History

2019-07-06 18:47:29 +00:00
#ifndef PARAMETERMANAGER_H
#define PARAMETERMANAGER_H
#include <iostream>
2019-07-07 16:30:37 +00:00
#include <getopt.h>
#include <string.h>
2019-07-08 18:17:11 +00:00
#include <sstream>
2019-07-06 18:47:29 +00:00
enum Modus {
EXIT = -1,
DEFAULT_MODUS = 0,
DIRECT_LINK_MODUS = 1
};
struct Settings {
Settings() {}
Settings(std::string name) : name(name) {}
2019-07-07 16:30:37 +00:00
std::string name,
2019-07-08 18:17:11 +00:00
accountFilePath = "/tmp/a",
accountNumberPath= "/tmp/b",
cookieFilePath = "/tmp/S_New4_cookies",
2019-07-07 16:30:37 +00:00
proxy_ip = "127.0.0.1",
proxy_port = "9050",
languages = "GerDub,GerSub,Eng",
2019-07-08 18:17:11 +00:00
genaueHoster,
version = "1.0.1",
2019-07-07 16:30:37 +00:00
outputFilePath;
2019-07-06 18:47:29 +00:00
Modus modus = Modus::DEFAULT_MODUS;
2019-07-08 18:17:11 +00:00
bool colorless = false,
debugMode = false;
int startEpisode = 1,
stopEpisode = 0,
startSeason = 1,
stopSeason = 0;
2019-07-06 18:47:29 +00:00
};
Settings manageParameter(int argc, char ** argv);
2019-07-07 16:30:37 +00:00
std::string getProgramName(char * argv0);
2019-07-08 18:17:11 +00:00
int compare(std::string All_Options_with_komma_between, std::string input);
2019-07-07 16:30:37 +00:00
2019-07-08 18:17:11 +00:00
void unterOption_help(Settings * settings, char *argv0);
2019-07-07 16:30:37 +00:00
void unterOption_default(Settings * settings, int argc, char **argv);
void unterOption_default_help(Settings * settings, char * argv0);
void unterOption_url(Settings * settings, int argc, char **argv);
void unterOption_url_help(Settings * settings, char *argv0);
2019-07-06 18:47:29 +00:00
#endif // PARAMETERMANAGER_H