moving stuff to config
This commit is contained in:
parent
3b5ad18fa3
commit
09851d0686
3 changed files with 6 additions and 31 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
extern/
|
||||
config.toml
|
||||
|
||||
#Added by cargo
|
||||
#
|
||||
|
|
|
@ -42,10 +42,9 @@ pub struct TargetConfig {
|
|||
username: String,
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn get_config_directory(botname: &str) -> Result<std::path::PathBuf, anyhow::Error> {
|
||||
let mut home = dirs::home_dir().expect("no home directory found");
|
||||
// TODO make this fit LFS guidelines
|
||||
home.push(botname);
|
||||
|
||||
return Ok(home);
|
||||
|
|
|
@ -4,37 +4,12 @@ extern crate gstreamer as gst;
|
|||
use gst::gst_element_error;
|
||||
use gst::prelude::*;
|
||||
|
||||
|
||||
// I don't understand why I need the type length limit
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
||||
use tracing_subscriber;
|
||||
use std::{env, io, process::exit};
|
||||
|
||||
use matrix_sdk::{
|
||||
self,
|
||||
events::{
|
||||
room::message::{MessageEventContent, TextMessageEventContent},
|
||||
room::member::{MemberEventContent}, StrippedStateEvent,
|
||||
SyncMessageEvent, AnySyncMessageEvent, AnySyncMessageEvent::{CallInvite, CallCandidates, CallHangup, CallAnswer},
|
||||
call::invite::InviteEventContent,
|
||||
call::SessionDescription,
|
||||
AnySyncRoomEvent::Message,
|
||||
AnyToDeviceEvent,
|
||||
},
|
||||
identifiers::{DeviceId, RoomId, UserId},
|
||||
Client, ClientConfig, EventEmitter, JsonStore, SyncRoom, SyncSettings, Room,
|
||||
locks::RwLock, CustomEvent,
|
||||
Sas,
|
||||
};
|
||||
|
||||
use matrix_sdk_common::Raw;
|
||||
use url::Url;
|
||||
use dirs;
|
||||
use std::sync::Arc;
|
||||
use anyhow;
|
||||
|
||||
// TBD, how to manage the gstreamer instance/mode/whatever. Throw it in an Arc?
|
||||
// I should use a channel and an async task to work with it since it can be a little weird
|
||||
// and I want it to never be able to block the matrix side of things
|
||||
|
||||
|
||||
pub fn foo() -> Result<i32, anyhow::Error> {
|
||||
// Dummy webrtc pipeline, it sends test sources to the webrtc type
|
||||
|
|
Loading…
Add table
Reference in a new issue