FreeRDP
proxy_modules.h
1 
21 #ifndef FREERDP_SERVER_PROXY_MODULES_H
22 #define FREERDP_SERVER_PROXY_MODULES_H
23 
24 #include <winpr/wtypes.h>
25 #include <winpr/collections.h>
26 
27 #include <freerdp/server/proxy/proxy_modules_api.h>
28 
29 typedef enum
30 {
31  FILTER_TYPE_KEYBOARD, /* proxyKeyboardEventInfo */
32  FILTER_TYPE_UNICODE, /* proxyUnicodeEventInfo */
33  FILTER_TYPE_MOUSE, /* proxyMouseEventInfo */
34  FILTER_TYPE_MOUSE_EX, /* proxyMouseExEventInfo */
35  FILTER_TYPE_CLIENT_PASSTHROUGH_CHANNEL_DATA, /* proxyChannelDataEventInfo */
36  FILTER_TYPE_SERVER_PASSTHROUGH_CHANNEL_DATA, /* proxyChannelDataEventInfo */
37  FILTER_TYPE_CLIENT_PASSTHROUGH_DYN_CHANNEL_CREATE, /* proxyChannelDataEventInfo */
38  FILTER_TYPE_SERVER_FETCH_TARGET_ADDR, /* proxyFetchTargetEventInfo */
39  FILTER_TYPE_SERVER_PEER_LOGON, /* proxyServerPeerLogon */
40  FILTER_TYPE_CLIENT_PASSTHROUGH_CHANNEL_CREATE, /* proxyChannelDataEventInfo */
41 
42  FILTER_TYPE_STATIC_INTERCEPT_LIST, /* proxyChannelToInterceptData */
43  FILTER_TYPE_DYN_INTERCEPT_LIST, /* proxyChannelToInterceptData */
44  FILTER_TYPE_INTERCEPT_CHANNEL, /* proxyDynChannelInterceptData */
45  FILTER_LAST
46 } PF_FILTER_TYPE;
47 
48 typedef enum
49 {
50  HOOK_TYPE_CLIENT_INIT_CONNECT,
51  HOOK_TYPE_CLIENT_UNINIT_CONNECT,
52  HOOK_TYPE_CLIENT_PRE_CONNECT,
53  HOOK_TYPE_CLIENT_POST_CONNECT,
54  HOOK_TYPE_CLIENT_POST_DISCONNECT,
55  HOOK_TYPE_CLIENT_REDIRECT,
56  HOOK_TYPE_CLIENT_VERIFY_X509,
57  HOOK_TYPE_CLIENT_LOGIN_FAILURE,
58  HOOK_TYPE_CLIENT_END_PAINT,
59  HOOK_TYPE_CLIENT_LOAD_CHANNELS,
60 
61  HOOK_TYPE_SERVER_POST_CONNECT,
62  HOOK_TYPE_SERVER_ACTIVATE,
63  HOOK_TYPE_SERVER_CHANNELS_INIT,
64  HOOK_TYPE_SERVER_CHANNELS_FREE,
65  HOOK_TYPE_SERVER_SESSION_END,
66  HOOK_TYPE_SERVER_SESSION_INITIALIZE,
67  HOOK_TYPE_SERVER_SESSION_STARTED,
68 
69  HOOK_LAST
70 } PF_HOOK_TYPE;
71 
72 #ifdef __cplusplus
73 extern "C"
74 {
75 #endif
76 
77  proxyModule* pf_modules_new(const char* root_dir, const char** modules, size_t count);
78 
84  BOOL pf_modules_add(proxyModule* module, proxyModuleEntryPoint ep, void* userdata);
85 
86  BOOL pf_modules_is_plugin_loaded(proxyModule* module, const char* plugin_name);
87  void pf_modules_list_loaded_plugins(proxyModule* module);
88 
89  BOOL pf_modules_run_filter(proxyModule* module, PF_FILTER_TYPE type, proxyData* pdata,
90  void* param);
91  BOOL pf_modules_run_hook(proxyModule* module, PF_HOOK_TYPE type, proxyData* pdata,
92  void* custom);
93 
94  void pf_modules_free(proxyModule* module);
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /* FREERDP_SERVER_PROXY_MODULES_H */