remove actions

This commit is contained in:
Candifloss 2024-10-17 15:02:17 +05:30
parent 58aed0897d
commit e71891343c
3 changed files with 7 additions and 5 deletions

View File

@ -20,8 +20,10 @@ where
map.serialize(serializer) map.serialize(serializer)
} }
pub fn serialize_hints<S>(hints: &HashMap<String, OwnedValue>, serializer: Serializer) -> Result<S::Ok, S::Error> pub fn serialize_hints<S>(
{ hints: &HashMap<String, OwnedValue>,
serializer: Serializer,
) -> Result<S::Ok, S::Error> {
let mut hint_map = serde_json::Map::new(); let mut hint_map = serde_json::Map::new();
for hint in hints { for hint in hints {
@ -30,7 +32,7 @@ pub fn serialize_hints<S>(hints: &HashMap<String, OwnedValue>, serializer: Seria
let sig = hint_val.value_signature(); let sig = hint_val.value_signature();
let val = hint_val.try_clone(); let val = hint_val.try_clone();
h.insert(sig.to_string(), serde_json::Value::String(val)); h.insert(sig.to_string(), serde_json::Value::String(val));
hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone())); hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone()));
} }
} }

View File

@ -109,7 +109,7 @@ async fn main() -> Result<()> {
} }
"GetCapabilities" => { "GetCapabilities" => {
// Client requested server capabilities. Respond with the supported capabilities // Client requested server capabilities. Respond with the supported capabilities
let capabilities = vec!["actions", "body", "body-hyperlinks"]; // Add more LATER let capabilities = vec![/*"actions",*/ "body", "body-hyperlinks"]; // Add more LATER
connection.reply(&msg, &capabilities).await?; connection.reply(&msg, &capabilities).await?;
if verbose { if verbose {
println!("Request received: {member}\n\tCapabilities: {capabilities:?}"); println!("Request received: {member}\n\tCapabilities: {capabilities:?}");

View File

@ -1,4 +1,4 @@
use crate::formats::serde::{serialize_actions,serialize_hints}; use crate::formats::serde::{serialize_actions, serialize_hints};
use serde::Serialize; use serde::Serialize;
use std::collections::HashMap; use std::collections::HashMap;
use zbus::{message::Body, Result}; use zbus::{message::Body, Result};