Gros refactoring

This commit is contained in:
2025-10-02 18:39:32 +02:00
parent 4f999c8a3c
commit 4a0595ecb0
42 changed files with 5903 additions and 461 deletions

View File

@@ -0,0 +1,42 @@
use xmltree::Element;
use crate::{actions::{Argument, ArgumentInstance}, UpnpInstance, UpnpObject, UpnpObjectType, UpnpTyped, UpnpTypedInstance};
impl UpnpObject for ArgumentInstance {
async fn to_xml_element(&self) -> Element {
self.get_model().to_xml_element().await
}
}
impl UpnpTyped for ArgumentInstance {
fn as_upnp_object_type(&self) -> &UpnpObjectType {
return &self.object;
}
}
impl UpnpTypedInstance for ArgumentInstance {
fn get_model(&self) -> &Self::Model {
&self.model
}
}
impl UpnpInstance for ArgumentInstance {
type Model = Argument;
fn new(from: &Argument) -> Self {
Self {
object: UpnpObjectType {
name: from.get_name().clone(),
object_type: "UpnpInstance".to_string(),
},
model: from.clone(),
variable_instance: None,
}
}
}