mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-02-10 08:53:08 +00:00
chore: isolate ffi functions
This commit is contained in:
parent
2e48e49a9a
commit
0ca0bb9548
@ -1,7 +1,7 @@
|
||||
use std::{collections::HashMap, rc::Rc, sync::Arc};
|
||||
|
||||
use crate::{
|
||||
dm::common::{HasConversationId, OutboundSession, SessionRegistry},
|
||||
common::{HasConversationId, OutboundSession, SessionRegistry},
|
||||
errors::ChatError,
|
||||
identity::Identity,
|
||||
inbox::Inbox,
|
||||
|
||||
@ -1,2 +1 @@
|
||||
pub mod common;
|
||||
pub mod privatev1;
|
||||
|
||||
@ -6,7 +6,7 @@ use crypto::SecretKey;
|
||||
use prost::{Message, bytes::Bytes};
|
||||
|
||||
use crate::{
|
||||
dm::common::{HasConversationId, OutboundSession, SessionId},
|
||||
common::{HasConversationId, OutboundSession, SessionId},
|
||||
errors::ChatError,
|
||||
types::AddressedEncryptedPayload,
|
||||
utils::timestamp_millis,
|
||||
|
||||
1
conversations/src/ffi/mod.rs
Normal file
1
conversations/src/ffi/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod api;
|
||||
@ -7,8 +7,8 @@ use std::rc::Rc;
|
||||
|
||||
use crypto::{PrekeyBundle, SecretKey};
|
||||
|
||||
use crate::common::{HasConversationId, InboundSessionHandler, OutboundSession, SessionId};
|
||||
use crate::context::Introduction;
|
||||
use crate::dm::common::{HasConversationId, InboundSessionHandler, OutboundSession, SessionId};
|
||||
use crate::dm::privatev1::PrivateV1Convo;
|
||||
use crate::errors::ChatError;
|
||||
use crate::identity::Identity;
|
||||
|
||||
@ -1,20 +1,23 @@
|
||||
mod api;
|
||||
mod context;
|
||||
pub mod common;
|
||||
pub mod dm;
|
||||
mod errors;
|
||||
mod group;
|
||||
mod identity;
|
||||
pub mod ffi;
|
||||
pub mod group;
|
||||
pub mod inbox;
|
||||
|
||||
mod context;
|
||||
mod errors;
|
||||
mod identity;
|
||||
mod proto;
|
||||
mod types;
|
||||
mod utils;
|
||||
|
||||
pub use api::*;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use super::*;
|
||||
use crate::ffi::api::{
|
||||
create_context, create_intro_bundle, create_new_private_convo, destroy_context,
|
||||
handle_payload,
|
||||
};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[test]
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
use crate::proto::{self, Message};
|
||||
|
||||
// FFI Type definitions
|
||||
|
||||
// This struct represents Outbound data.
|
||||
// It wraps an encoded payload with a delivery address, so it can be handled by the delivery service.
|
||||
pub struct AddressedEnvelope {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user