#include "pf_context.h"
#include "pf_update.h"
#include "pf_log.h"
+#include "pf_modules.h"
#define TAG PROXY_TAG("client")
pServerContext* ps = pc->pdata->ps;
rdpSettings* settings = instance->settings;
+ if (!pf_modules_run_hook(HOOK_TYPE_CLIENT_PRE_CONNECT, (rdpContext*)ps))
+ return FALSE;
+
/*
* as the client's settings are copied from the server's, GlyphSupportLevel might not be
* GLYPH_SUPPORT_NONE. the proxy currently do not support GDI & GLYPH_SUPPORT_CACHE, so
#include "pf_input.h"
#include "pf_context.h"
+#include "pf_modules.h"
static BOOL pf_server_synchronize_event(rdpInput* input, UINT32 flags)
{
static BOOL pf_server_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
{
- BOOL result = FALSE;
pServerContext* ps = (pServerContext*)input->context;
pClientContext* pc = ps->pdata->pc;
rdpContext* context = (rdpContext*) pc;
event.flags = flags;
event.rdp_scan_code = code;
- RUN_FILTER(config->Filters, FILTER_TYPE_KEYBOARD, ps->pdata->info, &event, result,
- freerdp_input_send_keyboard_event, context->input, flags, code);
- return result;
+ if (pf_modules_run_filter(FILTER_TYPE_KEYBOARD, input->context, &event))
+ return freerdp_input_send_keyboard_event(context->input, flags, code);
+
+ return TRUE;
}
static BOOL pf_server_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
static BOOL pf_server_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
{
- BOOL result = FALSE;
pServerContext* ps = (pServerContext*)input->context;
pClientContext* pc = ps->pdata->pc;
rdpContext* context = (rdpContext*) pc;
event.x = x;
event.y = y;
- RUN_FILTER(config->Filters, FILTER_TYPE_MOUSE, ps->pdata->info, &event, result,
- freerdp_input_send_mouse_event, context->input, flags, x, y);
- return result;
+ if (pf_modules_run_filter(FILTER_TYPE_MOUSE, input->context, &event))
+ return freerdp_input_send_mouse_event(context->input, flags, x, y);
+
+ return TRUE;
}
static BOOL pf_server_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x,