// -*- coding: utf-8 -*- // // Simple CMS // // Copyright (C) 2011-2024 Michael Büsch // // Licensed under the Apache License version 2.0 // or the MIT license, at your option. // SPDX-License-Identifier: Apache-2.0 OR MIT #![forbid(unsafe_code)] use cms_ident::Ident; use cms_socket::impl_msg_serde; use serde::{Deserialize, Serialize}; pub const SOCK_FILE: &str = "cms-fsd.sock"; #[derive(Serialize, Deserialize, Clone, Debug)] pub enum Msg { // Getters GetPage { path: Ident, get_title: bool, get_data: bool, get_stamp: bool, get_prio: bool, //TODO remove this get_redirect: bool, get_nav_stop: bool, //TODO move this to GetSubPages get_nav_label: bool, //TODO remove this }, GetHeaders { path: Ident, }, GetSubPages { path: Ident, }, GetMacro { parent: Ident, name: Ident, }, GetString { name: Ident, }, GetImage { name: Ident, }, // Values Page { title: Option>, data: Option>, stamp: Option, prio: Option, redirect: Option>, nav_stop: Option, nav_label: Option>, }, Headers { data: Vec, }, SubPages { names: Vec>, nav_labels: Vec>, prios: Vec, }, Macro { data: Vec, }, String { data: Vec, }, Image { data: Vec, }, } impl_msg_serde!(Msg, 0x8F5755D6); // vim: ts=4 sw=4 expandtab