rdpei.h (2931B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * Extended Input channel server-side definitions 4 * 5 * Copyright 2014 Thincast Technologies Gmbh. 6 * Copyright 2014 David FORT <contact@hardening-consulting.com> 7 * Copyright 2015 Thincast Technologies GmbH 8 * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com> 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 */ 22 23#ifndef FREERDP_CHANNEL_RDPEI_SERVER_H 24#define FREERDP_CHANNEL_RDPEI_SERVER_H 25 26#include <freerdp/channels/wtsvc.h> 27#include <freerdp/channels/rdpei.h> 28 29typedef struct _rdpei_server_context RdpeiServerContext; 30typedef struct _rdpei_server_private RdpeiServerPrivate; 31 32struct _rdpei_server_context 33{ 34 HANDLE vcm; 35 36 RdpeiServerPrivate* priv; 37 38 UINT32 clientVersion; 39 UINT16 maxTouchPoints; 40 UINT32 protocolFlags; 41 42 /** callbacks that can be set by the user */ 43 UINT (*onClientReady)(RdpeiServerContext* context); 44 UINT (*onTouchEvent)(RdpeiServerContext* context, const RDPINPUT_TOUCH_EVENT* touchEvent); 45 UINT (*onTouchReleased)(RdpeiServerContext* context, BYTE contactId); 46 47 void* user_data; /* user data, useful for callbacks */ 48 49 UINT (*onPenEvent)(RdpeiServerContext* context, const RDPINPUT_PEN_EVENT* penEvent); 50 51 /** 52 * Callback, when the channel got its id assigned. 53 */ 54 BOOL (*onChannelIdAssigned)(RdpeiServerContext* context, UINT32 channelId); 55}; 56 57#ifdef __cplusplus 58extern "C" 59{ 60#endif 61 62 FREERDP_API RdpeiServerContext* rdpei_server_context_new(HANDLE vcm); 63 FREERDP_API void rdpei_server_context_reset(RdpeiServerContext* context); 64 FREERDP_API void rdpei_server_context_free(RdpeiServerContext* context); 65 FREERDP_API HANDLE rdpei_server_get_event_handle(RdpeiServerContext* context); 66 FREERDP_API UINT rdpei_server_init(RdpeiServerContext* context); 67 FREERDP_API UINT rdpei_server_handle_messages(RdpeiServerContext* context); 68 69#if !defined(DEFINE_NO_DEPRECATED) 70 FREERDP_API WINPR_DEPRECATED(UINT rdpei_server_send_sc_ready(RdpeiServerContext* context, 71 UINT32 version)); 72#endif 73 74 FREERDP_API UINT rdpei_server_send_sc_ready_ex(RdpeiServerContext* context, UINT32 version, 75 UINT32 features); 76 FREERDP_API UINT rdpei_server_suspend(RdpeiServerContext* context); 77 FREERDP_API UINT rdpei_server_resume(RdpeiServerContext* context); 78 79#ifdef __cplusplus 80} 81#endif 82 83#endif /* FREERDP_CHANNEL_RDPEI_SERVER_H */