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-10 11:50:27 +02:00
|
|
|
pub mod upnp_server;
|
|
|
|
|
pub mod upnp_api;
|
2025-10-02 18:39:32 +02:00
|
|
|
pub mod actions;
|
2025-10-05 21:58:36 +02:00
|
|
|
pub mod devices;
|
2025-10-05 14:35:44 +02:00
|
|
|
pub mod services;
|
2025-10-06 12:05:56 +02:00
|
|
|
pub mod soap;
|
|
|
|
|
pub mod ssdp;
|
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-06 20:24:04 +02:00
|
|
|
|
2025-10-06 06:01:41 +02:00
|
|
|
|
2025-10-01 20:49:50 +02:00
|
|
|
|
2025-10-02 18:39:32 +02:00
|
|
|
use std::{collections::HashMap, sync::Arc};
|
|
|
|
|
|
2025-10-03 21:19:14 +02:00
|
|
|
use std::sync::RwLock;
|
2025-10-02 18:39:32 +02:00
|
|
|
|
|
|
|
|
pub use crate::object_trait::*;
|
2025-10-10 11:50:27 +02:00
|
|
|
pub use crate::upnp_server::UpnpServer;
|
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>>>,
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-05 14:35:44 +02:00
|
|
|
#[derive(Debug)]
|
2025-10-02 18:39:32 +02:00
|
|
|
pub enum UpnpObjectSetError {
|
|
|
|
|
AlreadyExists(String),
|
|
|
|
|
}
|
|
|
|
|
|