diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 19:28:50 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-11 19:28:50 +0200 |
commit | 3ea7edf8c9bf7583c426178d4aaff4fb5b736bd2 (patch) | |
tree | ae78ebf9e9d1f70da8a6fdad1504063644ee8f1e /src/include/session.h | |
parent | 1a7c572099edf744d6bb67318cff215de3fcd897 (diff) |
use some enum classes
move ParseResult to recursivedescent.h
Diffstat (limited to 'src/include/session.h')
-rw-r--r-- | src/include/session.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/include/session.h b/src/include/session.h index 6d9ffc1..8712307 100644 --- a/src/include/session.h +++ b/src/include/session.h @@ -38,7 +38,7 @@ namespace Binc { NONAUTHENTICATED = 0x01, AUTHENTICATED = 0x02, SELECTED = 0x04, - LOGOUT = 0x00 + LOGOUT = 0x00, }; CommandLineArgs args; @@ -49,8 +49,9 @@ namespace Binc { std::string getEnv(const std::string &key); void setEnv(const std::string &key, const std::string &value); - int getState() const; - void setState(int n); + Session::State getState() const; + void setState(Session::State n); + bool parseCommandLine(int argc, char *argv[]); void assignCommandLineArgs(); int getWriteBytes() const; @@ -76,14 +77,17 @@ namespace Binc { void setIP(const std::string &ip); void setUserID(const std::string &s); - inline Depot *getDepot() const; + Depot *getDepot() const + { + return depot; + } static Session &getInstance(); bool initialize(int argc, char *argv[]); private: - int state; + Session::State state; std::string userid; std::string ip; char **argv; @@ -107,10 +111,6 @@ namespace Binc { Session(); }; - inline Depot *Session::getDepot() const - { - return depot; - } } #endif |