FreeRDP
rdpecam-enumerator.h
1 
20 #ifndef FREERDP_CHANNEL_CAM_DEV_ENUM_SERVER_CAM_DEV_ENUM_H
21 #define FREERDP_CHANNEL_CAM_DEV_ENUM_SERVER_CAM_DEV_ENUM_H
22 
23 #include <freerdp/channels/rdpecam.h>
24 #include <freerdp/channels/wtsvc.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31  typedef struct s_cam_dev_enum_server_context CamDevEnumServerContext;
32 
33  typedef UINT (*psCamDevEnumServerServerOpen)(CamDevEnumServerContext* context);
34  typedef UINT (*psCamDevEnumServerServerClose)(CamDevEnumServerContext* context);
35 
36  typedef BOOL (*psCamDevEnumServerServerChannelIdAssigned)(CamDevEnumServerContext* context,
37  UINT32 channelId);
38 
39  typedef UINT (*psCamDevEnumServerServerInitialize)(CamDevEnumServerContext* context,
40  BOOL externalThread);
41  typedef UINT (*psCamDevEnumServerServerPoll)(CamDevEnumServerContext* context);
42  typedef BOOL (*psCamDevEnumServerServerChannelHandle)(CamDevEnumServerContext* context,
43  HANDLE* handle);
44 
45  typedef UINT (*psCamDevEnumServerServerSelectVersionRequest)(
46  CamDevEnumServerContext* context, const CAM_SELECT_VERSION_REQUEST* selectVersionRequest);
47  typedef UINT (*psCamDevEnumServerServerSelectVersionResponse)(
48  CamDevEnumServerContext* context, const CAM_SELECT_VERSION_RESPONSE* selectVersionResponse);
49 
50  typedef UINT (*psCamDevEnumServerServerDeviceAddedNotification)(
51  CamDevEnumServerContext* context,
52  const CAM_DEVICE_ADDED_NOTIFICATION* deviceAddedNotification);
53  typedef UINT (*psCamDevEnumServerServerDeviceRemovedNotification)(
54  CamDevEnumServerContext* context,
55  const CAM_DEVICE_REMOVED_NOTIFICATION* deviceRemovedNotification);
56 
58  {
59  HANDLE vcm;
60 
61  /* Server self-defined pointer. */
62  void* userdata;
63 
64  /*** APIs called by the server. ***/
65 
73  psCamDevEnumServerServerInitialize Initialize;
74 
78  psCamDevEnumServerServerOpen Open;
79 
83  psCamDevEnumServerServerClose Close;
84 
90  psCamDevEnumServerServerPoll Poll;
91 
96  psCamDevEnumServerServerChannelHandle ChannelHandle;
97 
98  /*
99  * Send a Select Version Response PDU.
100  */
101  psCamDevEnumServerServerSelectVersionResponse SelectVersionResponse;
102 
103  /*** Callbacks registered by the server. ***/
104 
108  psCamDevEnumServerServerChannelIdAssigned ChannelIdAssigned;
109 
113  psCamDevEnumServerServerSelectVersionRequest SelectVersionRequest;
114 
118  psCamDevEnumServerServerDeviceAddedNotification DeviceAddedNotification;
119 
123  psCamDevEnumServerServerDeviceRemovedNotification DeviceRemovedNotification;
124 
125  rdpContext* rdpcontext;
126  };
127 
128  FREERDP_API void cam_dev_enum_server_context_free(CamDevEnumServerContext* context);
129 
130  WINPR_ATTR_MALLOC(cam_dev_enum_server_context_free, 1)
131  FREERDP_API CamDevEnumServerContext* cam_dev_enum_server_context_new(HANDLE vcm);
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* FREERDP_CHANNEL_CAM_DEV_ENUM_SERVER_CAM_DEV_ENUM_H */
psCamDevEnumServerServerDeviceRemovedNotification DeviceRemovedNotification
psCamDevEnumServerServerDeviceAddedNotification DeviceAddedNotification
psCamDevEnumServerServerOpen Open
psCamDevEnumServerServerChannelIdAssigned ChannelIdAssigned
psCamDevEnumServerServerChannelHandle ChannelHandle
psCamDevEnumServerServerSelectVersionRequest SelectVersionRequest
psCamDevEnumServerServerClose Close
psCamDevEnumServerServerPoll Poll
psCamDevEnumServerServerInitialize Initialize