remove actions
This commit is contained in:
		
							parent
							
								
									58aed0897d
								
							
						
					
					
						commit
						e71891343c
					
				@ -20,8 +20,10 @@ where
 | 
			
		||||
    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();
 | 
			
		||||
 | 
			
		||||
    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 val = hint_val.try_clone();
 | 
			
		||||
            h.insert(sig.to_string(), serde_json::Value::String(val));
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone()));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -109,7 +109,7 @@ async fn main() -> Result<()> {
 | 
			
		||||
                }
 | 
			
		||||
                "GetCapabilities" => {
 | 
			
		||||
                    // 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?;
 | 
			
		||||
                    if verbose {
 | 
			
		||||
                        println!("Request received: {member}\n\tCapabilities: {capabilities:?}");
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
use crate::formats::serde::{serialize_actions,serialize_hints};
 | 
			
		||||
use crate::formats::serde::{serialize_actions, serialize_hints};
 | 
			
		||||
use serde::Serialize;
 | 
			
		||||
use std::collections::HashMap;
 | 
			
		||||
use zbus::{message::Body, Result};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user