ffi: Clean up

This commit is contained in:
Jonas Platte
2023-06-15 11:26:46 +02:00
committed by Jonas Platte
parent 12df1f38ed
commit 52d2fa1a72
6 changed files with 11 additions and 7 deletions

View File

@@ -1,7 +1,5 @@
namespace matrix_sdk_ffi {};
interface TimelineEvent {};
enum SlidingSyncState {
/// Sliding Sync has not started to load anything yet.
"NotLoaded",

View File

@@ -7,6 +7,7 @@ use ruma::events::{
use crate::{room_member::MembershipState, timeline::MessageType, ClientError};
#[derive(uniffi::Object)]
pub struct TimelineEvent(pub(crate) AnySyncTimelineEvent);
#[uniffi::export]

View File

@@ -44,8 +44,11 @@ use matrix_sdk::{
};
use self::{
client::*, error::ClientError, event::*, platform::*, session_verification::*,
task_handle::TaskHandle, timeline::MediaSourceExt,
client::{CreateRoomParameters, RoomPreset, RoomVisibility},
error::ClientError,
session_verification::{SessionVerificationControllerDelegate, SessionVerificationEmoji},
task_handle::TaskHandle,
timeline::MediaSourceExt,
};
uniffi::include_scaffolding!("api");

View File

@@ -117,7 +117,7 @@ fn setup_otlp_tracing_helper(
password: String,
otlp_endpoint: String,
) -> anyhow::Result<()> {
let otlp_tracer = super::create_otlp_tracer(user, password, otlp_endpoint, client_name)?;
let otlp_tracer = create_otlp_tracer(user, password, otlp_endpoint, client_name)?;
let otlp_layer = tracing_opentelemetry::layer().with_tracer(otlp_tracer);
tracing_subscriber::registry()

View File

@@ -8,10 +8,11 @@ use futures_util::{pin_mut, StreamExt};
use ruma::RoomId;
use crate::{
client::Client,
room::Room,
sliding_sync::{RoomListEntry, RoomSubscription, UnreadNotificationsCount},
timeline::EventTimelineItem,
Client, TaskHandle, RUNTIME,
TaskHandle, RUNTIME,
};
#[uniffi::export]

View File

@@ -19,11 +19,12 @@ use matrix_sdk_ui::timeline::SlidingSyncRoomExt;
use tracing::{error, warn};
use crate::{
client::Client,
error::ClientError,
helpers::unwrap_or_clone_arc,
room::{Room, TimelineLock},
timeline::{EventTimelineItem, TimelineDiff, TimelineItem, TimelineListener},
Client, TaskHandle, RUNTIME,
TaskHandle, RUNTIME,
};
#[derive(uniffi::Object)]