start handle_power_levels

master
Devin R 2020-03-28 07:07:50 -04:00
parent 090600e6aa
commit e8b5534a71
2 changed files with 43 additions and 1 deletions

View File

@ -1,3 +1,44 @@
// Copyright 2020 Damir Jelić
// Copyright 2020 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.
use std::collections::HashMap;
use std::sync::{Arc, RwLock};
use crate::api::r0 as api;
use crate::events::collections::all::{Event, RoomEvent, StateEvent};
use crate::events::room::{
aliases::AliasesEvent,
canonical_alias::CanonicalAliasEvent,
member::{MemberEvent, MemberEventContent, MembershipState},
name::NameEvent,
};
use crate::events::EventResult;
use crate::identifiers::RoomAliasId;
use crate::session::Session;
use crate::models::Room;
use js_int::{Int, UInt};
#[cfg(feature = "encryption")]
use tokio::sync::Mutex;
#[cfg(feature = "encryption")]
use crate::crypto::{OlmMachine, OneTimeKeys};
#[cfg(feature = "encryption")]
use ruma_client_api::r0::keys::{upload_keys::Response as KeysUploadResponse, DeviceKeys};
pub trait EventEmitter {
fn on_room_name() {}
fn on_room_name(&mut self, _: &Room) {}
fn on_room_member(&mut self, _: &Room) {}
}

View File

@ -27,6 +27,7 @@ mod base_client;
mod error;
mod models;
mod session;
mod event_emitter;
#[cfg(feature = "encryption")]
mod crypto;