1 /**
2  * FreeRDP: A Remote Desktop Protocol Implementation
3  *
4  * Copyright 2011-2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef FREERDP_SERVER_SHADOW_WIN_H
20 #define FREERDP_SERVER_SHADOW_WIN_H
21 
22 #include <freerdp/assistance.h>
23 
24 #include <freerdp/server/shadow.h>
25 
26 typedef struct win_shadow_subsystem winShadowSubsystem;
27 
28 #include <winpr/crt.h>
29 #include <winpr/synch.h>
30 #include <winpr/thread.h>
31 #include <winpr/stream.h>
32 #include <winpr/collections.h>
33 
34 #include "win_rdp.h"
35 #include "win_wds.h"
36 #include "win_dxgi.h"
37 
38 struct win_shadow_subsystem
39 {
40 	rdpShadowSubsystem base;
41 
42 	int bpp;
43 	int width;
44 	int height;
45 
46 #ifdef WITH_WDS_API
47 	HWND hWnd;
48 	shwContext* shw;
49 	HANDLE RdpUpdateEnterEvent;
50 	HANDLE RdpUpdateLeaveEvent;
51 	rdpAssistanceFile* pAssistanceFile;
52 	_IRDPSessionEvents* pSessionEvents;
53 	IRDPSRAPISharingSession* pSharingSession;
54 	IRDPSRAPIInvitation* pInvitation;
55 	IRDPSRAPIInvitationManager* pInvitationMgr;
56 	IRDPSRAPISessionProperties* pSessionProperties;
57 	IRDPSRAPIVirtualChannelManager* pVirtualChannelMgr;
58 	IRDPSRAPIApplicationFilter* pApplicationFilter;
59 	IRDPSRAPIAttendeeManager* pAttendeeMgr;
60 #endif
61 
62 #ifdef WITH_DXGI_1_2
63 	UINT pendingFrames;
64 	BYTE* MetadataBuffer;
65 	UINT MetadataBufferSize;
66 	BOOL dxgiSurfaceMapped;
67 	BOOL dxgiFrameAcquired;
68 	ID3D11Device* dxgiDevice;
69 	IDXGISurface* dxgiSurface;
70 	ID3D11Texture2D* dxgiStage;
71 	IDXGIResource* dxgiResource;
72 	D3D_FEATURE_LEVEL featureLevel;
73 	ID3D11Texture2D* dxgiDesktopImage;
74 	DXGI_OUTDUPL_FRAME_INFO dxgiFrameInfo;
75 	ID3D11DeviceContext* dxgiDeviceContext;
76 	IDXGIOutputDuplication* dxgiOutputDuplication;
77 #endif
78 };
79 
80 #ifdef __cplusplus
81 extern "C"
82 {
83 #endif
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* FREERDP_SERVER_SHADOW_WIN_H */
90