FreeRDP
server/rdpecam.h
1 
20 #ifndef FREERDP_CHANNEL_CAMERA_DEVICE_SERVER_CAMERA_DEVICE_H
21 #define FREERDP_CHANNEL_CAMERA_DEVICE_SERVER_CAMERA_DEVICE_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 camera_device_server_context CameraDeviceServerContext;
32 
33  typedef UINT (*psCameraDeviceServerOpen)(CameraDeviceServerContext* context);
34  typedef UINT (*psCameraDeviceServerClose)(CameraDeviceServerContext* context);
35 
36  typedef BOOL (*psCameraDeviceServerChannelIdAssigned)(CameraDeviceServerContext* context,
37  UINT32 channelId);
38 
39  typedef UINT (*psCameraDeviceServerInitialize)(CameraDeviceServerContext* context,
40  BOOL externalThread);
41  typedef UINT (*psCameraDeviceServerPoll)(CameraDeviceServerContext* context);
42  typedef BOOL (*psCameraDeviceServerChannelHandle)(CameraDeviceServerContext* context,
43  HANDLE* handle);
44 
45  typedef UINT (*psCameraDeviceServerSuccessResponse)(
46  CameraDeviceServerContext* context, const CAM_SUCCESS_RESPONSE* successResponse);
47  typedef UINT (*psCameraDeviceServerErrorResponse)(CameraDeviceServerContext* context,
48  const CAM_ERROR_RESPONSE* errorResponse);
49 
50  typedef UINT (*psCameraDeviceServerActivateDeviceRequest)(
51  CameraDeviceServerContext* context,
52  const CAM_ACTIVATE_DEVICE_REQUEST* activateDeviceRequest);
53  typedef UINT (*psCameraDeviceServerDeactivateDeviceRequest)(
54  CameraDeviceServerContext* context,
55  const CAM_DEACTIVATE_DEVICE_REQUEST* deactivateDeviceRequest);
56 
57  typedef UINT (*psCameraDeviceServerStreamListRequest)(
58  CameraDeviceServerContext* context, const CAM_STREAM_LIST_REQUEST* streamListRequest);
59  typedef UINT (*psCameraDeviceServerStreamListResponse)(
60  CameraDeviceServerContext* context, const CAM_STREAM_LIST_RESPONSE* streamListResponse);
61 
62  typedef UINT (*psCameraDeviceServerMediaTypeListRequest)(
63  CameraDeviceServerContext* context,
64  const CAM_MEDIA_TYPE_LIST_REQUEST* mediaTypeListRequest);
65  typedef UINT (*psCameraDeviceServerMediaTypeListResponse)(
66  CameraDeviceServerContext* context,
67  const CAM_MEDIA_TYPE_LIST_RESPONSE* mediaTypeListResponse);
68 
69  typedef UINT (*psCameraDeviceServerCurrentMediaTypeRequest)(
70  CameraDeviceServerContext* context,
71  const CAM_CURRENT_MEDIA_TYPE_REQUEST* currentMediaTypeRequest);
72  typedef UINT (*psCameraDeviceServerCurrentMediaTypeResponse)(
73  CameraDeviceServerContext* context,
74  const CAM_CURRENT_MEDIA_TYPE_RESPONSE* currentMediaTypeResponse);
75 
76  typedef UINT (*psCameraDeviceServerStartStreamsRequest)(
77  CameraDeviceServerContext* context, const CAM_START_STREAMS_REQUEST* startStreamsRequest);
78  typedef UINT (*psCameraDeviceServerStopStreamsRequest)(
79  CameraDeviceServerContext* context, const CAM_STOP_STREAMS_REQUEST* stopStreamsRequest);
80 
81  typedef UINT (*psCameraDeviceServerSampleRequest)(CameraDeviceServerContext* context,
82  const CAM_SAMPLE_REQUEST* sampleRequest);
83  typedef UINT (*psCameraDeviceServerSampleResponse)(CameraDeviceServerContext* context,
84  const CAM_SAMPLE_RESPONSE* sampleResponse);
85  typedef UINT (*psCameraDeviceServerSampleErrorResponse)(
86  CameraDeviceServerContext* context, const CAM_SAMPLE_ERROR_RESPONSE* sampleErrorResponse);
87 
88  typedef UINT (*psCameraDeviceServerPropertyListRequest)(
89  CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_REQUEST* propertyListRequest);
90  typedef UINT (*psCameraDeviceServerPropertyListResponse)(
91  CameraDeviceServerContext* context, const CAM_PROPERTY_LIST_RESPONSE* propertyListResponse);
92 
93  typedef UINT (*psCameraDeviceServerPropertyValueRequest)(
94  CameraDeviceServerContext* context, const CAM_PROPERTY_VALUE_REQUEST* propertyValueRequest);
95  typedef UINT (*psCameraDeviceServerPropertyValueResponse)(
96  CameraDeviceServerContext* context,
97  const CAM_PROPERTY_VALUE_RESPONSE* propertyValueResponse);
98 
99  typedef UINT (*psCameraDeviceServerSetPropertyValueRequest)(
100  CameraDeviceServerContext* context,
101  const CAM_SET_PROPERTY_VALUE_REQUEST* setPropertyValueRequest);
102 
104  {
105  HANDLE vcm;
106 
107  /* Server self-defined pointer. */
108  void* userdata;
109 
119 
125 
126  /*** APIs called by the server. ***/
127 
135  psCameraDeviceServerInitialize Initialize;
136 
140  psCameraDeviceServerOpen Open;
141 
145  psCameraDeviceServerClose Close;
146 
152  psCameraDeviceServerPoll Poll;
153 
158  psCameraDeviceServerChannelHandle ChannelHandle;
159 
168  psCameraDeviceServerActivateDeviceRequest ActivateDeviceRequest;
169 
173  psCameraDeviceServerDeactivateDeviceRequest DeactivateDeviceRequest;
174 
178  psCameraDeviceServerStreamListRequest StreamListRequest;
179 
183  psCameraDeviceServerMediaTypeListRequest MediaTypeListRequest;
184 
188  psCameraDeviceServerCurrentMediaTypeRequest CurrentMediaTypeRequest;
189 
193  psCameraDeviceServerStartStreamsRequest StartStreamsRequest;
194 
198  psCameraDeviceServerStopStreamsRequest StopStreamsRequest;
199 
203  psCameraDeviceServerSampleRequest SampleRequest;
204 
208  psCameraDeviceServerPropertyListRequest PropertyListRequest;
209 
213  psCameraDeviceServerPropertyValueRequest PropertyValueRequest;
214 
218  psCameraDeviceServerSetPropertyValueRequest SetPropertyValueRequest;
219 
220  /*** Callbacks registered by the server. ***/
221 
225  psCameraDeviceServerChannelIdAssigned ChannelIdAssigned;
226 
230  psCameraDeviceServerSuccessResponse SuccessResponse;
231 
235  psCameraDeviceServerErrorResponse ErrorResponse;
236 
240  psCameraDeviceServerStreamListResponse StreamListResponse;
241 
245  psCameraDeviceServerMediaTypeListResponse MediaTypeListResponse;
246 
250  psCameraDeviceServerCurrentMediaTypeResponse CurrentMediaTypeResponse;
251 
255  psCameraDeviceServerSampleResponse SampleResponse;
256 
260  psCameraDeviceServerSampleErrorResponse SampleErrorResponse;
261 
265  psCameraDeviceServerPropertyListResponse PropertyListResponse;
266 
270  psCameraDeviceServerPropertyValueResponse PropertyValueResponse;
271 
272  rdpContext* rdpcontext;
273  };
274 
275  FREERDP_API void camera_device_server_context_free(CameraDeviceServerContext* context);
276 
277  WINPR_ATTR_MALLOC(camera_device_server_context_free, 1)
278  FREERDP_API CameraDeviceServerContext* camera_device_server_context_new(HANDLE vcm);
279 
280 #ifdef __cplusplus
281 }
282 #endif
283 
284 #endif /* FREERDP_CHANNEL_CAMERA_DEVICE_SERVER_CAMERA_DEVICE_H */
psCameraDeviceServerPoll Poll
psCameraDeviceServerSampleErrorResponse SampleErrorResponse
psCameraDeviceServerActivateDeviceRequest ActivateDeviceRequest
psCameraDeviceServerSampleRequest SampleRequest
psCameraDeviceServerPropertyListRequest PropertyListRequest
psCameraDeviceServerCurrentMediaTypeResponse CurrentMediaTypeResponse
psCameraDeviceServerErrorResponse ErrorResponse
psCameraDeviceServerPropertyListResponse PropertyListResponse
psCameraDeviceServerMediaTypeListRequest MediaTypeListRequest
psCameraDeviceServerChannelIdAssigned ChannelIdAssigned
psCameraDeviceServerStreamListResponse StreamListResponse
psCameraDeviceServerOpen Open
psCameraDeviceServerMediaTypeListResponse MediaTypeListResponse
psCameraDeviceServerDeactivateDeviceRequest DeactivateDeviceRequest
psCameraDeviceServerStopStreamsRequest StopStreamsRequest
psCameraDeviceServerStreamListRequest StreamListRequest
psCameraDeviceServerChannelHandle ChannelHandle
psCameraDeviceServerClose Close
psCameraDeviceServerSetPropertyValueRequest SetPropertyValueRequest
psCameraDeviceServerStartStreamsRequest StartStreamsRequest
psCameraDeviceServerPropertyValueRequest PropertyValueRequest
psCameraDeviceServerSuccessResponse SuccessResponse
psCameraDeviceServerSampleResponse SampleResponse
psCameraDeviceServerPropertyValueResponse PropertyValueResponse
psCameraDeviceServerInitialize Initialize
psCameraDeviceServerCurrentMediaTypeRequest CurrentMediaTypeRequest