Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
1f6d0a510e
@ -46,7 +46,8 @@ void df_context_size(freerdp* instance, uint32* size)
|
||||
|
||||
void df_context_new(freerdp* instance, dfContext* context)
|
||||
{
|
||||
context->channels = freerdp_channels_new();
|
||||
rdpContext* _context = (rdpContext*) context;
|
||||
_context->channels = freerdp_channels_new();
|
||||
}
|
||||
|
||||
void df_context_free(freerdp* instance, dfContext* context)
|
||||
@ -148,7 +149,7 @@ boolean df_pre_connect(freerdp* instance)
|
||||
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
|
||||
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;
|
||||
|
||||
freerdp_channels_pre_connect(context->channels, instance);
|
||||
freerdp_channels_pre_connect(instance->context->channels, instance);
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -201,7 +202,7 @@ boolean df_post_connect(freerdp* instance)
|
||||
|
||||
df_keyboard_init();
|
||||
|
||||
freerdp_channels_post_connect(context->channels, instance);
|
||||
freerdp_channels_post_connect(instance->context->channels, instance);
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -209,10 +210,10 @@ boolean df_post_connect(freerdp* instance)
|
||||
static int df_process_plugin_args(rdpSettings* settings, const char* name,
|
||||
RDP_PLUGIN_DATA* plugin_data, void* user_data)
|
||||
{
|
||||
rdpChannels* chanman = (rdpChannels*) user_data;
|
||||
rdpChannels* channels = (rdpChannels*) user_data;
|
||||
|
||||
printf("loading plugin %s\n", name);
|
||||
freerdp_channels_load_plugin(chanman, settings, name, plugin_data);
|
||||
freerdp_channels_load_plugin(channels, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -224,7 +225,7 @@ df_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size,
|
||||
}
|
||||
|
||||
static void
|
||||
df_process_cb_sync_event(rdpChannels* chanman, freerdp* instance)
|
||||
df_process_cb_sync_event(rdpChannels* channels, freerdp* instance)
|
||||
{
|
||||
RDP_EVENT* event;
|
||||
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
||||
@ -234,22 +235,22 @@ df_process_cb_sync_event(rdpChannels* chanman, freerdp* instance)
|
||||
format_list_event = (RDP_CB_FORMAT_LIST_EVENT*)event;
|
||||
format_list_event->num_formats = 0;
|
||||
|
||||
freerdp_channels_send_event(chanman, event);
|
||||
freerdp_channels_send_event(channels, event);
|
||||
}
|
||||
|
||||
static void
|
||||
df_process_channel_event(rdpChannels* chanman, freerdp* instance)
|
||||
df_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||
{
|
||||
RDP_EVENT* event;
|
||||
|
||||
event = freerdp_channels_pop_event(chanman);
|
||||
event = freerdp_channels_pop_event(channels);
|
||||
|
||||
if (event)
|
||||
{
|
||||
switch (event->event_type)
|
||||
{
|
||||
case RDP_EVENT_TYPE_CB_SYNC:
|
||||
df_process_cb_sync_event(chanman, instance);
|
||||
df_process_cb_sync_event(channels, instance);
|
||||
break;
|
||||
default:
|
||||
printf("df_process_channel_event: unknown event type %d\n", event->event_type);
|
||||
@ -279,30 +280,30 @@ int dfreerdp_run(freerdp* instance)
|
||||
fd_set wfds_set;
|
||||
dfInfo* dfi;
|
||||
dfContext* context;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
|
||||
memset(rfds, 0, sizeof(rfds));
|
||||
memset(wfds, 0, sizeof(wfds));
|
||||
|
||||
if (!instance->Connect(instance))
|
||||
if (!freerdp_connect(instance))
|
||||
return 0;
|
||||
|
||||
context = (dfContext*) instance->context;
|
||||
|
||||
dfi = context->dfi;
|
||||
chanman = context->channels;
|
||||
channels = instance->context->channels;
|
||||
|
||||
while (1)
|
||||
{
|
||||
rcount = 0;
|
||||
wcount = 0;
|
||||
|
||||
if (instance->GetFileDescriptor(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get FreeRDP file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_get_fds(chanman, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get channel manager file descriptor\n");
|
||||
break;
|
||||
@ -343,7 +344,7 @@ int dfreerdp_run(freerdp* instance)
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->CheckFileDescriptor(instance) != True)
|
||||
if (freerdp_check_fds(instance) != True)
|
||||
{
|
||||
printf("Failed to check FreeRDP file descriptor\n");
|
||||
break;
|
||||
@ -353,19 +354,19 @@ int dfreerdp_run(freerdp* instance)
|
||||
printf("Failed to check dfreerdp file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_check_fds(chanman, instance) != True)
|
||||
if (freerdp_channels_check_fds(channels, instance) != True)
|
||||
{
|
||||
printf("Failed to check channel manager file descriptor\n");
|
||||
break;
|
||||
}
|
||||
df_process_channel_event(chanman, instance);
|
||||
df_process_channel_event(channels, instance);
|
||||
}
|
||||
|
||||
freerdp_channels_close(chanman, instance);
|
||||
freerdp_channels_free(chanman);
|
||||
freerdp_channels_close(channels, instance);
|
||||
freerdp_channels_free(channels);
|
||||
df_free(dfi);
|
||||
gdi_free(instance);
|
||||
instance->Disconnect(instance);
|
||||
freerdp_disconnect(instance);
|
||||
freerdp_free(instance);
|
||||
|
||||
return 0;
|
||||
@ -395,8 +396,8 @@ int main(int argc, char* argv[])
|
||||
pthread_t thread;
|
||||
freerdp* instance;
|
||||
dfContext* context;
|
||||
rdpChannels* channels;
|
||||
struct thread_data* data;
|
||||
rdpChannels* chanman;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
@ -415,10 +416,10 @@ int main(int argc, char* argv[])
|
||||
freerdp_context_new(instance);
|
||||
|
||||
context = (dfContext*) instance->context;
|
||||
chanman = context->channels;
|
||||
channels = instance->context->channels;
|
||||
|
||||
DirectFBInit(&argc, &argv);
|
||||
freerdp_parse_args(instance->settings, argc, argv, df_process_plugin_args, chanman, NULL, NULL);
|
||||
freerdp_parse_args(instance->settings, argc, argv, df_process_plugin_args, channels, NULL, NULL);
|
||||
|
||||
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
|
||||
data->instance = instance;
|
||||
|
@ -35,7 +35,6 @@ struct df_context
|
||||
rdpContext _p;
|
||||
|
||||
dfInfo* dfi;
|
||||
rdpChannels* channels;
|
||||
rdpSettings* settings;
|
||||
};
|
||||
typedef struct df_context dfContext;
|
||||
|
@ -382,7 +382,7 @@ void xf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
|
||||
|
||||
if (brush->style & CACHED_BRUSH)
|
||||
{
|
||||
brush->data = brush_get(cache->brush, brush->index, &brush->bpp);
|
||||
brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp);
|
||||
brush->style = GDI_BS_PATTERN;
|
||||
}
|
||||
|
||||
@ -823,7 +823,7 @@ void xf_gdi_cache_glyph_v2(rdpUpdate* update, CACHE_GLYPH_V2_ORDER* cache_glyph_
|
||||
void xf_gdi_cache_brush(rdpUpdate* update, CACHE_BRUSH_ORDER* cache_brush)
|
||||
{
|
||||
rdpCache* cache = update->context->cache;
|
||||
brush_put(cache->brush, cache_brush->index, cache_brush->data, cache_brush->bpp);
|
||||
brush_cache_put(cache->brush, cache_brush->index, cache_brush->data, cache_brush->bpp);
|
||||
}
|
||||
|
||||
void xf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_command)
|
||||
|
@ -195,7 +195,7 @@ static void xf_on_free_rail_client_event(RDP_EVENT* event)
|
||||
}
|
||||
}
|
||||
|
||||
static void xf_send_rail_client_event(rdpChannels* chanman, uint16 event_type, void* param)
|
||||
static void xf_send_rail_client_event(rdpChannels* channels, uint16 event_type, void* param)
|
||||
{
|
||||
RDP_EVENT* out_event = NULL;
|
||||
void * payload = NULL;
|
||||
@ -205,16 +205,16 @@ static void xf_send_rail_client_event(rdpChannels* chanman, uint16 event_type, v
|
||||
{
|
||||
out_event = freerdp_event_new(RDP_EVENT_CLASS_RAIL, event_type,
|
||||
xf_on_free_rail_client_event, payload);
|
||||
freerdp_channels_send_event(chanman, out_event);
|
||||
freerdp_channels_send_event(channels, out_event);
|
||||
}
|
||||
}
|
||||
|
||||
void xf_rail_send_windowmove(xfInfo* xfi, uint32 windowId, uint32 left, uint32 top, uint32 right, uint32 bottom)
|
||||
{
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
RAIL_WINDOW_MOVE_ORDER window_move;
|
||||
|
||||
chanman = xfi->context->channels;
|
||||
channels = xfi->_context->channels;
|
||||
|
||||
window_move.windowId = windowId;
|
||||
window_move.left = left;
|
||||
@ -222,18 +222,18 @@ void xf_rail_send_windowmove(xfInfo* xfi, uint32 windowId, uint32 left, uint32 t
|
||||
window_move.right = right;
|
||||
window_move.bottom = bottom;
|
||||
|
||||
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &window_move);
|
||||
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &window_move);
|
||||
}
|
||||
|
||||
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
rdpWindow* rail_window;
|
||||
RAIL_ACTIVATE_ORDER activate;
|
||||
|
||||
chanman = xfi->context->channels;
|
||||
rail = ((rdpContext*) xfi->context)->rail;
|
||||
rail = xfi->_context->rail;
|
||||
channels = xfi->_context->channels;
|
||||
|
||||
rail_window = window_list_get_by_extra_id(rail->list, (void*) xwindow);
|
||||
|
||||
@ -243,23 +243,23 @@ void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled)
|
||||
activate.windowId = rail_window->windowId;
|
||||
activate.enabled = enabled;
|
||||
|
||||
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
|
||||
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
|
||||
}
|
||||
|
||||
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
|
||||
{
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
RAIL_SYSCOMMAND_ORDER syscommand;
|
||||
|
||||
chanman = xfi->context->channels;
|
||||
channels = xfi->_context->channels;
|
||||
|
||||
syscommand.windowId = windowId;
|
||||
syscommand.command = command;
|
||||
|
||||
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_SYSCOMMAND, &syscommand);
|
||||
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_SYSCOMMAND, &syscommand);
|
||||
}
|
||||
|
||||
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_SYSPARAM_ORDER* sysparam;
|
||||
|
||||
@ -277,7 +277,7 @@ void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* chanman, RDP_
|
||||
|
||||
sysparam->dragFullWindows = False;
|
||||
|
||||
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS, sysparam);
|
||||
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS, sysparam);
|
||||
}
|
||||
|
||||
const char* error_code_names[] =
|
||||
@ -291,7 +291,7 @@ const char* error_code_names[] =
|
||||
"RAIL_EXEC_E_SESSION_LOCKED"
|
||||
};
|
||||
|
||||
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_EXEC_RESULT_ORDER* exec_result;
|
||||
|
||||
@ -304,7 +304,7 @@ void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* chanman, RDP_EV
|
||||
}
|
||||
}
|
||||
|
||||
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_SYSPARAM_ORDER* sysparam = (RAIL_SYSPARAM_ORDER*) event->user_data;
|
||||
|
||||
@ -318,7 +318,7 @@ void xf_process_rail_server_sysparam_event(xfInfo* xfi, rdpChannels* chanman, RD
|
||||
}
|
||||
}
|
||||
|
||||
void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rdpWindow* rail_window = NULL;
|
||||
@ -360,7 +360,7 @@ const char* movetype_names[] =
|
||||
"RAIL_WMSZ_KEYSIZE"
|
||||
};
|
||||
|
||||
void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
rdpRail* rail;
|
||||
rdpWindow* rail_window = NULL;
|
||||
@ -386,7 +386,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* chanma
|
||||
|
||||
}
|
||||
|
||||
void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_GET_APPID_RESP_ORDER* appid_resp =
|
||||
(RAIL_GET_APPID_RESP_ORDER*)event->user_data;
|
||||
@ -398,7 +398,7 @@ void xf_process_rail_appid_resp_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVE
|
||||
freerdp_hexdump(appid_resp->applicationId.string, appid_resp->applicationId.length);
|
||||
}
|
||||
|
||||
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_LANGBAR_INFO_ORDER* langbar =
|
||||
(RAIL_LANGBAR_INFO_ORDER*) event->user_data;
|
||||
@ -407,36 +407,36 @@ void xf_process_rail_langbarinfo_event(xfInfo* xfi, rdpChannels* chanman, RDP_EV
|
||||
langbar->languageBarStatus);
|
||||
}
|
||||
|
||||
void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event)
|
||||
void xf_process_rail_event(xfInfo* xfi, rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
switch (event->event_type)
|
||||
{
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS:
|
||||
xf_process_rail_get_sysparams_event(xfi, chanman, event);
|
||||
xf_process_rail_get_sysparams_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_EXEC_RESULTS:
|
||||
xf_process_rail_exec_result_event(xfi, chanman, event);
|
||||
xf_process_rail_exec_result_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_SYSPARAM:
|
||||
xf_process_rail_server_sysparam_event(xfi, chanman, event);
|
||||
xf_process_rail_server_sysparam_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_MINMAXINFO:
|
||||
xf_process_rail_server_minmaxinfo_event(xfi, chanman, event);
|
||||
xf_process_rail_server_minmaxinfo_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_LOCALMOVESIZE:
|
||||
xf_process_rail_server_localmovesize_event(xfi, chanman, event);
|
||||
xf_process_rail_server_localmovesize_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_APPID_RESP:
|
||||
xf_process_rail_appid_resp_event(xfi, chanman, event);
|
||||
xf_process_rail_appid_resp_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_LANGBARINFO:
|
||||
xf_process_rail_langbarinfo_event(xfi, chanman, event);
|
||||
xf_process_rail_langbarinfo_event(xfi, channels, event);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -74,6 +74,9 @@ struct thread_data
|
||||
freerdp* instance;
|
||||
};
|
||||
|
||||
int xf_process_client_args(rdpSettings* settings, const char* opt, const char* val, void* user_data);
|
||||
int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data);
|
||||
|
||||
void xf_context_size(freerdp* instance, uint32* size)
|
||||
{
|
||||
*size = sizeof(xfContext);
|
||||
@ -81,7 +84,8 @@ void xf_context_size(freerdp* instance, uint32* size)
|
||||
|
||||
void xf_context_new(freerdp* instance, xfContext* context)
|
||||
{
|
||||
context->channels = freerdp_channels_new();
|
||||
rdpContext* _context = &context->_p;
|
||||
_context->channels = freerdp_channels_new();
|
||||
}
|
||||
|
||||
void xf_context_free(freerdp* instance, xfContext* context)
|
||||
@ -527,10 +531,19 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
|
||||
xfi = (xfInfo*) xzalloc(sizeof(xfInfo));
|
||||
((xfContext*) instance->context)->xfi = xfi;
|
||||
|
||||
xfi->_context = instance->context;
|
||||
xfi->context = (xfContext*) instance->context;
|
||||
xfi->context->settings = instance->settings;
|
||||
xfi->instance = instance;
|
||||
|
||||
if (freerdp_parse_args(instance->settings, instance->context->argc, instance->context->argv,
|
||||
xf_process_plugin_args, instance->context->channels, xf_process_client_args, xfi) < 0)
|
||||
{
|
||||
printf("failed to parse arguments.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
settings = instance->settings;
|
||||
bitmap_cache = settings->bitmap_cache;
|
||||
|
||||
@ -559,7 +572,7 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
|
||||
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;
|
||||
|
||||
freerdp_channels_pre_connect(xfi->context->channels, instance);
|
||||
freerdp_channels_pre_connect(xfi->_context->channels, instance);
|
||||
|
||||
xfi->display = XOpenDisplay(NULL);
|
||||
|
||||
@ -623,11 +636,11 @@ boolean xf_post_connect(freerdp* instance)
|
||||
xfInfo* xfi;
|
||||
XGCValues gcv;
|
||||
rdpCache* cache;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
|
||||
xfi = ((xfContext*) instance->context)->xfi;
|
||||
cache = instance->context->cache;
|
||||
chanman = xfi->context->channels;
|
||||
channels = xfi->_context->channels;
|
||||
|
||||
if (xf_get_pixmap_info(xfi) != True)
|
||||
return False;
|
||||
@ -728,9 +741,9 @@ boolean xf_post_connect(freerdp* instance)
|
||||
cache->bitmap->BitmapFree = (cbBitmapFree) xf_bitmap_free;
|
||||
|
||||
offscreen_cache_register_callbacks(instance->update);
|
||||
cache->offscreen->OffscreenBitmapSize = (cbOffscreenBitmapSize) xf_bitmap_size;
|
||||
cache->offscreen->OffscreenBitmapNew = (cbOffscreenBitmapNew) xf_offscreen_bitmap_new;
|
||||
cache->offscreen->OffscreenBitmapFree = (cbOffscreenBitmapFree) xf_bitmap_free;
|
||||
cache->offscreen->BitmapSize = (cbBitmapSize) xf_bitmap_size;
|
||||
cache->offscreen->BitmapNew = (cbBitmapNew) xf_offscreen_bitmap_new;
|
||||
cache->offscreen->BitmapFree = (cbBitmapFree) xf_bitmap_free;
|
||||
cache->offscreen->SetSurface = (cbSetSurface) xf_set_surface;
|
||||
}
|
||||
|
||||
@ -738,12 +751,12 @@ boolean xf_post_connect(freerdp* instance)
|
||||
rail_register_update_callbacks(instance->context->rail, instance->update);
|
||||
xf_rail_register_callbacks(xfi, instance->context->rail);
|
||||
|
||||
freerdp_channels_post_connect(chanman, instance);
|
||||
freerdp_channels_post_connect(channels, instance);
|
||||
|
||||
xf_tsmf_init(xfi, xv_port);
|
||||
|
||||
if (xfi->remote_app != True)
|
||||
xf_cliprdr_init(xfi, chanman);
|
||||
xf_cliprdr_init(xfi, channels);
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -758,7 +771,7 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha
|
||||
return True;
|
||||
}
|
||||
|
||||
int xf_process_ui_args(rdpSettings* settings, const char* opt, const char* val, void* user_data)
|
||||
int xf_process_client_args(rdpSettings* settings, const char* opt, const char* val, void* user_data)
|
||||
{
|
||||
int argc = 0;
|
||||
|
||||
@ -798,10 +811,10 @@ int xf_process_ui_args(rdpSettings* settings, const char* opt, const char* val,
|
||||
|
||||
int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data)
|
||||
{
|
||||
rdpChannels* chanman = (rdpChannels*) user_data;
|
||||
rdpChannels* channels = (rdpChannels*) user_data;
|
||||
|
||||
printf("loading plugin %s\n", name);
|
||||
freerdp_channels_load_plugin(chanman, settings, name, plugin_data);
|
||||
freerdp_channels_load_plugin(channels, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -870,14 +883,21 @@ void xf_window_free(xfInfo* xfi)
|
||||
xfi->image = NULL;
|
||||
}
|
||||
|
||||
if (context->cache)
|
||||
if (context != NULL)
|
||||
{
|
||||
cache_free(context->cache);
|
||||
context->cache = NULL;
|
||||
if (context->cache != NULL)
|
||||
{
|
||||
cache_free(context->cache);
|
||||
context->cache = NULL;
|
||||
}
|
||||
if (context->rail != NULL)
|
||||
{
|
||||
rail_free(context->rail);
|
||||
context->rail = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
xfree(xfi->clrconv);
|
||||
rail_free(context->rail);
|
||||
|
||||
xf_tsmf_uninit(xfi);
|
||||
xf_cliprdr_uninit(xfi);
|
||||
@ -902,28 +922,28 @@ int xfreerdp_run(freerdp* instance)
|
||||
void* wfds[32];
|
||||
fd_set rfds_set;
|
||||
fd_set wfds_set;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
|
||||
memset(rfds, 0, sizeof(rfds));
|
||||
memset(wfds, 0, sizeof(wfds));
|
||||
|
||||
if (!instance->Connect(instance))
|
||||
if (!freerdp_connect(instance))
|
||||
return 0;
|
||||
|
||||
xfi = ((xfContext*) instance->context)->xfi;
|
||||
chanman = ((xfContext*) instance->context)->channels;
|
||||
channels = instance->context->channels;
|
||||
|
||||
while (1)
|
||||
{
|
||||
rcount = 0;
|
||||
wcount = 0;
|
||||
|
||||
if (instance->GetFileDescriptor(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get FreeRDP file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_get_fds(chanman, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get channel manager file descriptor\n");
|
||||
break;
|
||||
@ -964,7 +984,7 @@ int xfreerdp_run(freerdp* instance)
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->CheckFileDescriptor(instance) != True)
|
||||
if (freerdp_check_fds(instance) != True)
|
||||
{
|
||||
printf("Failed to check FreeRDP file descriptor\n");
|
||||
break;
|
||||
@ -974,17 +994,17 @@ int xfreerdp_run(freerdp* instance)
|
||||
printf("Failed to check xfreerdp file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_check_fds(chanman, instance) != True)
|
||||
if (freerdp_channels_check_fds(channels, instance) != True)
|
||||
{
|
||||
printf("Failed to check channel manager file descriptor\n");
|
||||
break;
|
||||
}
|
||||
xf_process_channel_event(chanman, instance);
|
||||
xf_process_channel_event(channels, instance);
|
||||
}
|
||||
|
||||
freerdp_channels_close(chanman, instance);
|
||||
freerdp_channels_free(chanman);
|
||||
instance->Disconnect(instance);
|
||||
freerdp_channels_close(channels, instance);
|
||||
freerdp_channels_free(channels);
|
||||
freerdp_disconnect(instance);
|
||||
gdi_free(instance);
|
||||
freerdp_free(instance);
|
||||
xf_free(xfi);
|
||||
@ -1015,7 +1035,6 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
pthread_t thread;
|
||||
freerdp* instance;
|
||||
xfContext* context;
|
||||
struct thread_data* data;
|
||||
|
||||
freerdp_handle_signals();
|
||||
@ -1037,12 +1056,9 @@ int main(int argc, char* argv[])
|
||||
instance->ContextFree = (pcContextFree) xf_context_free;
|
||||
freerdp_context_new(instance);
|
||||
|
||||
instance->context->argc = argc;
|
||||
instance->context->argv = argv;
|
||||
instance->settings->sw_gdi = False;
|
||||
context = (xfContext*) instance->context;
|
||||
|
||||
if (freerdp_parse_args(instance->settings, argc, argv,
|
||||
xf_process_plugin_args, context->channels, xf_process_ui_args, NULL) < 0)
|
||||
return 1;
|
||||
|
||||
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
|
||||
data->instance = instance;
|
||||
|
@ -63,7 +63,7 @@ struct xf_context
|
||||
rdpContext _p;
|
||||
|
||||
xfInfo* xfi;
|
||||
rdpChannels* channels;
|
||||
//rdpChannels* channels;
|
||||
rdpSettings* settings;
|
||||
};
|
||||
typedef struct xf_context xfContext;
|
||||
@ -72,6 +72,7 @@ struct xf_info
|
||||
{
|
||||
freerdp* instance;
|
||||
xfContext* context;
|
||||
rdpContext* _context;
|
||||
|
||||
GC gc;
|
||||
int bpp;
|
||||
|
@ -50,7 +50,7 @@ struct tf_context
|
||||
rdpContext _p;
|
||||
|
||||
tfInfo* tfi;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
};
|
||||
typedef struct tf_context tfContext;
|
||||
|
||||
@ -72,7 +72,7 @@ void tf_context_size(freerdp* instance, uint32* size)
|
||||
|
||||
void tf_context_new(freerdp* instance, tfContext* context)
|
||||
{
|
||||
context->chanman = freerdp_channels_new();
|
||||
context->channels = freerdp_channels_new();
|
||||
}
|
||||
|
||||
void tf_context_free(freerdp* instance, tfContext* context)
|
||||
@ -101,15 +101,15 @@ int tf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int s
|
||||
|
||||
int tf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data)
|
||||
{
|
||||
rdpChannels* chanman = (rdpChannels*) user_data;
|
||||
rdpChannels* channels = (rdpChannels*) user_data;
|
||||
|
||||
printf("Load plugin %s\n", name);
|
||||
freerdp_channels_load_plugin(chanman, settings, name, plugin_data);
|
||||
freerdp_channels_load_plugin(channels, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void tf_process_cb_sync_event(rdpChannels* chanman, freerdp* instance)
|
||||
void tf_process_cb_sync_event(rdpChannels* channels, freerdp* instance)
|
||||
{
|
||||
RDP_EVENT* event;
|
||||
RDP_CB_FORMAT_LIST_EVENT* format_list_event;
|
||||
@ -119,21 +119,21 @@ void tf_process_cb_sync_event(rdpChannels* chanman, freerdp* instance)
|
||||
format_list_event = (RDP_CB_FORMAT_LIST_EVENT*)event;
|
||||
format_list_event->num_formats = 0;
|
||||
|
||||
freerdp_channels_send_event(chanman, event);
|
||||
freerdp_channels_send_event(channels, event);
|
||||
}
|
||||
|
||||
void tf_process_channel_event(rdpChannels* chanman, freerdp* instance)
|
||||
void tf_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||
{
|
||||
RDP_EVENT* event;
|
||||
|
||||
event = freerdp_channels_pop_event(chanman);
|
||||
event = freerdp_channels_pop_event(channels);
|
||||
|
||||
if (event)
|
||||
{
|
||||
switch (event->event_type)
|
||||
{
|
||||
case RDP_EVENT_TYPE_CB_SYNC:
|
||||
tf_process_cb_sync_event(chanman, instance);
|
||||
tf_process_cb_sync_event(channels, instance);
|
||||
break;
|
||||
default:
|
||||
printf("tf_process_channel_event: unknown event type %d\n", event->event_type);
|
||||
@ -179,7 +179,7 @@ boolean tf_pre_connect(freerdp* instance)
|
||||
settings->order_support[NEG_ELLIPSE_SC_INDEX] = True;
|
||||
settings->order_support[NEG_ELLIPSE_CB_INDEX] = True;
|
||||
|
||||
freerdp_channels_pre_connect(context->chanman, instance);
|
||||
freerdp_channels_pre_connect(context->channels, instance);
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -197,7 +197,7 @@ boolean tf_post_connect(freerdp* instance)
|
||||
instance->update->BeginPaint = tf_begin_paint;
|
||||
instance->update->EndPaint = tf_end_paint;
|
||||
|
||||
freerdp_channels_post_connect(context->chanman, instance);
|
||||
freerdp_channels_post_connect(context->channels, instance);
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -214,27 +214,27 @@ int tfreerdp_run(freerdp* instance)
|
||||
fd_set rfds_set;
|
||||
fd_set wfds_set;
|
||||
tfContext* context;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
|
||||
memset(rfds, 0, sizeof(rfds));
|
||||
memset(wfds, 0, sizeof(wfds));
|
||||
|
||||
context = (tfContext*) instance->context;
|
||||
chanman = context->chanman;
|
||||
channels = context->channels;
|
||||
|
||||
instance->Connect(instance);
|
||||
freerdp_connect(instance);
|
||||
|
||||
while (1)
|
||||
{
|
||||
rcount = 0;
|
||||
wcount = 0;
|
||||
|
||||
if (instance->GetFileDescriptor(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get FreeRDP file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_get_fds(chanman, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
|
||||
{
|
||||
printf("Failed to get channel manager file descriptor\n");
|
||||
break;
|
||||
@ -269,21 +269,21 @@ int tfreerdp_run(freerdp* instance)
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->CheckFileDescriptor(instance) != True)
|
||||
if (freerdp_check_fds(instance) != True)
|
||||
{
|
||||
printf("Failed to check FreeRDP file descriptor\n");
|
||||
break;
|
||||
}
|
||||
if (freerdp_channels_check_fds(chanman, instance) != True)
|
||||
if (freerdp_channels_check_fds(channels, instance) != True)
|
||||
{
|
||||
printf("Failed to check channel manager file descriptor\n");
|
||||
break;
|
||||
}
|
||||
tf_process_channel_event(chanman, instance);
|
||||
tf_process_channel_event(channels, instance);
|
||||
}
|
||||
|
||||
freerdp_channels_close(chanman, instance);
|
||||
freerdp_channels_free(chanman);
|
||||
freerdp_channels_close(channels, instance);
|
||||
freerdp_channels_free(channels);
|
||||
freerdp_free(instance);
|
||||
|
||||
return 0;
|
||||
@ -314,7 +314,7 @@ int main(int argc, char* argv[])
|
||||
freerdp* instance;
|
||||
tfContext* context;
|
||||
struct thread_data* data;
|
||||
rdpChannels* chanman;
|
||||
rdpChannels* channels;
|
||||
|
||||
freerdp_channels_global_init();
|
||||
|
||||
@ -331,9 +331,9 @@ int main(int argc, char* argv[])
|
||||
freerdp_context_new(instance);
|
||||
|
||||
context = (tfContext*) instance->context;
|
||||
chanman = context->chanman;
|
||||
channels = context->channels;
|
||||
|
||||
freerdp_parse_args(instance->settings, argc, argv, tf_process_plugin_args, chanman, NULL, NULL);
|
||||
freerdp_parse_args(instance->settings, argc, argv, tf_process_plugin_args, channels, NULL, NULL);
|
||||
|
||||
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
|
||||
data->instance = instance;
|
||||
|
8
include/freerdp/cache/bitmap.h
vendored
8
include/freerdp/cache/bitmap.h
vendored
@ -29,6 +29,10 @@
|
||||
typedef struct _BITMAP_V2_CELL BITMAP_V2_CELL;
|
||||
typedef struct rdp_bitmap_cache rdpBitmapCache;
|
||||
|
||||
typedef void (*cbBitmapSize)(rdpUpdate* update, uint32* size);
|
||||
typedef void (*cbBitmapNew)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
typedef void (*cbBitmapFree)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
|
||||
#include <freerdp/cache/cache.h>
|
||||
|
||||
struct _BITMAP_V2_CELL
|
||||
@ -37,10 +41,6 @@ struct _BITMAP_V2_CELL
|
||||
rdpBitmap** entries;
|
||||
};
|
||||
|
||||
typedef void (*cbBitmapSize)(rdpUpdate* update, uint32* size);
|
||||
typedef void (*cbBitmapNew)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
typedef void (*cbBitmapFree)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
|
||||
struct rdp_bitmap_cache
|
||||
{
|
||||
pcMemBlt MemBlt;
|
||||
|
4
include/freerdp/cache/brush.h
vendored
4
include/freerdp/cache/brush.h
vendored
@ -41,8 +41,8 @@ struct rdp_brush
|
||||
};
|
||||
typedef struct rdp_brush rdpBrushCache;
|
||||
|
||||
FREERDP_API void* brush_get(rdpBrushCache* brush, uint8 index, uint8* bpp);
|
||||
FREERDP_API void brush_put(rdpBrushCache* brush, uint8 index, void* entry, uint8 bpp);
|
||||
FREERDP_API void* brush_cache_get(rdpBrushCache* brush, uint8 index, uint8* bpp);
|
||||
FREERDP_API void brush_cache_put(rdpBrushCache* brush, uint8 index, void* entry, uint8 bpp);
|
||||
|
||||
FREERDP_API rdpBrushCache* brush_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void brush_cache_free(rdpBrushCache* brush);
|
||||
|
13
include/freerdp/cache/offscreen.h
vendored
13
include/freerdp/cache/offscreen.h
vendored
@ -27,20 +27,15 @@
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
typedef struct rdp_offscreen_cache rdpOffscreenCache;
|
||||
typedef void (*cbSetSurface)(rdpUpdate* update, rdpBitmap* bitmap, boolean primary);
|
||||
|
||||
#include <freerdp/cache/cache.h>
|
||||
|
||||
typedef void (*cbOffscreenBitmapSize)(rdpUpdate* update, uint32* size);
|
||||
typedef void (*cbOffscreenBitmapNew)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
typedef void (*cbOffscreenBitmapFree)(rdpUpdate* update, rdpBitmap* bitmap);
|
||||
typedef void (*cbSetSurface)(rdpUpdate* update, rdpBitmap* bitmap, boolean primary);
|
||||
|
||||
struct rdp_offscreen_cache
|
||||
{
|
||||
cbOffscreenBitmapSize OffscreenBitmapSize;
|
||||
cbOffscreenBitmapNew OffscreenBitmapNew;
|
||||
cbOffscreenBitmapFree OffscreenBitmapFree;
|
||||
|
||||
cbBitmapSize BitmapSize;
|
||||
cbBitmapNew BitmapNew;
|
||||
cbBitmapFree BitmapFree;
|
||||
cbSetSurface SetSurface;
|
||||
|
||||
uint16 currentSurface;
|
||||
|
@ -18,18 +18,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __FREERDP_CHANMAN_H
|
||||
#define __FREERDP_CHANMAN_H
|
||||
#ifndef __FREERDP_CHANNELS_H
|
||||
#define __FREERDP_CHANNELS_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct rdp_channels rdpChannels;
|
||||
|
||||
FREERDP_API int freerdp_channels_global_init(void);
|
||||
FREERDP_API int freerdp_channels_global_uninit(void);
|
||||
FREERDP_API rdpChannels* freerdp_channels_new(void);
|
||||
@ -51,4 +50,4 @@ FREERDP_API void freerdp_channels_close(rdpChannels* channels, freerdp* instance
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __FREERDP_CHANNELS_H */
|
||||
|
@ -24,6 +24,8 @@ typedef struct rdp_rdp rdpRdp;
|
||||
typedef struct rdp_gdi rdpGdi;
|
||||
typedef struct rdp_rail rdpRail;
|
||||
typedef struct rdp_cache rdpCache;
|
||||
typedef struct rdp_channels rdpChannels;
|
||||
|
||||
typedef struct rdp_freerdp freerdp;
|
||||
typedef struct rdp_context rdpContext;
|
||||
|
||||
@ -39,31 +41,31 @@ typedef struct rdp_context rdpContext;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API boolean freerdp_global_init();
|
||||
FREERDP_API void freerdp_global_finish();
|
||||
|
||||
typedef boolean (*pcConnect)(freerdp* instance);
|
||||
typedef boolean (*pcPreConnect)(freerdp* instance);
|
||||
typedef boolean (*pcPostConnect)(freerdp* instance);
|
||||
typedef boolean (*pcAuthenticate)(freerdp* instance, char** username, char** password, char** domain);
|
||||
typedef boolean (*pcGetFileDescriptor)(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount);
|
||||
typedef boolean (*pcCheckFileDescriptor)(freerdp* instance);
|
||||
typedef int (*pcSendChannelData)(freerdp* instance, int channelId, uint8* data, int size);
|
||||
typedef int (*pcReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size);
|
||||
typedef void (*pcDisconnect)(freerdp* instance);
|
||||
|
||||
typedef void (*pcContextSize)(freerdp* instance, uint32* size);
|
||||
typedef void (*pcContextNew)(freerdp* instance, rdpContext* context);
|
||||
typedef void (*pcContextFree)(freerdp* instance, rdpContext* context);
|
||||
|
||||
typedef boolean (*pcPreConnect)(freerdp* instance);
|
||||
typedef boolean (*pcPostConnect)(freerdp* instance);
|
||||
typedef boolean (*pcAuthenticate)(freerdp* instance, char** username, char** password, char** domain);
|
||||
|
||||
typedef int (*pcSendChannelData)(freerdp* instance, int channelId, uint8* data, int size);
|
||||
typedef int (*pcReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size);
|
||||
|
||||
struct rdp_context
|
||||
{
|
||||
freerdp* instance;
|
||||
|
||||
int argc;
|
||||
char** argv;
|
||||
|
||||
rdpRdp* rdp;
|
||||
rdpGdi* gdi;
|
||||
rdpRail* rail;
|
||||
rdpCache* cache;
|
||||
rdpChannels* channels;
|
||||
|
||||
void* reserved[32 - 6];
|
||||
};
|
||||
|
||||
struct rdp_freerdp
|
||||
@ -78,20 +80,23 @@ struct rdp_freerdp
|
||||
pcContextNew ContextNew;
|
||||
pcContextFree ContextFree;
|
||||
|
||||
pcConnect Connect;
|
||||
pcPreConnect PreConnect;
|
||||
pcPostConnect PostConnect;
|
||||
pcAuthenticate Authenticate;
|
||||
pcGetFileDescriptor GetFileDescriptor;
|
||||
pcCheckFileDescriptor CheckFileDescriptor;
|
||||
|
||||
pcSendChannelData SendChannelData;
|
||||
pcReceiveChannelData ReceiveChannelData;
|
||||
pcDisconnect Disconnect;
|
||||
};
|
||||
|
||||
FREERDP_API void freerdp_context_new(freerdp* instance);
|
||||
FREERDP_API void freerdp_context_free(freerdp* instance);
|
||||
|
||||
FREERDP_API boolean freerdp_connect(freerdp* instance);
|
||||
FREERDP_API boolean freerdp_disconnect(freerdp* instance);
|
||||
|
||||
FREERDP_API boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount);
|
||||
FREERDP_API boolean freerdp_check_fds(freerdp* instance);
|
||||
|
||||
FREERDP_API freerdp* freerdp_new();
|
||||
FREERDP_API void freerdp_free(freerdp* instance);
|
||||
|
||||
|
@ -1047,6 +1047,7 @@ typedef void (*pcDesktopResize)(rdpUpdate* update);
|
||||
typedef void (*pcBitmap)(rdpUpdate* update, BITMAP_UPDATE* bitmap);
|
||||
typedef void (*pcPalette)(rdpUpdate* update, PALETTE_UPDATE* palette);
|
||||
typedef void (*pcPlaySound)(rdpUpdate* update, PLAY_SOUND_UPDATE* play_sound);
|
||||
|
||||
typedef void (*pcPointerPosition)(rdpUpdate* update, POINTER_POSITION_UPDATE* pointer_position);
|
||||
typedef void (*pcPointerSystem)(rdpUpdate* update, POINTER_SYSTEM_UPDATE* pointer_system);
|
||||
typedef void (*pcPointerColor)(rdpUpdate* update, POINTER_COLOR_UPDATE* pointer_color);
|
||||
@ -1117,10 +1118,6 @@ struct rdp_update
|
||||
{
|
||||
rdpContext* context;
|
||||
|
||||
boolean dump_rfx;
|
||||
boolean play_rfx;
|
||||
rdpPcap* pcap_rfx;
|
||||
|
||||
pcBeginPaint BeginPaint;
|
||||
pcEndPaint EndPaint;
|
||||
pcSetBounds SetBounds;
|
||||
@ -1158,7 +1155,6 @@ struct rdp_update
|
||||
pcEllipseSC EllipseSC;
|
||||
pcEllipseCB EllipseCB;
|
||||
|
||||
boolean glyph_v2;
|
||||
pcCacheBitmap CacheBitmap;
|
||||
pcCacheBitmapV2 CacheBitmapV2;
|
||||
pcCacheBitmapV3 CacheBitmapV3;
|
||||
@ -1196,6 +1192,12 @@ struct rdp_update
|
||||
|
||||
pcBitmapDecompress BitmapDecompress;
|
||||
|
||||
boolean glyph_v2;
|
||||
|
||||
boolean dump_rfx;
|
||||
boolean play_rfx;
|
||||
rdpPcap* pcap_rfx;
|
||||
|
||||
BITMAP_UPDATE bitmap_update;
|
||||
PALETTE_UPDATE palette_update;
|
||||
PLAY_SOUND_UPDATE play_sound;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <freerdp/cache/brush.h>
|
||||
|
||||
void* brush_get(rdpBrushCache* brush, uint8 index, uint8* bpp)
|
||||
void* brush_cache_get(rdpBrushCache* brush, uint8 index, uint8* bpp)
|
||||
{
|
||||
void* entry;
|
||||
|
||||
@ -58,7 +58,7 @@ void* brush_get(rdpBrushCache* brush, uint8 index, uint8* bpp)
|
||||
return entry;
|
||||
}
|
||||
|
||||
void brush_put(rdpBrushCache* brush, uint8 index, void* entry, uint8 bpp)
|
||||
void brush_cache_put(rdpBrushCache* brush, uint8 index, void* entry, uint8 bpp)
|
||||
{
|
||||
if (bpp == 1)
|
||||
{
|
||||
|
@ -29,18 +29,18 @@ void update_gdi_create_offscreen_bitmap(rdpUpdate* update, CREATE_OFFSCREEN_BITM
|
||||
uint32 size = sizeof(rdpBitmap);
|
||||
rdpCache* cache = update->context->cache;
|
||||
|
||||
IFCALL(cache->offscreen->OffscreenBitmapSize, update, &size);
|
||||
IFCALL(cache->offscreen->BitmapSize, update, &size);
|
||||
bitmap = (rdpBitmap*) xzalloc(size);
|
||||
|
||||
bitmap->width = create_offscreen_bitmap->cx;
|
||||
bitmap->height = create_offscreen_bitmap->cy;
|
||||
|
||||
IFCALL(cache->offscreen->OffscreenBitmapNew, update, bitmap);
|
||||
IFCALL(cache->offscreen->BitmapNew, update, bitmap);
|
||||
prevBitmap = offscreen_cache_get(cache->offscreen, create_offscreen_bitmap->id);
|
||||
|
||||
if (prevBitmap != NULL)
|
||||
{
|
||||
IFCALL(cache->offscreen->OffscreenBitmapFree, update, prevBitmap);
|
||||
IFCALL(cache->offscreen->BitmapFree, update, prevBitmap);
|
||||
bitmap_free(prevBitmap);
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ void offscreen_cache_free(rdpOffscreenCache* offscreen_cache)
|
||||
|
||||
if (bitmap != NULL)
|
||||
{
|
||||
IFCALL(offscreen_cache->OffscreenBitmapFree, offscreen_cache->update, bitmap);
|
||||
IFCALL(offscreen_cache->BitmapFree, offscreen_cache->update, bitmap);
|
||||
bitmap_free(bitmap);
|
||||
}
|
||||
}
|
||||
|
@ -825,9 +825,9 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* chan_man, RDP_EVENT* ev
|
||||
*/
|
||||
static void freerdp_channels_process_sync(rdpChannels* chan_man, freerdp* instance)
|
||||
{
|
||||
struct channel_data* lchan_data;
|
||||
rdpChannel* lrdp_chan;
|
||||
struct sync_data* item;
|
||||
struct channel_data* lchan_data;
|
||||
|
||||
while (chan_man->sync_data_list->head != NULL)
|
||||
{
|
||||
@ -838,10 +838,10 @@ static void freerdp_channels_process_sync(rdpChannels* chan_man, freerdp* instan
|
||||
lchan_data = chan_man->chans + item->index;
|
||||
lrdp_chan = freerdp_channels_find_channel_by_name(chan_man, instance->settings,
|
||||
lchan_data->name, &item->index);
|
||||
|
||||
if (lrdp_chan != NULL)
|
||||
{
|
||||
IFCALL(instance->SendChannelData, instance, lrdp_chan->channel_id, item->data, item->data_length);
|
||||
}
|
||||
instance->SendChannelData(instance, lrdp_chan->channel_id, item->data, item->data_length);
|
||||
|
||||
if (lchan_data->open_event_proc != 0)
|
||||
{
|
||||
lchan_data->open_event_proc(lchan_data->open_handle,
|
||||
|
@ -113,12 +113,14 @@ static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* d
|
||||
return rdp_send_channel_data(instance->context->rdp, channel_id, data, size);
|
||||
}
|
||||
|
||||
void freerdp_disconnect(freerdp* instance)
|
||||
boolean freerdp_disconnect(freerdp* instance)
|
||||
{
|
||||
rdpRdp* rdp;
|
||||
|
||||
rdp = instance->context->rdp;
|
||||
transport_disconnect(rdp->transport);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
void freerdp_context_new(freerdp* instance)
|
||||
@ -157,11 +159,7 @@ freerdp* freerdp_new()
|
||||
|
||||
if (instance != NULL)
|
||||
{
|
||||
instance->Connect = freerdp_connect;
|
||||
instance->GetFileDescriptor = freerdp_get_fds;
|
||||
instance->CheckFileDescriptor = freerdp_check_fds;
|
||||
instance->SendChannelData = freerdp_send_channel_data;
|
||||
instance->Disconnect = freerdp_disconnect;
|
||||
}
|
||||
|
||||
return instance;
|
||||
|
@ -558,7 +558,7 @@ void gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
|
||||
|
||||
if (brush->style & CACHED_BRUSH)
|
||||
{
|
||||
brush->data = brush_get(cache->brush, brush->index, &brush->bpp);
|
||||
brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp);
|
||||
brush->style = GDI_BS_PATTERN;
|
||||
}
|
||||
|
||||
@ -873,7 +873,7 @@ void gdi_cache_glyph_v2(rdpUpdate* update, CACHE_GLYPH_V2_ORDER* cache_glyph_v2)
|
||||
void gdi_cache_brush(rdpUpdate* update, CACHE_BRUSH_ORDER* cache_brush)
|
||||
{
|
||||
rdpCache* cache = update->context->cache;
|
||||
brush_put(cache->brush, cache_brush->index, cache_brush->data, cache_brush->bpp);
|
||||
brush_cache_put(cache->brush, cache_brush->index, cache_brush->data, cache_brush->bpp);
|
||||
}
|
||||
|
||||
int tilenum = 0;
|
||||
@ -1191,9 +1191,9 @@ int gdi_init(freerdp* instance, uint32 flags, uint8* buffer)
|
||||
cache->bitmap->BitmapFree = (cbBitmapFree) gdi_bitmap_free;
|
||||
|
||||
offscreen_cache_register_callbacks(instance->update);
|
||||
cache->offscreen->OffscreenBitmapSize = (cbOffscreenBitmapSize) gdi_bitmap_size;
|
||||
cache->offscreen->OffscreenBitmapNew = (cbOffscreenBitmapNew) gdi_offscreen_bitmap_new;
|
||||
cache->offscreen->OffscreenBitmapFree = (cbOffscreenBitmapFree) gdi_bitmap_free;
|
||||
cache->offscreen->BitmapSize = (cbBitmapSize) gdi_bitmap_size;
|
||||
cache->offscreen->BitmapNew = (cbBitmapNew) gdi_offscreen_bitmap_new;
|
||||
cache->offscreen->BitmapFree = (cbBitmapFree) gdi_bitmap_free;
|
||||
cache->offscreen->SetSurface = (cbSetSurface) gdi_set_surface;
|
||||
|
||||
gdi->rfx_context = rfx_context_new();
|
||||
|
Loading…
Reference in New Issue
Block a user