use crate::{
core::{PeerScoringPlugin, ScoringConfig, StewardListConfig, StewardListPlugin},
mls_crypto::{KeyPackageBytes, MlsError, MlsService},
};
pub trait ConversationPluginsFactory {
type Mls: MlsService;
type Scoring: PeerScoringPlugin;
type StewardList: StewardListPlugin;
fn create_mls(&self, conversation_id: String) -> Result<Self::Mls, MlsError>;
fn welcome_mls(&self, welcome_bytes: &[u8]) -> Result<Option<Self::Mls>, MlsError>;
fn make_scoring(&self, config: &ScoringConfig) -> Self::Scoring;
fn make_steward_list(
&self,
conversation_id: &[u8],
config: StewardListConfig,
) -> Self::StewardList;
fn generate_key_package(&self) -> Result<KeyPackageBytes, MlsError>;
}