#pragma once #include "platform.h" #include namespace ks { inline constexpr UINT LanInputReadyMessage=WM_APP+67, LanClipboardReadyMessage=WM_APP+68, LanClipboardPublishMessage=WM_APP+69; struct LanClipboard {std::string peer,name,app;Bytes data;DWORD sequence{};}; // Discovery, pairing and optional encrypted input within the resident process. class LanService { struct Impl; std::unique_ptr impl; public: explicit LanService(const std::filesystem::path &, HWND inputWindow=nullptr); ~LanService(); Bytes command(const Bytes &); bool clipboardEnabled() const; void publishClipboard(Bytes, const std::string &); std::vector takeClipboard(); bool inputEnabled() const; bool tickInput(bool allowEnter = true); bool keyboard(const KBDLLHOOKSTRUCT &, bool down); bool mouse(UINT, const MSLLHOOKSTRUCT &, bool allowEnter); bool takeInputChange(); void cancelInput(); }; }