2025-10-02 18:39:32 +02:00
|
|
|
mod object_set;
|
2025-10-19 13:42:29 +02:00
|
|
|
mod object_trait;
|
2025-09-16 21:07:44 +02:00
|
|
|
|
2025-10-02 18:39:32 +02:00
|
|
|
pub mod actions;
|
2025-11-07 08:09:20 +00:00
|
|
|
pub mod cache_registry;
|
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;
|
2025-10-19 13:42:29 +02:00
|
|
|
pub mod upnp_api;
|
|
|
|
|
pub mod upnp_server;
|
2025-09-16 21:07:44 +02:00
|
|
|
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-03 21:19:14 +02:00
|
|
|
use std::sync::RwLock;
|
2025-10-19 13:42:29 +02:00
|
|
|
use std::{collections::HashMap, sync::Arc};
|
2025-10-02 18:39:32 +02:00
|
|
|
|
2025-11-05 20:48:52 +00:00
|
|
|
// Réexports pour compatibilité (seulement get_*, pas register_*)
|
|
|
|
|
pub use pmoaudiocache::get_audio_cache;
|
|
|
|
|
pub use pmocovers::get_cover_cache;
|
|
|
|
|
|
2025-10-02 18:39:32 +02:00
|
|
|
pub use crate::object_trait::*;
|
2025-10-17 13:12:28 +02:00
|
|
|
pub use crate::upnp_server::UpnpServerExt;
|
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-11-28 23:13:59 +01:00
|
|
|
order: RwLock<Vec<String>>,
|
2025-10-02 18:39:32 +02:00
|
|
|
}
|
|
|
|
|
|
2025-10-05 14:35:44 +02:00
|
|
|
#[derive(Debug)]
|
2025-10-02 18:39:32 +02:00
|
|
|
pub enum UpnpObjectSetError {
|
|
|
|
|
AlreadyExists(String),
|
|
|
|
|
}
|