FreeRDP
libfreerdp/core/freerdp.c File Reference
#include "rdp.h"
#include "input.h"
#include "update.h"
#include "surface.h"
#include "transport.h"
#include "connection.h"
#include "message.h"
#include "buildflags.h"
#include <assert.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <winpr/stream.h>
#include <winpr/wtsapi.h>
#include <winpr/ssl.h>
#include <winpr/debug.h>
#include <freerdp/freerdp.h>
#include <freerdp/error.h>
#include <freerdp/event.h>
#include <freerdp/locale/keyboard.h>
#include <freerdp/channels/channels.h>
#include <freerdp/version.h>
#include <freerdp/log.h>
#include <freerdp/cache/pointer.h>

Macros

#define TAG   FREERDP_TAG("core")
 

Functions

UINT freerdp_channel_add_init_handle_data (rdpChannelHandles *handles, void *pInitHandle, void *pUserData)
 
voidfreerdp_channel_get_init_handle_data (rdpChannelHandles *handles, void *pInitHandle)
 
void freerdp_channel_remove_init_handle_data (rdpChannelHandles *handles, void *pInitHandle)
 
UINT freerdp_channel_add_open_handle_data (rdpChannelHandles *handles, DWORD openHandle, void *pUserData)
 
voidfreerdp_channel_get_open_handle_data (rdpChannelHandles *handles, DWORD openHandle)
 
void freerdp_channel_remove_open_handle_data (rdpChannelHandles *handles, DWORD openHandle)
 
BOOL freerdp_connect (freerdp *instance)
 
BOOL freerdp_abort_connect (freerdp *instance)
 
BOOL freerdp_get_fds (freerdp *instance, void **rfds, int *rcount, void **wfds, int *wcount)
 
BOOL freerdp_check_fds (freerdp *instance)
 
DWORD freerdp_get_event_handles (rdpContext *context, HANDLE *events, DWORD count)
 
BOOL freerdp_check_event_handles (rdpContext *context)
 
wMessageQueue * freerdp_get_message_queue (freerdp *instance, DWORD id)
 
HANDLE freerdp_get_message_queue_event_handle (freerdp *instance, DWORD id)
 
int freerdp_message_queue_process_message (freerdp *instance, DWORD id, wMessage *message)
 
int freerdp_message_queue_process_pending_messages (freerdp *instance, DWORD id)
 
static int freerdp_send_channel_data (freerdp *instance, UINT16 channelId, BYTE *data, int size)
 
BOOL freerdp_disconnect (freerdp *instance)
 
BOOL freerdp_disconnect_before_reconnect (freerdp *instance)
 
BOOL freerdp_reconnect (freerdp *instance)
 
BOOL freerdp_shall_disconnect (freerdp *instance)
 
BOOL freerdp_focus_required (freerdp *instance)
 
void freerdp_set_focus (freerdp *instance)
 
void freerdp_get_version (int *major, int *minor, int *revision)
 
const char * freerdp_get_version_string (void)
 
const char * freerdp_get_build_date (void)
 
const char * freerdp_get_build_config (void)
 
const char * freerdp_get_build_revision (void)
 
BOOL freerdp_context_new (freerdp *instance)
 
void freerdp_context_free (freerdp *instance)
 
int freerdp_get_disconnect_ultimatum (rdpContext *context)
 
UINT32 freerdp_error_info (freerdp *instance)
 
void freerdp_set_error_info (rdpRdp *rdp, UINT32 error)
 
UINT32 freerdp_get_last_error (rdpContext *context)
 
const char * freerdp_get_last_error_name (UINT32 code)
 
const char * freerdp_get_last_error_string (UINT32 code)
 
void freerdp_set_last_error (rdpContext *context, UINT32 lastError)
 
const char * freerdp_get_logon_error_info_type (UINT32 type)
 
const char * freerdp_get_logon_error_info_data (UINT32 data)
 
freerdp * freerdp_new ()
 
void freerdp_free (freerdp *instance)
 
ULONG freerdp_get_transport_sent (rdpContext *context, BOOL resetCount)
 
HANDLE getChannelErrorEventHandle (rdpContext *context)
 
BOOL checkChannelErrorEvent (rdpContext *context)
 
UINT getChannelError (rdpContext *context)
 
const char * getChannelErrorDescription (rdpContext *context)
 
void clearChannelError (rdpContext *context)
 
void setChannelError (rdpContext *context, UINT errorNum, char *description)
 

Variables

static wEventType FreeRDP_Events []
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("core")

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Core

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com

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

