1
use std::collections::HashMap;
2

            
3
use serde::{Deserialize, Serialize};
4

            
5
use crate::commands::{
6
    Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
7
};
8

            
9
pub struct Outputs;
10

            
11
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12
pub struct Output {
13
    pub id: u64,
14
    pub name: String,
15
    pub plugin: String,
16
    pub enabled: bool,
17
    pub attribute: HashMap<String, String>,
18
}
19

            
20
pub type OutputsResponse = Vec<Output>;
21

            
22
impl Command for Outputs {
23
    type Response = OutputsResponse;
24
    const COMMAND: &'static str = "outputs";
25

            
26
    fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
27
        debug_assert!(parts.next().is_none());
28
        Ok((Request::Outputs, ""))
29
    }
30

            
31
    fn parse_response(
32
        _parts: ResponseAttributes<'_>,
33
    ) -> Result<Self::Response, ResponseParserError> {
34
        unimplemented!()
35
    }
36
}