mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 02:55:47 -04:00
refactor: Start using UniFFI proc-macro frontend
This commit is contained in:
committed by
Jonas Platte
parent
5faed2e635
commit
f83292fc75
@@ -1,9 +1,6 @@
|
||||
namespace sdk {
|
||||
void setup_tracing(string configuration);
|
||||
|
||||
MediaSource media_source_from_url(string url);
|
||||
MessageEventContent message_event_content_from_markdown(string md);
|
||||
string gen_transaction_id();
|
||||
};
|
||||
|
||||
[Error]
|
||||
@@ -179,15 +176,15 @@ interface HomeserverLoginDetails {
|
||||
|
||||
interface AuthenticationService {
|
||||
constructor(string base_path);
|
||||
|
||||
|
||||
HomeserverLoginDetails? homeserver_details();
|
||||
|
||||
|
||||
[Throws=AuthenticationError]
|
||||
void configure_homeserver(string server_name);
|
||||
|
||||
|
||||
[Throws=AuthenticationError]
|
||||
Client login(string username, string password);
|
||||
|
||||
|
||||
[Throws=AuthenticationError]
|
||||
Client restore_with_access_token(string token, string device_id);
|
||||
};
|
||||
|
||||
@@ -262,6 +262,7 @@ impl Client {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gen_transaction_id() -> String {
|
||||
#[uniffi::export]
|
||||
fn gen_transaction_id() -> String {
|
||||
TransactionId::new().to_string()
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ impl From<anyhow::Error> for ClientError {
|
||||
}
|
||||
}
|
||||
|
||||
#[uniffi::export]
|
||||
fn setup_tracing(configuration: String) {
|
||||
tracing_subscriber::registry()
|
||||
.with(EnvFilter::new(configuration))
|
||||
|
||||
Reference in New Issue
Block a user