| 1 | //! A compact application backend contract on top of the Matrix Rust SDK. |
| 2 | |
| 3 | mod encryption; |
| 4 | mod engine; |
| 5 | mod error; |
| 6 | mod model; |
| 7 | mod normalise; |
| 8 | mod transport; |
| 9 | mod uiaa; |
| 10 | mod upload; |
| 11 | |
| 12 | #[cfg(all(feature = "sqlite", target_family = "wasm"))] |
| 13 | compile_error!("sqlite has no filesystem to live on in wasm, use indexeddb"); |
| 14 | #[cfg(all(feature = "indexeddb", not(target_family = "wasm")))] |
| 15 | compile_error!("indexeddb only exists in a browser, use sqlite"); |
| 16 | |
| 17 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 18 | mod account; |
| 19 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 20 | mod session_store; |
| 21 | |
| 22 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 23 | pub use account::{ |
| 24 | AccountError, OAuthApplicationType, OAuthLogin, PasswordLogin, PendingOAuthLogin, Restore, |
| 25 | Session, SessionRecord, SoftLogout, StoreConfig, |
| 26 | }; |
| 27 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 28 | pub use session_store::{EncryptedSessionStore, SessionStore}; |
| 29 | |
| 30 | pub use engine::{Engine, EngineConfig, EngineError}; |
| 31 | pub use error::{Error, ErrorKind}; |
| 32 | pub use imbl; |
| 33 | pub use model::{ |
| 34 | AccountCommand, AttachmentUpload, Change, Command, CommandOutput, ConnectionState, |
| 35 | CreateRoomOptions, EncryptionCommand, EncryptionState, EngineErrorKind, EngineFailure, Event, |
| 36 | EventRef, HistoryState, KeyBackupState, LatestEvent, LifecycleCommand, Media, MediaCommand, |
| 37 | MediaDescriptor, MediaId, MediaKind, MediaSize, MemberFilter, MemberMembership, MemberSummary, |
| 38 | MembershipChange, Message, MessageContent, MessageEditContent, MessageKind, MessageMentions, |
| 39 | NotificationCommand, OwnDevice, PowerLevelChanges, Profile, PushNotification, |
| 40 | PushNotificationEvent, PushNotificationRoom, PushNotificationSender, PushNotificationStatus, |
| 41 | Reaction, RecoveryState, ReplyDetails, ReplyReference, Retain, RichText, RoomCategory, |
| 42 | RoomCommand, RoomHero, RoomListFilter, RoomMatcher, RoomMembership, RoomNotificationMode, |
| 43 | RoomNotificationSettings, RoomPowerLevels, RoomPreset, RoomSummary, RoomVisibility, SendState, |
| 44 | Sender, SpaceChild, Termination, ThreadSummary, TimelineCommand, TimelineContent, TimelineDiff, |
| 45 | TimelineDiffError, TimelineEvent, TimelineId, TimelineItem, TimelineItemId, TypingState, |
| 46 | UploadDetails, UploadOutcome, UploadThumbnail, UtdCause, VerificationAction, |
| 47 | VerificationFailure, VerificationState, VerificationTarget, |
| 48 | }; |
| 49 | pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy}; |
| 50 | pub use uiaa::{ |
| 51 | InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow, |
| 52 | InteractiveAuthOutcome, |
| 53 | }; |