Windows(C++)[v1.7.5.0]
PanoController.h
浏览该文件的文档.
1
3#pragma once
4
5#include "PanoRtcDefs.h"
6#include <cstddef>
7
9PANORTC_NS_BEGIN
10
12const uint32_t kModifierFlagControl = 1 << 0;
14const uint32_t kModifierFlagShift = 1 << 1;
16const uint32_t kModifierFlagCommand = 1 << 2;
18const uint32_t kModifierFlagCapsLock = 1 << 3;
20const uint32_t kModifierFlagOption = 1 << 4;
21
28{
29 enum class Type
30 {
32 NONE = 0,
34 PRESS_DOWN = 1,
36 PRESS_UP = 2
37 };
46 uint8_t asciiCode{0};
47};
48
56{
57public:
58 class Callback;
59
74 virtual QResult setCallback(Callback *callback) = 0;
94 virtual QResult requestControl(uint64_t userId, bool needElevation) = 0;
111 virtual QResult acceptControl(uint64_t userId) = 0;
128 virtual QResult rejectControl(uint64_t userId) = 0;
145 virtual QResult cancelControl(uint64_t userId) = 0;
162 virtual QResult elevateControlPrivilege(bool elevated) = 0;
183 virtual QResult setModifierFlags(uint64_t userId, uint32_t flags) = 0;
204 virtual QResult sendKeyboardEvent(uint64_t userId, KeyboardEvent &event) = 0;
205
213 {
214 public:
225 virtual void onRemoteControlRequest(uint64_t userId, bool needElevation) {}
236 virtual void onRemoteControlResponse(uint64_t userId, QResult result) {}
247 virtual void onRemoteControlCancelled(uint64_t userId, QResult reason) {}
248
249 virtual ~Callback() {};
250 };
251
252protected:
253 virtual ~RemoteController() {}
254};
255
256PANORTC_NS_END
const uint32_t kModifierFlagOption
Option 修饰键
Definition: PanoController.h:20
const uint32_t kModifierFlagShift
Shift 修饰键
Definition: PanoController.h:14
const uint32_t kModifierFlagCapsLock
CapsLock 修饰键
Definition: PanoController.h:18
const uint32_t kModifierFlagControl
Control 修饰键
Definition: PanoController.h:12
const uint32_t kModifierFlagCommand
Command/Win 修饰键
Definition: PanoController.h:16
QResult
返回值
Definition: PanoRtcDefs.h:54
RemoteController 的回调函数,在使用 RemoteController 之前必须要设置回调以获取事件通知。
Definition: PanoController.h:213
virtual void onRemoteControlResponse(uint64_t userId, QResult result)
用户远程控制请求回应的通知
Definition: PanoController.h:236
virtual void onRemoteControlRequest(uint64_t userId, bool needElevation)
用户远程控制请求通知
Definition: PanoController.h:225
virtual void onRemoteControlCancelled(uint64_t userId, QResult reason)
用户取消远程控制的通知
Definition: PanoController.h:247
RemoteController, 远程控制服务核心接口
Definition: PanoController.h:56
virtual QResult elevateControlPrivilege(bool elevated)=0
提升控制权限,只对 Windows 被控端有效
virtual QResult acceptControl(uint64_t userId)=0
接受用户的远程控制请求
virtual QResult setModifierFlags(uint64_t userId, uint32_t flags)=0
设置键盘修饰符
virtual QResult rejectControl(uint64_t userId)=0
拒绝用户的远程控制请求
virtual QResult sendKeyboardEvent(uint64_t userId, KeyboardEvent &event)=0
发送键盘事件
virtual QResult setCallback(Callback *callback)=0
设置远程控制服务的回调。
virtual QResult requestControl(uint64_t userId, bool needElevation)=0
请求远程控制
virtual QResult cancelControl(uint64_t userId)=0
取消远程控制
键盘事件
Definition: PanoController.h:28
Type
Definition: PanoController.h:30
Type type
Definition: PanoController.h:39
uint8_t asciiCode
Definition: PanoController.h:46