FreeRDP
shadow_client.c File Reference
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/path.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/sysinfo.h>
#include <winpr/interlocked.h>
#include <freerdp/log.h>
#include "shadow.h"

Macros

#define TAG   CLIENT_TAG("shadow")
 

Functions

static INLINE BOOL shadow_client_rdpgfx_new_surface (rdpShadowClient *client)
 
static INLINE BOOL shadow_client_rdpgfx_release_surface (rdpShadowClient *client)
 
static INLINE BOOL shadow_client_rdpgfx_reset_graphic (rdpShadowClient *client)
 
static INLINE void shadow_client_free_queued_message (void *obj)
 
static BOOL shadow_client_context_new (freerdp_peer *peer, rdpShadowClient *client)
 
static void shadow_client_context_free (freerdp_peer *peer, rdpShadowClient *client)
 
static void shadow_client_message_free (wMessage *message)
 
static INLINE void shadow_client_mark_invalid (rdpShadowClient *client, int numRects, const RECTANGLE_16 *rects)
 
static INLINE BOOL shadow_client_recalc_desktop_size (rdpShadowClient *client)
 
static BOOL shadow_client_capabilities (freerdp_peer *peer)
 
static BOOL shadow_client_post_connect (freerdp_peer *peer)
 
static INLINE void shadow_client_convert_rects (rdpShadowClient *client, RECTANGLE_16 *dst, const RECTANGLE_16 *src, UINT32 numRects)
 
static BOOL shadow_client_refresh_request (rdpShadowClient *client)
 
static BOOL shadow_client_refresh_rect (rdpShadowClient *client, BYTE count, RECTANGLE_16 *areas)
 
static BOOL shadow_client_suppress_output (rdpShadowClient *client, BYTE allow, RECTANGLE_16 *area)
 
static BOOL shadow_client_activate (freerdp_peer *peer)
 
static BOOL shadow_client_logon (freerdp_peer *peer, SEC_WINNT_AUTH_IDENTITY *identity, BOOL automatic)
 
static INLINE void shadow_client_common_frame_acknowledge (rdpShadowClient *client, UINT32 frameId)
 
static BOOL shadow_client_surface_frame_acknowledge (rdpShadowClient *client, UINT32 frameId)
 
static UINT shadow_client_rdpgfx_frame_acknowledge (RdpgfxServerContext *context, RDPGFX_FRAME_ACKNOWLEDGE_PDU *frameAcknowledge)
 
static UINT shadow_client_rdpgfx_caps_advertise (RdpgfxServerContext *context, RDPGFX_CAPS_ADVERTISE_PDU *capsAdvertise)
 
static INLINE UINT32 rdpgfx_estimate_h264_avc420 (RDPGFX_AVC420_BITMAP_STREAM *havc420)
 
static BOOL shadow_client_send_surface_gfx (rdpShadowClient *client, const BYTE *pSrcData, int nSrcStep, int nXSrc, int nYSrc, int nWidth, int nHeight)
 
static BOOL shadow_client_send_surface_bits (rdpShadowClient *client, BYTE *pSrcData, int nSrcStep, int nXSrc, int nYSrc, int nWidth, int nHeight)
 
static BOOL shadow_client_send_bitmap_update (rdpShadowClient *client, BYTE *pSrcData, int nSrcStep, int nXSrc, int nYSrc, int nWidth, int nHeight)
 
static BOOL shadow_client_send_surface_update (rdpShadowClient *client, SHADOW_GFX_STATUS *pStatus)
 
static BOOL shadow_client_send_resize (rdpShadowClient *client, SHADOW_GFX_STATUS *pStatus)
 
BOOL shadow_client_surface_update (rdpShadowClient *client, REGION16 *region)
 
static INLINE BOOL shadow_client_no_surface_update (rdpShadowClient *client, SHADOW_GFX_STATUS *pStatus)
 
static int shadow_client_subsystem_process_message (rdpShadowClient *client, wMessage *message)
 
static DWORD WINAPI shadow_client_thread (LPVOID arg)
 
BOOL shadow_client_accepted (freerdp_listener *listener, freerdp_peer *peer)
 
static void shadow_msg_out_addref (wMessage *message)
 
static void shadow_msg_out_release (wMessage *message)
 
static BOOL shadow_client_dispatch_msg (rdpShadowClient *client, wMessage *message)
 
BOOL shadow_client_post_msg (rdpShadowClient *client, void *context, UINT32 type, SHADOW_MSG_OUT *msg, void *lParam)
 
int shadow_client_boardcast_msg (rdpShadowServer *server, void *context, UINT32 type, SHADOW_MSG_OUT *msg, void *lParam)
 
int shadow_client_boardcast_quit (rdpShadowServer *server, int nExitCode)
 

Macro Definition Documentation

#define TAG   CLIENT_TAG("shadow")

FreeRDP: A Remote Desktop Protocol Implementation

Copyright 2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

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

static INLINE UINT32 rdpgfx_estimate_h264_avc420 ( RDPGFX_AVC420_BITMAP_STREAM *  havc420)
static

Here is the caller graph for this function:

