Migrate pmoutils to registry and refactor dependencies

Migrate pmoutils crate to registry version 0.1.2 and update all dependencies to use the registry version instead of local path references. Remove pmoutils from Cargo.lock and Cargo.toml files where it was previously used as a local path dependency. Move ToXmlElement trait to pmodidl crate and update all usages to import from pmodidl instead of pmoutils. Fix parameter order in find_process_using_port function call.
This commit is contained in:
2026-03-01 21:43:00 +01:00
parent f9cd3063fb
commit 5b8642a70b
18 changed files with 31 additions and 480 deletions

View File

@@ -10,5 +10,4 @@ utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
quick-xml = { workspace = true }
bevy_reflect = "0.17.1"
bevy_reflect_derive = "0.17.1"
pmoutils = { path = "../pmoutils" }
xmltree = "0.10"

View File

@@ -3,14 +3,31 @@
//! Parser et utilitaires pour le format DIDL-Lite utilisé dans UPnP/DLNA.
use bevy_reflect::Reflect;
use pmoutils::ToXmlElement;
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
use std::collections::HashSet;
use std::fmt::Write;
use std::io::Cursor;
use std::time::SystemTime;
use xmltree::{Element, XMLNode};
use xmltree::{Element, EmitterConfig, XMLNode};
/// Trait générique pour obtenir un élément XML (xmltree::Element).
pub trait ToXmlElement {
/// Convertit l'objet en élément XML.
fn to_xml_element(&self) -> Element;
/// Sérialise en chaîne XML formatée.
fn to_xml(&self) -> String {
let elem = self.to_xml_element();
let config = EmitterConfig::new()
.perform_indent(true)
.indent_string(" ");
let mut buf = Vec::new();
elem.write_with_config(&mut buf, config)
.expect("Failed to write XML");
String::from_utf8(buf).expect("Invalid UTF-8")
}
}
// ============= Couche d'abstraction générique =============