From 893f264a5e2d2f293c28d5c71b30a57fd1ab820a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Mon, 19 Apr 2021 18:19:34 +0200 Subject: [PATCH] server skeleton done --- server/server.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/server/server.py b/server/server.py index 63f77b6..6101458 100644 --- a/server/server.py +++ b/server/server.py @@ -1,2 +1,27 @@ #!/usr/bin/env python3 +from executor import Executor + + +class Server: + + def __init__(self, homeDirectory: str, sessionTimeout: int = 120, availableServer: bool = True, + currentDirectory: str = ""): + self.isAuthenticated = False + self.homeDirectory = homeDirectory + self.sessionTimeout = sessionTimeout + self.availableServer = availableServer + if currentDirectory == "": + self.currentDirectory = homeDirectory + else: + self.currentDirectory = currentDirectory + self.executor = Executor(homeDirectory) + + def login(username: str, password: str) -> bool: + pass + + def logout() -> None: + pass + + def execute(command: str, firstParam: str, secondParam: str) -> bool: + pass