Files
crossdesk/apps/desktop/src/gui/runtime/peer_transport.h
T
dijunkun 4f37422317 [feat] unify Windows unattended hosting with shared device identity
Keep RTC connections in the persistent SYSTEM host and attach GUI session features through an authenticated local channel. Share device credentials, settings and trusted devices, and use the service for Windows boot startup.

Unify normal and secure desktop capture fallback, recover virtual displays, and coordinate cursor ownership across desktop transitions. Update localization, documentation and the MiniRTC dependency.

Validated with git diff --check and localization catalog JSON parsing. Builds and runtime tests were not run.
2026-11-09 14:13:17 +08:00

34 lines
1.2 KiB
C++

/*
* @Author: DI JUNKUN
* @Date: 2026-11-09
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _PEER_TRANSPORT_H_
#define _PEER_TRANSPORT_H_
#include <minirtc.h>
#include <nlohmann/json.hpp>
#include <functional>
namespace crossdesk {
// A managed GUI has a local endpoint instead of another signaling login.
// Viewer peers and direct LAN peers continue to use MiniRTC normally.
void BindLocalPeer(MiniRtcPeerPtr*, std::function<bool(nlohmann::json)> send);
void UnbindLocalPeer(MiniRtcPeerPtr*);
bool IsLocalPeer(MiniRtcPeerPtr*);
int PeerSendReliableDataFrameToPeer(MiniRtcPeerPtr*, const char*, size_t,
const char*, const char*, size_t);
int PeerSendAudioFrameToPeer(MiniRtcPeerPtr*, const MiniRtcAudioFrame*,
const char*, const char*, size_t);
int PeerSendVideoFrameToPeer(MiniRtcPeerPtr*, const MiniRtcVideoFrame*,
const char*, const char*, size_t);
int PeerSendSignalMessage(MiniRtcPeerPtr*, const char*, size_t);
int PeerReconnectSignal(MiniRtcPeerPtr*);
int PeerDisconnectPeerConnection(MiniRtcPeerPtr*, const char*, const char*);
int PeerUpdateConnectionSettings(MiniRtcPeerPtr*, bool, bool, MiniRtcTurnMode);
} // namespace crossdesk
#endif