20 #ifndef FREERDP_LISTENER_H
21 #define FREERDP_LISTENER_H
23 #include <freerdp/api.h>
24 #include <freerdp/types.h>
25 #include <freerdp/settings.h>
26 #include <freerdp/peer.h>
35 typedef BOOL (*psListenerOpen)(freerdp_listener* instance,
const char* bind_address,
37 typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance,
const char* path);
38 typedef BOOL (*psListenerOpenFromSocket)(freerdp_listener* instance,
int fd);
39 #if defined(WITH_FREERDP_DEPRECATED)
40 WINPR_DEPRECATED_VAR(
"Use psListenerGetEventHandles instead",
41 typedef BOOL (*psListenerGetFileDescriptor)(freerdp_listener* instance,
42 void** rfds,
int* rcount);)
44 typedef DWORD (*psListenerGetEventHandles)(freerdp_listener* instance, HANDLE* events,
46 typedef BOOL (*psListenerCheckFileDescriptor)(freerdp_listener* instance);
47 typedef void (*psListenerClose)(freerdp_listener* instance);
48 typedef BOOL (*psPeerAccepted)(freerdp_listener* instance, freerdp_peer* client);
60 psListenerOpenLocal OpenLocal;
61 #if defined(WITH_FREERDP_DEPRECATED)
62 WINPR_DEPRECATED_VAR(
"Use rdp_freerdp_listener::GetEventHandles instead",
63 psListenerGetFileDescriptor GetFileDescriptor;)
67 psListenerGetEventHandles GetEventHandles;
68 psListenerCheckFileDescriptor CheckFileDescriptor;
69 psListenerClose Close;
71 psPeerAccepted PeerAccepted;
72 psListenerOpenFromSocket OpenFromSocket;
74 psListenerCheckFileDescriptor CheckPeerAcceptRestrictions;
77 FREERDP_API
void freerdp_listener_free(freerdp_listener* instance);
79 WINPR_ATTR_MALLOC(freerdp_listener_free, 1)
80 FREERDP_API freerdp_listener* freerdp_listener_new(
void);