BOOL checkChannelErrorEvent ( rdpContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

void clearChannelError ( rdpContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_abort_connect ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

UINT freerdp_channel_add_init_handle_data ( rdpChannelHandles *  handles,
void pInitHandle,
void pUserData 
)

Here is the call graph for this function:

UINT freerdp_channel_add_open_handle_data ( rdpChannelHandles *  handles,
DWORD  openHandle,
void pUserData 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void* freerdp_channel_get_init_handle_data ( rdpChannelHandles *  handles,
void pInitHandle 
)

Here is the call graph for this function:

void* freerdp_channel_get_open_handle_data ( rdpChannelHandles *  handles,
DWORD  openHandle 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void freerdp_channel_remove_init_handle_data ( rdpChannelHandles *  handles,
void pInitHandle 
)

Here is the call graph for this function:

void freerdp_channel_remove_open_handle_data ( rdpChannelHandles *  handles,
DWORD  openHandle 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_check_event_handles ( rdpContext *  context)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_check_fds ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_connect ( freerdp *  instance)

Creates a new connection based on the settings found in the "instance" parameter It will use the callbacks registered on the structure to process the pre/post connect operations that the caller requires.

See also
struct rdp_freerdp in freerdp.h
Parameters
instance- pointer to a rdp_freerdp structure that contains base information to establish the connection. On return, this function will be initialized with the new connection's settings.
Returns
TRUE if successful. FALSE otherwise.

Here is the call graph for this function:

Here is the caller graph for this function:

void freerdp_context_free ( freerdp *  instance)

Deallocator function for a rdp context. The function will deallocate the resources from the 'instance' parameter that were allocated from a call to freerdp_context_new(). If the ContextFree callback is set in the 'instance' parameter, it will be called before deallocation occurs.

Parameters
instance- Pointer to the rdp_freerdp structure that was initialized by a call to freerdp_context_new(). On return, the fields associated to the context are invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_context_new ( freerdp *  instance)

Allocator function for a rdp context. The function will allocate a rdpRdp structure using rdp_new(), then copy its contents to the appropriate fields in the rdp_freerdp structure given in parameters. It will also initialize the 'context' field in the rdp_freerdp structure as needed. If the caller has set the ContextNew callback in the 'instance' parameter, it will be called at the end of the function.

Parameters
instance- Pointer to the rdp_freerdp structure that will be initialized with the new context.

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_disconnect ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_disconnect_before_reconnect ( freerdp *  instance)

Here is the call graph for this function:

UINT32 freerdp_error_info ( freerdp *  instance)

Here is the caller graph for this function:

BOOL freerdp_focus_required ( freerdp *  instance)

Here is the caller graph for this function:

void freerdp_free ( freerdp *  instance)

Deallocator function for the rdp_freerdp structure.

Parameters
instance- pointer to the rdp_freerdp structure to deallocate. On return, this pointer is not valid anymore.

Here is the caller graph for this function:

const char* freerdp_get_build_config ( void  )

Here is the caller graph for this function:

const char* freerdp_get_build_date ( void  )

Here is the caller graph for this function:

const char* freerdp_get_build_revision ( void  )

Here is the caller graph for this function:

int freerdp_get_disconnect_ultimatum ( rdpContext *  context)

Here is the caller graph for this function:

DWORD freerdp_get_event_handles ( rdpContext *  context,
HANDLE *  events,
DWORD  count 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_get_fds ( freerdp *  instance,
void **  rfds,
int *  rcount,
void **  wfds,
int *  wcount 
)

Here is the call graph for this function:

Here is the caller graph for this function:

UINT32 freerdp_get_last_error ( rdpContext *  context)

Here is the caller graph for this function:

const char* freerdp_get_last_error_name ( UINT32  code)

Here is the call graph for this function:

Here is the caller graph for this function:

const char* freerdp_get_last_error_string ( UINT32  code)

Here is the call graph for this function:

const char* freerdp_get_logon_error_info_data ( UINT32  data)

Here is the caller graph for this function:

const char* freerdp_get_logon_error_info_type ( UINT32  type)

Here is the caller graph for this function:

wMessageQueue* freerdp_get_message_queue ( freerdp *  instance,
DWORD  id 
)

Here is the caller graph for this function:

HANDLE freerdp_get_message_queue_event_handle ( freerdp *  instance,
DWORD  id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ULONG freerdp_get_transport_sent ( rdpContext *  context,
BOOL  resetCount 
)
void freerdp_get_version ( int *  major,
int *  minor,
int *  revision 
)

Here is the caller graph for this function:

const char* freerdp_get_version_string ( void  )

Here is the caller graph for this function:

int freerdp_message_queue_process_message ( freerdp *  instance,
DWORD  id,
wMessage *  message 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int freerdp_message_queue_process_pending_messages ( freerdp *  instance,
DWORD  id 
)

Here is the call graph for this function:

Here is the caller graph for this function:

freerdp* freerdp_new ( void  )

Allocator function for the rdp_freerdp structure.

Returns
an allocated structure filled with 0s. Need to be deallocated using freerdp_free()

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_reconnect ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

static int freerdp_send_channel_data ( freerdp *  instance,
UINT16  channelId,
BYTE data,
int  size 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void freerdp_set_error_info ( rdpRdp *  rdp,
UINT32  error 
)

Here is the call graph for this function:

void freerdp_set_focus ( freerdp *  instance)

Here is the caller graph for this function:

void freerdp_set_last_error ( rdpContext *  context,
UINT32  lastError 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL freerdp_shall_disconnect ( freerdp *  instance)

Here is the call graph for this function:

Here is the caller graph for this function:

UINT getChannelError ( rdpContext *  context)

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

const char* getChannelErrorDescription ( rdpContext *  context)
HANDLE getChannelErrorEventHandle ( rdpContext *  context)

Here is the caller graph for this function:

void setChannelError ( rdpContext *  context,
UINT  errorNum,
char *  description 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

wEventType FreeRDP_Events[]
static
Initial value:
=
{
}