mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-24 08:36:10 -04:00
refactor: Move event_cache_store/ to event_cache/store/ in matrix-sdk-base.
This commit is contained in:
@@ -70,7 +70,7 @@ use crate::RoomMemberships;
|
||||
use crate::{
|
||||
deserialized_responses::{RawAnySyncOrStrippedTimelineEvent, SyncTimelineEvent},
|
||||
error::{Error, Result},
|
||||
event_cache_store::EventCacheStoreLock,
|
||||
event_cache::store::EventCacheStoreLock,
|
||||
response_processors::AccountDataProcessor,
|
||||
rooms::{
|
||||
normal::{RoomInfoNotableUpdate, RoomInfoNotableUpdateReasons},
|
||||
|
||||
15
crates/matrix-sdk-base/src/event_cache/mod.rs
Normal file
15
crates/matrix-sdk-base/src/event_cache/mod.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub mod store;
|
||||
@@ -193,7 +193,7 @@ impl EventCacheStoreIntegrationTests for DynEventCacheStore {
|
||||
///
|
||||
/// ## Usage Example:
|
||||
/// ```no_run
|
||||
/// # use matrix_sdk_base::event_cache_store::{
|
||||
/// # use matrix_sdk_base::event_cache::store::{
|
||||
/// # EventCacheStore,
|
||||
/// # MemoryStore as MyStore,
|
||||
/// # Result as EventCacheStoreResult,
|
||||
@@ -217,7 +217,9 @@ macro_rules! event_cache_store_integration_tests {
|
||||
() => {
|
||||
mod event_cache_store_integration_tests {
|
||||
use matrix_sdk_test::async_test;
|
||||
use $crate::event_cache_store::{EventCacheStoreIntegrationTests, IntoEventCacheStore};
|
||||
use $crate::event_cache::store::{
|
||||
EventCacheStoreIntegrationTests, IntoEventCacheStore,
|
||||
};
|
||||
|
||||
use super::get_event_cache_store;
|
||||
|
||||
@@ -249,7 +251,7 @@ macro_rules! event_cache_store_integration_tests_time {
|
||||
use std::time::Duration;
|
||||
|
||||
use matrix_sdk_test::async_test;
|
||||
use $crate::event_cache_store::IntoEventCacheStore;
|
||||
use $crate::event_cache::store::IntoEventCacheStore;
|
||||
|
||||
use super::get_event_cache_store;
|
||||
|
||||
@@ -28,7 +28,7 @@ mod client;
|
||||
pub mod debug;
|
||||
pub mod deserialized_responses;
|
||||
mod error;
|
||||
pub mod event_cache_store;
|
||||
pub mod event_cache;
|
||||
pub mod latest_event;
|
||||
pub mod media;
|
||||
pub mod notification_settings;
|
||||
|
||||
@@ -58,7 +58,7 @@ use tokio::sync::{broadcast, Mutex, RwLock};
|
||||
use tracing::warn;
|
||||
|
||||
use crate::{
|
||||
event_cache_store,
|
||||
event_cache::store as event_cache_store,
|
||||
rooms::{normal::RoomInfoNotableUpdate, RoomInfo, RoomState},
|
||||
MinimalRoomMemberEvent, Room, RoomStateFilter, SessionMeta,
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
use deadpool_sqlite::{CreatePoolError, PoolError};
|
||||
#[cfg(feature = "event-cache")]
|
||||
use matrix_sdk_base::event_cache_store::EventCacheStoreError;
|
||||
use matrix_sdk_base::event_cache::store::EventCacheStoreError;
|
||||
#[cfg(feature = "state-store")]
|
||||
use matrix_sdk_base::store::StoreError as StateStoreError;
|
||||
#[cfg(feature = "crypto-store")]
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::{borrow::Cow, fmt, path::Path, sync::Arc};
|
||||
use async_trait::async_trait;
|
||||
use deadpool_sqlite::{Object as SqliteAsyncConn, Pool as SqlitePool, Runtime};
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::EventCacheStore,
|
||||
event_cache::store::EventCacheStore,
|
||||
media::{MediaRequestParameters, UniqueKey},
|
||||
};
|
||||
use matrix_sdk_store_encryption::StoreCipher;
|
||||
@@ -279,7 +279,7 @@ mod tests {
|
||||
};
|
||||
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::{EventCacheStore, EventCacheStoreError},
|
||||
event_cache::store::{EventCacheStore, EventCacheStoreError},
|
||||
event_cache_store_integration_tests, event_cache_store_integration_tests_time,
|
||||
media::{MediaFormat, MediaRequestParameters, MediaThumbnailSettings},
|
||||
};
|
||||
@@ -387,7 +387,7 @@ mod encrypted_tests {
|
||||
use std::sync::atomic::{AtomicU32, Ordering::SeqCst};
|
||||
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::EventCacheStoreError, event_cache_store_integration_tests,
|
||||
event_cache::store::EventCacheStoreError, event_cache_store_integration_tests,
|
||||
event_cache_store_integration_tests_time,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
@@ -643,7 +643,7 @@ async fn build_indexeddb_store_config(
|
||||
|
||||
let store_config = {
|
||||
tracing::warn!("The IndexedDB backend does not implement an event cache store, falling back to the in-memory event cache store…");
|
||||
store_config.event_cache_store(matrix_sdk_base::event_cache_store::MemoryStore::new())
|
||||
store_config.event_cache_store(matrix_sdk_base::event_cache::store::MemoryStore::new())
|
||||
};
|
||||
|
||||
Ok(store_config)
|
||||
|
||||
@@ -33,7 +33,7 @@ use imbl::Vector;
|
||||
#[cfg(feature = "e2e-encryption")]
|
||||
use matrix_sdk_base::crypto::store::LockableCryptoStore;
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::EventCacheStoreLock,
|
||||
event_cache::store::EventCacheStoreLock,
|
||||
store::{DynStateStore, ServerCapabilities},
|
||||
sync::{Notification, RoomUpdates},
|
||||
BaseClient, RoomInfoNotableUpdate, RoomState, RoomStateFilter, SendOutsideWasm, SessionMeta,
|
||||
|
||||
@@ -25,7 +25,7 @@ use matrix_sdk_base::crypto::{
|
||||
CryptoStoreError, DecryptorError, KeyExportError, MegolmError, OlmError,
|
||||
};
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::EventCacheStoreError, Error as SdkBaseError, QueueWedgeError, RoomState,
|
||||
event_cache::store::EventCacheStoreError, Error as SdkBaseError, QueueWedgeError, RoomState,
|
||||
StoreError,
|
||||
};
|
||||
use reqwest::Error as ReqwestError;
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
//! no thumbnails):
|
||||
//!
|
||||
//! - The file's content is immediately cached in the
|
||||
//! [`matrix_sdk_base::event_cache_store::EventCacheStore`], using an MXC ID
|
||||
//! [`matrix_sdk_base::event_cache::store::EventCacheStore`], using an MXC ID
|
||||
//! that is temporary and designates a local URI without any possible doubt.
|
||||
//! - An initial media event is created and uses this temporary MXC ID, and
|
||||
//! propagated as a local echo for an event.
|
||||
@@ -139,7 +139,7 @@ use std::{
|
||||
|
||||
use as_variant::as_variant;
|
||||
use matrix_sdk_base::{
|
||||
event_cache_store::EventCacheStoreError,
|
||||
event_cache::store::EventCacheStoreError,
|
||||
media::MediaRequestParameters,
|
||||
store::{
|
||||
ChildTransactionId, DependentQueuedRequest, DependentQueuedRequestKind,
|
||||
|
||||
Reference in New Issue
Block a user