cscg24-guacamole

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

encomsp.h (4644B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * Multiparty Virtual Channel
      4 *
      5 * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@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_ENCOMSP_H
     21#define FREERDP_CHANNEL_ENCOMSP_H
     22
     23#include <freerdp/api.h>
     24#include <freerdp/types.h>
     25
     26#define ENCOMSP_SVC_CHANNEL_NAME "encomsp"
     27
     28struct _ENCOMSP_UNICODE_STRING
     29{
     30	UINT16 cchString;
     31	WCHAR wString[1024];
     32};
     33typedef struct _ENCOMSP_UNICODE_STRING ENCOMSP_UNICODE_STRING;
     34
     35/* Filter Updated PDU Flags */
     36
     37#define ENCOMSP_FILTER_ENABLED 0x0001
     38
     39/* Application Created PDU Flags */
     40
     41#define ENCOMSP_APPLICATION_SHARED 0x0001
     42
     43/* Window Created PDU Flags */
     44
     45#define ENCOMSP_WINDOW_SHARED 0x0001
     46
     47/* Participant Created PDU Flags */
     48
     49#define ENCOMSP_MAY_VIEW 0x0001
     50#define ENCOMSP_MAY_INTERACT 0x0002
     51#define ENCOMSP_IS_PARTICIPANT 0x0004
     52
     53/* Participant Removed PDU Disconnection Types */
     54
     55#define ENCOMSP_PARTICIPANT_DISCONNECTION_REASON_APP 0x00000000
     56#define ENCOMSP_PARTICIPANT_DISCONNECTION_REASON_CLI 0x00000002
     57
     58/* Change Participant Control Level PDU Flags */
     59
     60#define ENCOMSP_REQUEST_VIEW 0x0001
     61#define ENCOMSP_REQUEST_INTERACT 0x0002
     62#define ENCOMSP_ALLOW_CONTROL_REQUESTS 0x0008
     63
     64/* PDU Order Types */
     65
     66#define ODTYPE_FILTER_STATE_UPDATED 0x0001
     67#define ODTYPE_APP_REMOVED 0x0002
     68#define ODTYPE_APP_CREATED 0x0003
     69#define ODTYPE_WND_REMOVED 0x0004
     70#define ODTYPE_WND_CREATED 0x0005
     71#define ODTYPE_WND_SHOW 0x0006
     72#define ODTYPE_PARTICIPANT_REMOVED 0x0007
     73#define ODTYPE_PARTICIPANT_CREATED 0x0008
     74#define ODTYPE_PARTICIPANT_CTRL_CHANGED 0x0009
     75#define ODTYPE_GRAPHICS_STREAM_PAUSED 0x000A
     76#define ODTYPE_GRAPHICS_STREAM_RESUMED 0x000B
     77
     78#define DEFINE_ENCOMSP_HEADER_COMMON() \
     79	UINT16 Type;                       \
     80	UINT16 Length
     81
     82#define ENCOMSP_ORDER_HEADER_SIZE 4
     83
     84struct _ENCOMSP_ORDER_HEADER
     85{
     86	DEFINE_ENCOMSP_HEADER_COMMON();
     87};
     88typedef struct _ENCOMSP_ORDER_HEADER ENCOMSP_ORDER_HEADER;
     89
     90struct _ENCOMSP_FILTER_UPDATED_PDU
     91{
     92	DEFINE_ENCOMSP_HEADER_COMMON();
     93
     94	BYTE Flags;
     95};
     96typedef struct _ENCOMSP_FILTER_UPDATED_PDU ENCOMSP_FILTER_UPDATED_PDU;
     97
     98struct _ENCOMSP_APPLICATION_CREATED_PDU
     99{
    100	DEFINE_ENCOMSP_HEADER_COMMON();
    101
    102	UINT16 Flags;
    103	UINT32 AppId;
    104	ENCOMSP_UNICODE_STRING Name;
    105};
    106typedef struct _ENCOMSP_APPLICATION_CREATED_PDU ENCOMSP_APPLICATION_CREATED_PDU;
    107
    108struct _ENCOMSP_APPLICATION_REMOVED_PDU
    109{
    110	DEFINE_ENCOMSP_HEADER_COMMON();
    111
    112	UINT32 AppId;
    113};
    114typedef struct _ENCOMSP_APPLICATION_REMOVED_PDU ENCOMSP_APPLICATION_REMOVED_PDU;
    115
    116struct _ENCOMSP_WINDOW_CREATED_PDU
    117{
    118	DEFINE_ENCOMSP_HEADER_COMMON();
    119
    120	UINT16 Flags;
    121	UINT32 AppId;
    122	UINT32 WndId;
    123	ENCOMSP_UNICODE_STRING Name;
    124};
    125typedef struct _ENCOMSP_WINDOW_CREATED_PDU ENCOMSP_WINDOW_CREATED_PDU;
    126
    127struct _ENCOMSP_WINDOW_REMOVED_PDU
    128{
    129	DEFINE_ENCOMSP_HEADER_COMMON();
    130
    131	UINT32 WndId;
    132};
    133typedef struct _ENCOMSP_WINDOW_REMOVED_PDU ENCOMSP_WINDOW_REMOVED_PDU;
    134
    135struct _ENCOMSP_SHOW_WINDOW_PDU
    136{
    137	DEFINE_ENCOMSP_HEADER_COMMON();
    138
    139	UINT32 WndId;
    140};
    141typedef struct _ENCOMSP_SHOW_WINDOW_PDU ENCOMSP_SHOW_WINDOW_PDU;
    142
    143struct _ENCOMSP_PARTICIPANT_CREATED_PDU
    144{
    145	DEFINE_ENCOMSP_HEADER_COMMON();
    146
    147	UINT32 ParticipantId;
    148	UINT32 GroupId;
    149	UINT16 Flags;
    150	ENCOMSP_UNICODE_STRING FriendlyName;
    151};
    152typedef struct _ENCOMSP_PARTICIPANT_CREATED_PDU ENCOMSP_PARTICIPANT_CREATED_PDU;
    153
    154struct _ENCOMSP_PARTICIPANT_REMOVED_PDU
    155{
    156	DEFINE_ENCOMSP_HEADER_COMMON();
    157
    158	UINT32 ParticipantId;
    159	UINT32 DiscType;
    160	UINT32 DiscCode;
    161};
    162typedef struct _ENCOMSP_PARTICIPANT_REMOVED_PDU ENCOMSP_PARTICIPANT_REMOVED_PDU;
    163
    164struct _ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU
    165{
    166	DEFINE_ENCOMSP_HEADER_COMMON();
    167
    168	UINT16 Flags;
    169	UINT32 ParticipantId;
    170};
    171typedef struct _ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU
    172    ENCOMSP_CHANGE_PARTICIPANT_CONTROL_LEVEL_PDU;
    173
    174struct _ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU
    175{
    176	DEFINE_ENCOMSP_HEADER_COMMON();
    177};
    178typedef struct _ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU ENCOMSP_GRAPHICS_STREAM_PAUSED_PDU;
    179
    180struct _ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU
    181{
    182	DEFINE_ENCOMSP_HEADER_COMMON();
    183};
    184typedef struct _ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU ENCOMSP_GRAPHICS_STREAM_RESUMED_PDU;
    185
    186#endif /* FREERDP_CHANNEL_ENCOMSP_H */