#ifndef JCEF_COMMANDLINEARGS_H #define JCEF_COMMANDLINEARGS_H #include #include #include "log/Log.h" class CommandLineArgs { public: CommandLineArgs(); bool init(int argc, char* argv[]); bool useTcp() const { return myUseTcp; } bool waitDebugger() const { return myWaitDebugger; } bool deleteRootCacheDir() const { return myDeleteRootCacheDir; } int getPort() const { return myPort; } std::string getPipe() const { return myPathPipe; } std::string getTransportDesc() const { return myUseTcp ? "port " + std::to_string(myPort) : "pipe " + myPathPipe; } std::string getLogFile() const { return myPathLogFile; } std::string getParamsFile() const { return myPathParamsFile; } int getLogLevel() const { return myLogLevel; } int getOpenTransportCooldownMs() const { return myOpenTransportCooldownMs; } private: bool myUseTcp = true; bool myWaitDebugger = false; bool myDeleteRootCacheDir = false; int myPort = 9999; std::string myPathPipe; std::string myPathLogFile; std::string myPathChromiumLogFile; std::string myPathParamsFile; std::string myPathRootCache; int myLogLevel = Log::LEVEL_INFO; int myLogLevelChromium = LOGSEVERITY_DISABLE; int myOpenTransportCooldownMs = 3; std::vector myChromiumSwitches; std::vector> myCustomSchemes; std::vector> myParsedCefSettings; friend class ServerApplication; void prepareCefSettings(void * pCefSettings); }; #endif // JCEF_COMMANDLINEARGS_H