| 1 | // Copyright 2020 Damir Jelić |
| 2 | // Copyright 2020 The Matrix.org Foundation C.I.C. |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | |
| 16 | #![recursion_limit = "256"] |
| 17 | #![doc = include_str!("../README.md")] |
| 18 | #![warn(missing_debug_implementations, missing_docs)] |
| 19 | #![cfg_attr(target_family = "wasm", allow(clippy::arc_with_non_send_sync))] |
| 20 | #![cfg_attr(docsrs, feature(doc_cfg))] |
| 21 | |
| 22 | pub use async_trait::async_trait; |
| 23 | pub use bytes; |
| 24 | pub use matrix_sdk_base::{ |
| 25 | CallIntentConsensus, ComposerDraft, ComposerDraftType, DraftAttachment, DraftAttachmentContent, |
| 26 | DraftThumbnail, EncryptionState, PredecessorRoom, QueueWedgeError, Room as BaseRoom, |
| 27 | RoomCreateWithCreatorEventContent, RoomDisplayName, RoomHero, RoomInfo, |
| 28 | RoomMember as BaseRoomMember, RoomMemberships, RoomRecencyStamp, RoomState, SessionMeta, |
| 29 | StateChanges, StateStore, StoreError, SuccessorRoom, ThreadingSupport, deserialized_responses, |
| 30 | store::{self, DynStateStore, MemoryStore, StateStoreExt}, |
| 31 | }; |
| 32 | pub use matrix_sdk_common::*; |
| 33 | pub use reqwest; |
| 34 | |
| 35 | mod account; |
| 36 | pub mod attachment; |
| 37 | pub mod authentication; |
| 38 | mod client; |
| 39 | pub mod config; |
| 40 | mod deduplicating_handler; |
| 41 | #[cfg(feature = "e2e-encryption")] |
| 42 | pub mod encryption; |
| 43 | mod error; |
| 44 | pub mod event_cache; |
| 45 | pub mod event_handler; |
| 46 | mod http_client; |
| 47 | pub mod latest_events; |
| 48 | pub mod media; |
| 49 | pub mod notification_settings; |
| 50 | pub mod paginators; |
| 51 | pub mod pusher; |
| 52 | pub mod room; |
| 53 | pub mod room_directory_search; |
| 54 | pub mod room_preview; |
| 55 | pub mod send_queue; |
| 56 | pub mod utils; |
| 57 | pub mod futures { |
| 58 | //! Named futures returned from methods on types in [the crate root][crate]. |
| 59 | |
| 60 | pub use super::client::futures::SendRequest; |
| 61 | } |
| 62 | pub mod sliding_sync; |
| 63 | pub mod sync; |
| 64 | #[cfg(feature = "experimental-widgets")] |
| 65 | pub mod widget; |
| 66 | |
| 67 | #[cfg(feature = "experimental-search")] |
| 68 | pub mod message_search; |
| 69 | |
| 70 | pub use account::Account; |
| 71 | pub use authentication::{AuthApi, AuthSession, SessionTokens}; |
| 72 | pub use client::homeserver_capabilities::HomeserverCapabilities; |
| 73 | #[cfg(feature = "experimental-search")] |
| 74 | pub mod search_index; |
| 75 | pub use client::{ |
| 76 | Client, ClientBuildError, ClientBuilder, LoopCtrl, ServerVendorInfo, SessionChange, StoreSizes, |
| 77 | TileServerInfo, sanitize_server_name, |
| 78 | }; |
| 79 | pub use error::{ |
| 80 | BeaconError, Error, HttpError, HttpResult, NotificationSettingsError, RefreshTokenError, |
| 81 | Result, RumaApiError, |
| 82 | }; |
| 83 | pub use http_client::TransmissionProgress; |
| 84 | #[cfg(all(feature = "e2e-encryption", feature = "sqlite"))] |
| 85 | pub use matrix_sdk_sqlite::SqliteCryptoStore; |
| 86 | #[cfg(feature = "sqlite")] |
| 87 | pub use matrix_sdk_sqlite::{ |
| 88 | STATE_STORE_DATABASE_NAME, SqliteEventCacheStore, SqliteMediaStore, SqliteStateStore, |
| 89 | SqliteStoreConfig, |
| 90 | }; |
| 91 | pub use media::Media; |
| 92 | pub use pusher::Pusher; |
| 93 | pub use room::Room; |
| 94 | pub use ruma::{IdParseError, OwnedServerName, ServerName}; |
| 95 | pub use sliding_sync::{ |
| 96 | SlidingSync, SlidingSyncBuilder, SlidingSyncList, SlidingSyncListBuilder, |
| 97 | SlidingSyncListLoadingState, SlidingSyncMode, UpdateSummary, |
| 98 | }; |
| 99 | |
| 100 | #[cfg(feature = "uniffi")] |
| 101 | uniffi::setup_scaffolding!(); |
| 102 | |
| 103 | pub mod live_locations_observer; |
| 104 | #[cfg(any(test, feature = "testing"))] |
| 105 | pub mod test_utils; |
| 106 | |
| 107 | #[cfg(test)] |
| 108 | matrix_sdk_test_utils::init_tracing_for_tests!(); |