kdeconnect-proto 0.2.0

A pure Rust modular implementation of the KDE Connect protocol
Documentation
//! The Presenter plugin allows sending and receiving simple 'pings', with an optional message. Usually these are displayed as notifications.
use serde::{Deserialize, Serialize};

/// This packet is a presentation remote event.
///
/// <https://invent.kde.org/network/kdeconnect-meta/blob/master/protocol.md#kdeconnectpresenter>
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct PresenterPacket {
    /// A double precision integer indicating a position delta on the X-axis.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub dx: Option<u64>,

    /// A double precision integer indicating a position delta on the Y-axis.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub dy: Option<u64>,

    /// Stop controlling the virtual pointer.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub stop: Option<bool>,
}