2025-11-15 23:42:12 +00:00
|
|
|
//! Data access layer for iMessage chat.db
|
|
|
|
|
//!
|
2025-11-16 11:50:49 +00:00
|
|
|
//! This library provides a read-only interface to query messages from a
|
|
|
|
|
//! specific conversation.
|
2025-11-15 23:42:12 +00:00
|
|
|
//!
|
|
|
|
|
//! # Safety
|
|
|
|
|
//!
|
|
|
|
|
//! All database connections are opened in read-only mode to prevent any
|
|
|
|
|
//! accidental modifications to your iMessage database.
|
|
|
|
|
//!
|
|
|
|
|
//! # Example
|
|
|
|
|
//!
|
|
|
|
|
//! ```no_run
|
|
|
|
|
//! use lib::ChatDb;
|
|
|
|
|
//!
|
|
|
|
|
//! let db = ChatDb::open("chat.db")?;
|
|
|
|
|
//!
|
|
|
|
|
//! // Get all messages from January 2024 to now
|
|
|
|
|
//! let messages = db.get_our_messages(None, None)?;
|
|
|
|
|
//! println!("Found {} messages", messages.len());
|
|
|
|
|
//! # Ok::<(), lib::ChatDbError>(())
|
|
|
|
|
//! ```
|
|
|
|
|
|
2025-11-16 11:50:49 +00:00
|
|
|
mod db;
|
2025-11-15 23:42:12 +00:00
|
|
|
mod error;
|
|
|
|
|
mod models;
|
2025-11-16 16:34:55 +00:00
|
|
|
pub mod networking;
|
2025-11-16 11:50:16 +00:00
|
|
|
pub mod persistence;
|
2025-11-16 11:50:49 +00:00
|
|
|
pub mod sync;
|
2025-11-15 23:42:12 +00:00
|
|
|
|
|
|
|
|
pub use db::ChatDb;
|
2025-11-16 11:50:49 +00:00
|
|
|
pub use error::{
|
|
|
|
|
ChatDbError,
|
|
|
|
|
Result,
|
|
|
|
|
};
|
|
|
|
|
pub use models::{
|
|
|
|
|
Chat,
|
|
|
|
|
Message,
|
|
|
|
|
};
|