Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / channels / cliprdr / cliprdr_main.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol client.
3  * Clipboard Virtual Channel
4  *
5  * Copyright 2009-2011 Jay Sorg
6  * Copyright 2010-2011 Vic Lee
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20
21 #ifndef __CLIPRDR_MAIN_H
22 #define __CLIPRDR_MAIN_H
23
24 #include <freerdp/utils/debug.h>
25 #include <freerdp/utils/stream.h>
26
27 struct _CLIPRDR_FORMAT_NAME
28 {
29         uint32 id;
30         char* name;
31         int length;
32 };
33 typedef struct _CLIPRDR_FORMAT_NAME CLIPRDR_FORMAT_NAME;
34
35 struct cliprdr_plugin
36 {
37         rdpSvcPlugin plugin;
38         UNICONV* uniconv;
39         boolean received_caps;
40         boolean use_long_format_names;
41         boolean stream_fileclip_enabled;
42         boolean fileclip_no_file_paths;
43         boolean can_lock_clipdata;
44         CLIPRDR_FORMAT_NAME* format_names;
45         int num_format_names;
46 };
47 typedef struct cliprdr_plugin cliprdrPlugin;
48
49 STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen);
50 void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out);
51
52 #ifdef WITH_DEBUG_CLIPRDR
53 #define DEBUG_CLIPRDR(fmt, ...) DEBUG_CLASS(CLIPRDR, fmt, ## __VA_ARGS__)
54 #else
55 #define DEBUG_CLIPRDR(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
56 #endif
57
58 #endif /* __CLIPRDR_MAIN_H */