implement Dbus unregister/unlisten methods

implemented two related Dbus methods:
- unregister
- unlisten

improved error handling for Dbus method:
- link

fixed logic error in Manager.java (line 876) because daemon
could still be running after a particular account is unregistered.

broadened WebSocketUnavailableException (line 913) to catch all
IOExceptions caused by unregistering account while daemon is running.

specified error message handling in ProvisioningManager.java and
DbusSignalControlImpl.java for link subcommand.

helper methods:
- getPathConfig in Manager.java
- private removeUserData in DbusSignalImpl.java
This commit is contained in:
John Freed 2021-09-23 16:35:47 +02:00
parent 982e887c9f
commit 10274cdb3f
8 changed files with 210 additions and 11 deletions

View file

@ -114,6 +114,22 @@ sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
Exceptions: Failure, AttachmentInvalid
unlisten() -> <>::
unlisten(keepData<b>) -> <>::
* keepData : true or omitted = keep files in data directory; false = delete files
Stops the current device from listening to DBus. In single-user mode, kills the daemon.
Exception: Failure
unregister() -> <>::
unregister(keepData<b>) -> <>::
* keepData : true or omitted = keep files in data directory; false = delete files
Unregisters the current device. In single-user mode, kills the daemon.
Exception: Failure
sendMessage(message<s>, attachments<as>, recipient<s>) -> timestamp<x>::
sendMessage(message<s>, attachments<as>, recipients<as>) -> timestamp<x>::
* message : Text to send (can be UTF8)