mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
api: Sketch add_transport_from_qr(), add_transport(), list_transports(), delete_transport() APIs (#6589)
Four new APIs `add_transport_from_qr()`, `add_transport()`, `list_transports()`, `delete_transport()`, as described in the draft at "API". The `add_tranport*()` APIs automatically stops and starts I/O; for `configure()` the stopping and starting is done in the JsonRPC bindings, which is not where things like this should be done I think, the bindings should just translate the APIs. This also completely disables AEAP for now. I won't be available for a week, but if you want to merge this already, feel free to just commit all review suggestions and squash-merge.
This commit is contained in:
@@ -695,7 +695,7 @@ struct CreateAccountErrorResponse {
|
||||
/// take a qr of the type DC_QR_ACCOUNT, parse it's parameters,
|
||||
/// download additional information from the contained url and set the parameters.
|
||||
/// on success, a configure::configure() should be able to log in to the account
|
||||
async fn set_account_from_qr(context: &Context, qr: &str) -> Result<()> {
|
||||
pub(crate) async fn set_account_from_qr(context: &Context, qr: &str) -> Result<()> {
|
||||
let url_str = qr
|
||||
.get(DCACCOUNT_SCHEME.len()..)
|
||||
.context("Invalid DCACCOUNT scheme")?;
|
||||
|
||||
Reference in New Issue
Block a user