FreeRDP
gfxredir_main.c File Reference
#include "gfxredir_main.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/log.h>
#include <freerdp/server/gfxredir.h>
#include "../gfxredir_common.h"

Macros

#define TAG   CHANNELS_TAG("gfxredir.server")
 

Functions

static UINT gfxredir_recv_legacy_caps_pdu (wStream *s, GfxRedirServerContext *context)
 
static UINT gfxredir_recv_caps_advertise_pdu (wStream *s, UINT32 length, GfxRedirServerContext *context)
 
static UINT gfxredir_recv_present_buffer_ack_pdu (wStream *s, GfxRedirServerContext *context)
 
static UINT gfxredir_server_receive_pdu (GfxRedirServerContext *context, wStream *s)
 
static UINT gfxredir_server_handle_messages (GfxRedirServerContext *context)
 
static DWORD WINAPI gfxredir_server_thread_func (LPVOID arg)
 
static wStream * gfxredir_server_single_packet_new (UINT32 cmdId, UINT32 length)
 
static UINT gfxredir_server_packet_send (GfxRedirServerContext *context, wStream *s)
 
static UINT gfxredir_send_error (GfxRedirServerContext *context, const GFXREDIR_ERROR_PDU *error)
 
static UINT gfxredir_send_caps_confirm (GfxRedirServerContext *context, const GFXREDIR_CAPS_CONFIRM_PDU *graphicsCapsConfirm)
 
static UINT gfxredir_send_open_pool (GfxRedirServerContext *context, const GFXREDIR_OPEN_POOL_PDU *openPool)
 
static UINT gfxredir_send_close_pool (GfxRedirServerContext *context, const GFXREDIR_CLOSE_POOL_PDU *closePool)
 
static UINT gfxredir_send_create_buffer (GfxRedirServerContext *context, const GFXREDIR_CREATE_BUFFER_PDU *createBuffer)
 
static UINT gfxredir_send_destroy_buffer (GfxRedirServerContext *context, const GFXREDIR_DESTROY_BUFFER_PDU *destroyBuffer)
 
static UINT gfxredir_send_present_buffer (GfxRedirServerContext *context, const GFXREDIR_PRESENT_BUFFER_PDU *presentBuffer)
 
static UINT gfxredir_server_open (GfxRedirServerContext *context)
 
static UINT gfxredir_server_close (GfxRedirServerContext *context)
 
GfxRedirServerContext * gfxredir_server_context_new (HANDLE vcm)
 
void gfxredir_server_context_free (GfxRedirServerContext *context)
 

Macro Definition Documentation

◆ TAG

#define TAG   CHANNELS_TAG("gfxredir.server")

FreeRDP: A Remote Desktop Protocol Implementation RDPXXXX Remote App Graphics Redirection Virtual Channel Extension

Copyright 2020 Microsoft

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ gfxredir_recv_caps_advertise_pdu()

static UINT gfxredir_recv_caps_advertise_pdu ( wStream *  s,
UINT32  length,
GfxRedirServerContext *  context 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_recv_legacy_caps_pdu()

static UINT gfxredir_recv_legacy_caps_pdu ( wStream *  s,
GfxRedirServerContext *  context 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_recv_present_buffer_ack_pdu()

static UINT gfxredir_recv_present_buffer_ack_pdu ( wStream *  s,
GfxRedirServerContext *  context 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_caps_confirm()

static UINT gfxredir_send_caps_confirm ( GfxRedirServerContext *  context,
const GFXREDIR_CAPS_CONFIRM_PDU *  graphicsCapsConfirm 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_close_pool()

static UINT gfxredir_send_close_pool ( GfxRedirServerContext *  context,
const GFXREDIR_CLOSE_POOL_PDU *  closePool 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_create_buffer()

static UINT gfxredir_send_create_buffer ( GfxRedirServerContext *  context,
const GFXREDIR_CREATE_BUFFER_PDU *  createBuffer 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_destroy_buffer()

static UINT gfxredir_send_destroy_buffer ( GfxRedirServerContext *  context,
const GFXREDIR_DESTROY_BUFFER_PDU *  destroyBuffer 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_error()

static UINT gfxredir_send_error ( GfxRedirServerContext *  context,
const GFXREDIR_ERROR_PDU *  error 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_open_pool()

static UINT gfxredir_send_open_pool ( GfxRedirServerContext *  context,
const GFXREDIR_OPEN_POOL_PDU *  openPool 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_send_present_buffer()

static UINT gfxredir_send_present_buffer ( GfxRedirServerContext *  context,
const GFXREDIR_PRESENT_BUFFER_PDU *  presentBuffer 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_close()

static UINT gfxredir_server_close ( GfxRedirServerContext *  context)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_context_free()

void gfxredir_server_context_free ( GfxRedirServerContext *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_context_new()

GfxRedirServerContext* gfxredir_server_context_new ( HANDLE  vcm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_handle_messages()

static UINT gfxredir_server_handle_messages ( GfxRedirServerContext *  context)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_open()

static UINT gfxredir_server_open ( GfxRedirServerContext *  context)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_packet_send()

static UINT gfxredir_server_packet_send ( GfxRedirServerContext *  context,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_receive_pdu()

static UINT gfxredir_server_receive_pdu ( GfxRedirServerContext *  context,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_single_packet_new()

static wStream* gfxredir_server_single_packet_new ( UINT32  cmdId,
UINT32  length 
)
static

Function description Create new stream for single gfxredir packet. The new stream length would be required data length + header. The header will be written to the stream before return.

Parameters
cmdId
length- data length without header
Returns
new stream
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfxredir_server_thread_func()

static DWORD WINAPI gfxredir_server_thread_func ( LPVOID  arg)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the call graph for this function:
Here is the caller graph for this function: