S_New4/parameterManager.h

66 lines
1.7 KiB
C++

#ifndef PARAMETERMANAGER_H
#define PARAMETERMANAGER_H
#include <iostream>
#include <getopt.h>
#include <string.h>
#include <sstream>
#include <sys/stat.h>
enum Modus {
EXIT = -1,
DEFAULT_MODUS = 0,
DIRECT_LINK_MODUS = 1,
Search_MODUS = 2
};
struct Settings {
Settings() {}
Settings(std::string name) : name(name) {}
std::string name,
accountFilePath = "/tmp/a",
accountNumberPath= "/tmp/b",
cookieFilePath = "/tmp/S_New4_cookies",
serienListPath = "/tmp/SerienListe",
proxy_ip = "127.0.0.1",
languages = "GerDub,GerSub,Eng",
genaueHoster = "",
version = "1.0.1",
outputFilePath;
Modus modus = Modus::DEFAULT_MODUS;
bool colorless = false,
debugMode = false,
search_IgnoreUpperLower = true,
search_wantUpdate = false;
int startEpisode = 1,
stopEpisode = 0,
startSeason = 1,
stopSeason = 0,
proxy_port = 9050;
};
int manageParameter(Settings &settings, int argc, char ** argv);
std::string getProgramName(char * argv0);
int compare(std::string All_Options_with_komma_between, std::string input);
void setPaths(Settings &settings, std::string executablePathTo);
bool dirExists(std::string dir);
int unterOption_help(Settings * settings, char *argv0);
int unterOption_default(Settings * settings, int argc, char **argv);
void unterOption_default_help(Settings * settings, char * argv0);
int unterOption_url(Settings * settings, int argc, char **argv);
void unterOption_url_help(Settings * settings, char *argv0);
int unterOption_search(Settings * settings, int argc, char **argv);
void unterOption_search_help(Settings * settings, char *argv0);
#endif // PARAMETERMANAGER_H