cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

rail.h (7089B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * RAIL Virtual Channel Plugin
      4 *
      5 * Copyright 2019 Mati Shabtay <matishabtay@gmail.com>
      6 *
      7 * Licensed under the Apache License, Version 2.0 (the "License");
      8 * you may not use this file except in compliance with the License.
      9 * You may obtain a copy of the License at
     10 *
     11 *     http://www.apache.org/licenses/LICENSE-2.0
     12 *
     13 * Unless required by applicable law or agreed to in writing, software
     14 * distributed under the License is distributed on an "AS IS" BASIS,
     15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 * See the License for the specific language governing permissions and
     17 * limitations under the License.
     18 */
     19
     20#ifndef FREERDP_CHANNEL_RAIL_SERVER_RAIL_H
     21#define FREERDP_CHANNEL_RAIL_SERVER_RAIL_H
     22
     23#include <freerdp/api.h>
     24#include <freerdp/types.h>
     25#include <freerdp/freerdp.h>
     26
     27#include <freerdp/rail.h>
     28#include <freerdp/channels/rail.h>
     29
     30typedef struct _rail_server_context RailServerContext;
     31typedef struct _rail_server_private RailServerPrivate;
     32
     33typedef UINT (*psRailStart)(RailServerContext* context);
     34typedef BOOL (*psRailStop)(RailServerContext* context);
     35
     36/* Client side callback types */
     37typedef UINT (*psRailClientHandshake)(RailServerContext* context,
     38                                      const RAIL_HANDSHAKE_ORDER* handshake);
     39typedef UINT (*psRailClientClientStatus)(RailServerContext* context,
     40                                         const RAIL_CLIENT_STATUS_ORDER* clientStatus);
     41typedef UINT (*psRailClientExec)(RailServerContext* context, const RAIL_EXEC_ORDER* exec);
     42typedef UINT (*psRailClientSysparam)(RailServerContext* context,
     43                                     const RAIL_SYSPARAM_ORDER* sysparam);
     44typedef UINT (*psRailClientActivate)(RailServerContext* context,
     45                                     const RAIL_ACTIVATE_ORDER* activate);
     46typedef UINT (*psRailClientSysmenu)(RailServerContext* context, const RAIL_SYSMENU_ORDER* sysmenu);
     47typedef UINT (*psRailClientSyscommand)(RailServerContext* context,
     48                                       const RAIL_SYSCOMMAND_ORDER* syscommand);
     49typedef UINT (*psRailClientNotifyEvent)(RailServerContext* context,
     50                                        const RAIL_NOTIFY_EVENT_ORDER* notifyEvent);
     51typedef UINT (*psRailClientGetAppidReq)(RailServerContext* context,
     52                                        const RAIL_GET_APPID_REQ_ORDER* getAppidReq);
     53typedef UINT (*psRailClientWindowMove)(RailServerContext* context,
     54                                       const RAIL_WINDOW_MOVE_ORDER* windowMove);
     55typedef UINT (*psRailClientSnapArrange)(RailServerContext* context,
     56                                        const RAIL_SNAP_ARRANGE* snapArrange);
     57typedef UINT (*psRailClientLangbarInfo)(RailServerContext* context,
     58                                        const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
     59typedef UINT (*psRailClientLanguageImeInfo)(RailServerContext* context,
     60                                            const RAIL_LANGUAGEIME_INFO_ORDER* languageImeInfo);
     61typedef UINT (*psRailClientCompartmentInfo)(RailServerContext* context,
     62                                            const RAIL_COMPARTMENT_INFO_ORDER* compartmentInfo);
     63typedef UINT (*psRailClientCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
     64
     65/* Server side messages sending methods */
     66typedef UINT (*psRailServerHandshake)(RailServerContext* context,
     67                                      const RAIL_HANDSHAKE_ORDER* handshake);
     68typedef UINT (*psRailServerHandshakeEx)(RailServerContext* context,
     69                                        const RAIL_HANDSHAKE_EX_ORDER* handshakeEx);
     70typedef UINT (*psRailServerSysparam)(RailServerContext* context,
     71                                     const RAIL_SYSPARAM_ORDER* sysparam);
     72typedef UINT (*psRailServerLocalMoveSize)(RailServerContext* context,
     73                                          const RAIL_LOCALMOVESIZE_ORDER* localMoveSize);
     74typedef UINT (*psRailServerMinMaxInfo)(RailServerContext* context,
     75                                       const RAIL_MINMAXINFO_ORDER* minMaxInfo);
     76typedef UINT (*psRailServerTaskbarInfo)(RailServerContext* context,
     77                                        const RAIL_TASKBAR_INFO_ORDER* taskbarInfo);
     78typedef UINT (*psRailServerLangbarInfo)(RailServerContext* context,
     79                                        const RAIL_LANGBAR_INFO_ORDER* langbarInfo);
     80typedef UINT (*psRailServerExecResult)(RailServerContext* context,
     81                                       const RAIL_EXEC_RESULT_ORDER* execResult);
     82typedef UINT (*psRailServerGetAppidResp)(RailServerContext* context,
     83                                         const RAIL_GET_APPID_RESP_ORDER* getAppIdResp);
     84typedef UINT (*psRailServerZOrderSync)(RailServerContext* context,
     85                                       const RAIL_ZORDER_SYNC* zOrderSync);
     86typedef UINT (*psRailServerCloak)(RailServerContext* context, const RAIL_CLOAK* cloak);
     87typedef UINT (*psRailServerPowerDisplayRequest)(
     88    RailServerContext* context, const RAIL_POWER_DISPLAY_REQUEST* PowerDisplayRequest);
     89typedef UINT (*psRailServerGetAppidRespEx)(RailServerContext* context,
     90                                           const RAIL_GET_APPID_RESP_EX* GetAppidRespEx);
     91
     92struct _rail_server_context
     93{
     94	HANDLE vcm;
     95	void* custom;
     96
     97	psRailStart Start;
     98	psRailStop Stop;
     99
    100	/* Callbacks from client */
    101	psRailClientHandshake ClientHandshake;
    102	psRailClientClientStatus ClientClientStatus;
    103	psRailClientExec ClientExec;
    104	psRailClientSysparam ClientSysparam;
    105	psRailClientActivate ClientActivate;
    106	psRailClientSysmenu ClientSysmenu;
    107	psRailClientSyscommand ClientSyscommand;
    108	psRailClientNotifyEvent ClientNotifyEvent;
    109	psRailClientGetAppidReq ClientGetAppidReq;
    110	psRailClientWindowMove ClientWindowMove;
    111	psRailClientSnapArrange ClientSnapArrange;
    112	psRailClientLangbarInfo ClientLangbarInfo;
    113	psRailClientLanguageImeInfo ClientLanguageImeInfo;
    114	psRailClientCompartmentInfo ClientCompartmentInfo;
    115	psRailClientCloak ClientCloak;
    116
    117	/* Methods for sending server side messages */
    118	psRailServerHandshake ServerHandshake;
    119	psRailServerHandshakeEx ServerHandshakeEx;
    120	psRailServerSysparam ServerSysparam;
    121	psRailServerLocalMoveSize ServerLocalMoveSize;
    122	psRailServerMinMaxInfo ServerMinMaxInfo;
    123	psRailServerTaskbarInfo ServerTaskbarInfo;
    124	psRailServerLangbarInfo ServerLangbarInfo;
    125	psRailServerExecResult ServerExecResult;
    126	psRailServerZOrderSync ServerZOrderSync;
    127	psRailServerCloak ServerCloak;
    128	psRailServerPowerDisplayRequest ServerPowerDisplayRequest;
    129	psRailServerGetAppidResp ServerGetAppidResp;
    130	psRailServerGetAppidRespEx ServerGetAppidRespEx;
    131
    132	RailServerPrivate* priv;
    133	rdpContext* rdpcontext;
    134};
    135
    136#ifdef __cplusplus
    137extern "C"
    138{
    139#endif
    140
    141	FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
    142	FREERDP_API void rail_server_context_free(RailServerContext* context);
    143	FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);
    144	FREERDP_API void rail_server_set_handshake_ex_flags(RailServerContext* context, DWORD flags);
    145
    146#ifdef __cplusplus
    147}
    148#endif
    149
    150#endif /* FREERDP_CHANNEL_RAIL_SERVER_RAIL_H */