crypto: Expose the devices publicly.

This commit is contained in:
Damir Jelić 2020-04-21 11:03:28 +02:00
parent 2f7ec887ba
commit 877b880ded
3 changed files with 5 additions and 3 deletions

View file

@ -23,6 +23,7 @@ use crate::api::r0::keys::{DeviceKeys, KeyAlgorithm};
use crate::events::Algorithm;
use crate::identifiers::{DeviceId, UserId};
/// A device represents a E2EE capable client of an user.
#[derive(Debug, Clone)]
pub struct Device {
user_id: Arc<UserId>,

View file

@ -12,15 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
mod error;
// TODO remove this.
mod device;
mod error;
mod machine;
mod memory_stores;
#[allow(dead_code)]
mod olm;
mod store;
pub use device::{Device, TrustState};
pub use error::OlmError;
pub use machine::{OlmMachine, OneTimeKeys};
pub use store::{CryptoStore, CryptoStoreError};

View file

@ -49,6 +49,8 @@ mod crypto;
pub use async_client::{AsyncClient, AsyncClientConfig, SyncSettings};
pub use base_client::Client;
#[cfg(feature = "encryption")]
pub use crypto::{Device, TrustState};
pub use event_emitter::EventEmitter;
pub use models::Room;
pub use request_builder::{MessagesRequestBuilder, RoomBuilder};