BOOL shadow_client_accepted ( freerdp_listener *  listener,
freerdp_peer *  peer 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_activate ( freerdp_peer *  peer)
static

Here is the call graph for this function:

Here is the caller graph for this function:

int shadow_client_boardcast_msg ( rdpShadowServer *  server,
void context,
UINT32  type,
SHADOW_MSG_OUT *  msg,
void lParam 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int shadow_client_boardcast_quit ( rdpShadowServer *  server,
int  nExitCode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_capabilities ( freerdp_peer *  peer)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE void shadow_client_common_frame_acknowledge ( rdpShadowClient *  client,
UINT32  frameId 
)
static

Here is the caller graph for this function:

static void shadow_client_context_free ( freerdp_peer *  peer,
rdpShadowClient *  client 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_context_new ( freerdp_peer *  peer,
rdpShadowClient *  client 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE void shadow_client_convert_rects ( rdpShadowClient *  client,
RECTANGLE_16 *  dst,
const RECTANGLE_16 *  src,
UINT32  numRects 
)
static

Here is the caller graph for this function:

static BOOL shadow_client_dispatch_msg ( rdpShadowClient *  client,
wMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE void shadow_client_free_queued_message ( void obj)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_logon ( freerdp_peer *  peer,
SEC_WINNT_AUTH_IDENTITY *  identity,
BOOL  automatic 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE void shadow_client_mark_invalid ( rdpShadowClient *  client,
int  numRects,
const RECTANGLE_16 *  rects 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void shadow_client_message_free ( wMessage *  message)
static
static INLINE BOOL shadow_client_no_surface_update ( rdpShadowClient *  client,
SHADOW_GFX_STATUS *  pStatus 
)
static

Function description Only union invalid region from server surface

Returns
TRUE on success

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_post_connect ( freerdp_peer *  peer)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL shadow_client_post_msg ( rdpShadowClient *  client,
void context,
UINT32  type,
SHADOW_MSG_OUT *  msg,
void lParam 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT shadow_client_rdpgfx_caps_advertise ( RdpgfxServerContext *  context,
RDPGFX_CAPS_ADVERTISE_PDU *  capsAdvertise 
)
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:

static UINT shadow_client_rdpgfx_frame_acknowledge ( RdpgfxServerContext *  context,
RDPGFX_FRAME_ACKNOWLEDGE_PDU *  frameAcknowledge 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static INLINE BOOL shadow_client_rdpgfx_new_surface ( rdpShadowClient *  client)
static

Here is the caller graph for this function:

static INLINE BOOL shadow_client_rdpgfx_release_surface ( rdpShadowClient *  client)
static

Here is the caller graph for this function:

static INLINE BOOL shadow_client_rdpgfx_reset_graphic ( rdpShadowClient *  client)
static

Here is the caller graph for this function:

static INLINE BOOL shadow_client_recalc_desktop_size ( rdpShadowClient *  client)
static

Function description Recalculate client desktop size and update to rdpSettings

Returns
TRUE if width/height changed.

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_refresh_rect ( rdpShadowClient *  client,
BYTE  count,
RECTANGLE_16 *  areas 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_refresh_request ( rdpShadowClient *  client)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_send_bitmap_update ( rdpShadowClient *  client,
BYTE pSrcData,
int  nSrcStep,
int  nXSrc,
int  nYSrc,
int  nWidth,
int  nHeight 
)
static

Function description

Returns
TRUE on success

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_send_resize ( rdpShadowClient *  client,
SHADOW_GFX_STATUS *  pStatus 
)
static

Function description Notify client for resize. The new desktop width/height should have already been updated in rdpSettings.

Returns
TRUE on success

Unset client activated flag to avoid sending update message during resize. DesktopResize will reactive the client and shadow_client_activate would be invoked later.

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_send_surface_bits ( rdpShadowClient *  client,
BYTE pSrcData,
int  nSrcStep,
int  nXSrc,
int  nYSrc,
int  nWidth,
int  nHeight 
)
static

Function description

Returns
TRUE on success

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_send_surface_gfx ( rdpShadowClient *  client,
const BYTE pSrcData,
int  nSrcStep,
int  nXSrc,
int  nYSrc,
int  nWidth,
int  nHeight 
)
static

Function description

Returns
TRUE on success

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_send_surface_update ( rdpShadowClient *  client,
SHADOW_GFX_STATUS *  pStatus 
)
static

Function description

Returns
TRUE on success (or nothing need to be updated)

Here is the call graph for this function:

Here is the caller graph for this function:

static int shadow_client_subsystem_process_message ( rdpShadowClient *  client,
wMessage *  message 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_suppress_output ( rdpShadowClient *  client,
BYTE  allow,
RECTANGLE_16 *  area 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL shadow_client_surface_frame_acknowledge ( rdpShadowClient *  client,
UINT32  frameId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL shadow_client_surface_update ( rdpShadowClient *  client,
REGION16 *  region 
)

Function description Mark invalid region for client

Returns
TRUE on success

Here is the call graph for this function:

Here is the caller graph for this function:

static DWORD WINAPI shadow_client_thread ( LPVOID  arg)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void shadow_msg_out_addref ( wMessage *  message)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void shadow_msg_out_release ( wMessage *  message)
static

Here is the call graph for this function:

Here is the caller graph for this function: