Files
pmomusic/pmoupnp/src/lib.rs

34 lines
560 B
Rust
Raw Normal View History

2025-09-16 21:07:44 +02:00
mod object_trait;
2025-10-02 18:39:32 +02:00
mod object_set;
2025-09-16 21:07:44 +02:00
2025-10-02 18:39:32 +02:00
pub mod actions;
pub mod mediarenderer;
2025-10-01 07:42:16 +02:00
pub mod server;
2025-10-02 18:39:32 +02:00
// pub mod services;
2025-09-16 21:07:44 +02:00
pub mod state_variables;
pub mod value_ranges;
2025-10-01 07:42:16 +02:00
pub mod variable_types;
2025-09-16 21:07:44 +02:00
2025-10-01 20:49:50 +02:00
2025-10-02 18:39:32 +02:00
use std::{collections::HashMap, sync::Arc};
use tokio::sync::RwLock;
pub use crate::object_trait::*;
2025-09-16 21:07:44 +02:00
2025-10-02 18:39:32 +02:00
#[derive(Debug, Clone)]
2025-09-16 21:07:44 +02:00
pub struct UpnpObjectType {
name: String,
object_type: String,
2025-10-01 07:42:16 +02:00
}
2025-10-02 18:39:32 +02:00
#[derive(Debug)]
pub struct UpnpObjectSet<T: UpnpTypedObject> {
objects: RwLock<HashMap<String, Arc<T>>>,
}
pub enum UpnpObjectSetError {
AlreadyExists(String),
}