Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / server / X11 / xf_peer.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * X11 Peer
4  *
5  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #ifndef __XF_PEER_H
21 #define __XF_PEER_H
22
23 #include <freerdp/gdi/gdi.h>
24 #include <freerdp/gdi/dc.h>
25 #include <freerdp/gdi/region.h>
26 #include <freerdp/codec/rfx.h>
27 #include <freerdp/listener.h>
28 #include <freerdp/utils/stream.h>
29 #include <freerdp/utils/stopwatch.h>
30
31 typedef struct xf_peer_context xfPeerContext;
32
33 #include "xfreerdp.h"
34
35 struct xf_peer_context
36 {
37         rdpContext _p;
38
39         int fps;
40         STREAM* s;
41         HGDI_DC hdc;
42         xfInfo* info;
43         int activations;
44         pthread_t thread;
45         boolean activated;
46         pthread_mutex_t mutex;
47         RFX_CONTEXT* rfx_context;
48         xfEventQueue* event_queue;
49         pthread_t frame_rate_thread;
50 };
51
52 void xf_peer_accepted(freerdp_listener* instance, freerdp_peer* client);
53
54 #endif /* __XF_PEER_H */