Browse Source

adjust GUI-CLI protocol to include notifications and extendedstatus

Missingmew 4 years ago
parent
commit
7e6cc0b539
1 changed files with 70 additions and 2 deletions
  1. 70 2
      GUI-CLI Protocol.md

+ 70 - 2
GUI-CLI Protocol.md

@@ -201,7 +201,6 @@ If `cancel` is `true` then the download of the file is canceled and an error mes
 
 Requests the deletion of a file from the server.
 
-#### 2.5.1  - request file list download
 GUI:
 ```
 write: "deletefile" file_name
@@ -217,9 +216,78 @@ CLI:
 ```
 If `accept` is `true` the command is valid and the server has deleted the file. Else the request was rejected no changes have been made. `error` should contain an error string in that case.
 
+### 2.6 Deleteme command
 
-### TODO
+The `deleteme` command allows a logged in user to delete their account on the server. This action needs to be confirmed with the users password.
 
+GUI:
+```
+write: "deleteme" password
+```
+CLI:
+```
+{
+	"command": "deleteme",
+	"accept": bool,
+	"error": string
+}
+```
+If `accept` is true the user has been deleted and the connection will be closed by the server.
+
+### 2.7 Notifications
+
+The `notifications` command allows the logged in user to get a list of notifications since the last time.
+
+GUI:
+```
+write: "notifications"
+```
+
+CLI:
+```
+{
+	"command": "notifications",
+	"accept": bool,
+	"messages": string[],
+	"error": string
+}
+```
+
+### 2.8 ExtendedStatus
+
+The `extendedstatus` command allows the client to request detailed information about ongoing transfers at the server.
+
+GUI:
+```
+write: "extendedstatus"
+```
+
+CLI:
+```
+{
+    "command": "extendedstatus",
+    "accept": bool,
+    "error": string,
+    "transfersclientserver": {
+        "upload": bool,
+        "file": string,
+        "progress": float
+    }[],
+    "transfersserverserver": {
+        "upload": bool,
+        "file": string,
+        "progress": float,
+        "speed": float,
+        "method": string
+    }[]
+}
+```
+The answer consists of an array of objects, each representing a transfer.
+`upload` indicates, wether the transfer is an up- or download.
+`file` contains the name of the file being transferred.
+`progress` contains the percentage completed.
+`speed` contains the speed in bytes per second.
+`method` contains the covert channel method being used.
 
 ## 3. Disconnecting and exiting