X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/3be1c24b1b18115becfaef1e2ea82c914a1fefea..c924d5c03a318d8c7d4dd7be287eaf0d523ecd91:/client/src/jsonrpc.rs diff --git a/client/src/jsonrpc.rs b/client/src/jsonrpc.rs index cb1b4f8c..6874652d 100644 --- a/client/src/jsonrpc.rs +++ b/client/src/jsonrpc.rs @@ -45,7 +45,24 @@ pub trait Rpc { account: Option, id: String, recipient: Option, - group_id: Option, + #[allow(non_snake_case)] groupId: Option, + ) -> Result; + + #[method(name = "getAvatar", param_kind = map)] + fn get_avatar( + &self, + account: Option, + contact: Option, + profile: Option, + #[allow(non_snake_case)] groupId: Option, + ) -> Result; + + #[method(name = "getSticker", param_kind = map)] + fn get_sticker( + &self, + account: Option, + #[allow(non_snake_case)] packId: String, + #[allow(non_snake_case)] stickerId: u32, ) -> Result; #[method(name = "getUserStatus", param_kind = map)] @@ -53,6 +70,7 @@ pub trait Rpc { &self, account: Option, recipients: Vec, + usernames: Vec, ) -> Result; #[method(name = "joinGroup", param_kind = map)] @@ -230,6 +248,15 @@ pub trait Rpc { stop: bool, ) -> Result; + #[method(name = "sendMessageRequestResponse", param_kind = map)] + fn send_message_request_response( + &self, + account: Option, + recipients: Vec, + #[allow(non_snake_case)] groupIds: Vec, + r#type: String, + ) -> Result; + #[method(name = "setPin", param_kind = map)] fn set_pin(&self, account: Option, pin: String) -> Result; @@ -284,6 +311,8 @@ pub trait Rpc { account: Option, deviceName: Option, unrestrictedUnidentifiedSender: Option, + discoverableByNumber: Option, + numberSharing: Option, ) -> Result; #[method(name = "updateConfiguration", param_kind = map)] @@ -381,6 +410,7 @@ pub async fn connect_tcp( Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) } +#[cfg(unix)] pub async fn connect_unix( socket_path: impl AsRef, ) -> Result { @@ -389,6 +419,6 @@ pub async fn connect_unix( Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) } -pub async fn connect_http(uri: &str) -> Result { +pub async fn connect_http(uri: &str) -> Result, Error> { HttpClientBuilder::default().build(uri) }