Fix changelog email address
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-core / extension.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * FreeRDP Extension Plugin Interface
4  *
5  * Copyright 2010-2011 Vic Lee
6  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
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 __EXTENSION_H
22 #define __EXTENSION_H
23
24 #include <freerdp/api.h>
25 #include <freerdp/freerdp.h>
26 #include <freerdp/extension.h>
27
28 #ifdef _WIN32
29 #include <windows.h>
30 #endif
31
32 #define FREERDP_EXT_MAX_COUNT 16
33
34 struct rdp_extension
35 {
36         freerdp* instance;
37         rdpExtPlugin* plugins[FREERDP_EXT_MAX_COUNT];
38         int num_plugins;
39         PFREERDP_EXTENSION_HOOK pre_connect_hooks[FREERDP_EXT_MAX_COUNT];
40         rdpExtPlugin* pre_connect_hooks_instances[FREERDP_EXT_MAX_COUNT];
41         int num_pre_connect_hooks;
42         PFREERDP_EXTENSION_HOOK post_connect_hooks[FREERDP_EXT_MAX_COUNT];
43         rdpExtPlugin* post_connect_hooks_instances[FREERDP_EXT_MAX_COUNT];
44         int num_post_connect_hooks;
45 };
46 typedef struct rdp_extension rdpExtension;
47
48 FREERDP_API int extension_pre_connect(rdpExtension* extension);
49 FREERDP_API int extension_post_connect(rdpExtension* extension);
50
51 FREERDP_API rdpExtension* extension_new(freerdp* instance);
52 FREERDP_API void extension_free(rdpExtension* extension);
53
54 #endif /* __EXTENSION_H */
55