update documentation

This commit is contained in:
John Freed 2021-08-18 11:25:30 +02:00
parent c39b5450ff
commit b846fbe764
3 changed files with 41 additions and 11 deletions

View file

@ -1549,6 +1549,10 @@ public class Manager implements Closeable {
serviceEnvironmentConfig.getCdsMrenclave()); serviceEnvironmentConfig.getCdsMrenclave());
} catch (Quote.InvalidQuoteFormatException | UnauthenticatedQuoteException | SignatureException | UnauthenticatedResponseException | InvalidKeyException e) { } catch (Quote.InvalidQuoteFormatException | UnauthenticatedQuoteException | SignatureException | UnauthenticatedResponseException | InvalidKeyException e) {
throw new IOException(e.getMessage()); throw new IOException(e.getMessage());
/* the NumberFormatException is from Java; see SignalServiceAccountManager.java
* in the package org.whispersystems.signalservice.api
*/
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw new InvalidNumberException(e.getMessage()); throw new InvalidNumberException(e.getMessage());
} }

View file

@ -302,11 +302,6 @@ isGroupBlocked(base64GroupId<s>) -> state<b>::
Exceptions: None; for unknown groups false is returned Exceptions: None; for unknown groups false is returned
version() -> version<s>::
* version : Version string of signal-cli
Exceptions: None
isRegistered(number<s>) -> result<b>:: isRegistered(number<s>) -> result<b>::
isRegistered(numbers<as>) -> results<ab>:: isRegistered(numbers<as>) -> results<ab>::
* number : Phone number * number : Phone number
@ -316,70 +311,101 @@ isRegistered(numbers<as>) -> results<ab>::
Exception: InvalidNumber for an incorrectly formatted phone number. For unknown numbers, false is returned, but no exception is raised. Exception: InvalidNumber for an incorrectly formatted phone number. For unknown numbers, false is returned, but no exception is raised.
listIdentity(number<s>) -> results<a(ssss)>:: listIdentity(number<s>) -> identities<a(ssss)>::
* number : Phone number * number : Phone number
* results : Array of elements, each consisting of four strings: trust_level, date_added, fingerprint, safety_number * identities : Array of elements, each consisting of four strings: trust_level, date_added, fingerprint, safety_number
** trust_level : String representation of trust level ** trust_level : String representation of trust level
** date_added : String representation of date added ** date_added : String representation of date added
** fingerprint : String representation of hexidecimal fingerprint ** fingerprint : String representation of hexidecimal fingerprint
** safety_number : String representation of safety number (10 or 11 space-separated six-digit numbers) ** safety_number : String representation of safety number (10 or 11 space-separated six-digit numbers)
Exception: InvalidNumber
getObjectPath() -> objectPath<s>:: getObjectPath() -> objectPath<s>::
* objectPath : The DBus object path associated with this connection * objectPath : The DBus object path associated with this connection
Exceptions: None
updateAccount() -> <>:: updateAccount() -> <>::
Updates the account attributes on the Signal server. Updates the account attributes on the Signal server.
getObjectPath() -> objectPath<s>:: Exception: Failure
* objectPath : The DBus object path associated with this connection
version() -> version<s>:: version() -> version<s>::
* version : Version string of signal-cli * version : Version string of signal-cli
Exceptions: None
link() -> deviceLinkUri<s>:: link() -> deviceLinkUri<s>::
link(newDeviceName<s>) -> deviceLinkUri<s>:: link(newDeviceName<s>) -> deviceLinkUri<s>::
* newDeviceName : Name to give new device (defaults to "cli" if no name is given) * newDeviceName : Name to give new device (defaults to "cli" if no name is given)
* deviceLinkUri : URI of newly linked device * deviceLinkUri : URI of newly linked device
Exception: Failure
addDevice(deviceUri<s>) -> <>:: addDevice(deviceUri<s>) -> <>::
* deviceUri : URI in the form of tsdevice:/?uuid=... Normally received from Signal desktop or smartphone app * deviceUri : URI in the form of tsdevice:/?uuid=... Normally received from Signal desktop or smartphone app
Exception: Failure
listDevices() -> devices<as>:: listDevices() -> devices<as>::
* devices : String array of linked devices * devices : String array of linked devices
Exception: Failure
removeDevice(deviceId<i>) -> <>:: removeDevice(deviceId<i>) -> <>::
* deviceId : Device ID to remove, obtained from listDevices() command * deviceId : Device ID to remove, obtained from listDevices() command
Exception: Failure
register(number<s>, voiceVerification<b>) -> <>:: register(number<s>, voiceVerification<b>) -> <>::
* number : Phone number * number : Phone number
* voiceVerification : true = use voice verification; false = use SMS verification * voiceVerification : true = use voice verification; false = use SMS verification
Exceptions: Failure, InvalidNumber, RequiresCaptcha
registerWithCaptcha(number<s>, voiceVerification<b>, captcha<s>) -> <>:: registerWithCaptcha(number<s>, voiceVerification<b>, captcha<s>) -> <>::
* number : Phone number * number : Phone number
* voiceVerification : true = use voice verification; false = use SMS verification * voiceVerification : true = use voice verification; false = use SMS verification
* captcha : Captcha string * captcha : Captcha string
Exceptions: Failure, InvalidNumber, RequiresCaptcha
unregister() -> <>::
Unregisters the current device from the Signal server and kills the daemon.
Exception: Failure
setPin(pin<s>) -> <>:: setPin(pin<s>) -> <>::
* pin : PIN you set after registration (resets after 7 days of inactivity) * pin : PIN you set after registration (resets after 7 days of inactivity)
Sets a registration lock PIN, to prevent others from registering your number. Sets a registration lock PIN, to prevent others from registering your number.
Exception: Failure
removePin() -> <>:: removePin() -> <>::
Removes registration PIN protection. Removes registration PIN protection.
Exception: Failure
verify(number<s>, verificationCode<s>) -> <>:: verify(number<s>, verificationCode<s>) -> <>::
* number : Phone number * number : Phone number
* verificationCode : Code received from Signal after successful registration request * verificationCode : Code received from Signal after successful registration request
Command fails if PIN was set after previous registration; use verifyWithPin instead. Command fails if PIN was set after previous registration; use verifyWithPin instead.
Exception: Failure, InvalidNumber
verifyWithPin(number<s>, verificationCode<s>, pin<s>) -> <>:: verifyWithPin(number<s>, verificationCode<s>, pin<s>) -> <>::
* number : Phone number * number : Phone number
* verificationCode : Code received from Signal after successful registration request * verificationCode : Code received from Signal after successful registration request
* pin : PIN you set with setPin command after verifying previous registration * pin : PIN you set with setPin command after verifying previous registration
Exception: Failure, InvalidNumber
uploadStickerPack(stickerPackPath<s>) -> <>:: uploadStickerPack(stickerPackPath<s>) -> <>::
* stickerPackPath : Path to the sticker pack * stickerPackPath : Path to the sticker pack

View file

@ -195,7 +195,7 @@ public interface Signal extends DBusInterface {
void updateAccount() throws Error.Failure; void updateAccount() throws Error.Failure;
List<String> listIdentity(String number); List<String> listIdentity(String number) throws Error.InvalidNumber;
List<String> getContactNumber(final String name) throws Error.Failure; List<String> getContactNumber(final String name) throws Error.Failure;