2 * FreeRDP: A Remote Desktop Protocol Client
5 * Copyright 2009-2011 Jay Sorg
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 typedef struct rdp_rdp rdpRdp;
24 typedef struct rdp_gdi rdpGdi;
25 typedef struct rdp_rail rdpRail;
26 typedef struct rdp_cache rdpCache;
27 typedef struct rdp_channels rdpChannels;
28 typedef struct rdp_graphics rdpGraphics;
30 typedef struct rdp_freerdp freerdp;
31 typedef struct rdp_context rdpContext;
32 typedef struct rdp_freerdp_peer freerdp_peer;
34 #include <freerdp/api.h>
35 #include <freerdp/types.h>
36 #include <freerdp/settings.h>
37 #include <freerdp/extension.h>
39 #include <freerdp/input.h>
40 #include <freerdp/update.h>
46 typedef void (*pContextSize)(freerdp* instance, uint32* size);
47 typedef void (*pContextNew)(freerdp* instance, rdpContext* context);
48 typedef void (*pContextFree)(freerdp* instance, rdpContext* context);
50 typedef boolean (*pPreConnect)(freerdp* instance);
51 typedef boolean (*pPostConnect)(freerdp* instance);
52 typedef boolean (*pAuthenticate)(freerdp* instance, char** username, char** password, char** domain);
53 typedef boolean (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint);
55 typedef int (*pSendChannelData)(freerdp* instance, int channelId, uint8* data, int size);
56 typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size);
70 rdpChannels* channels;
71 rdpGraphics* graphics;
80 rdpSettings* settings;
83 pContextNew ContextNew;
84 pContextFree ContextFree;
86 pPreConnect PreConnect;
87 pPostConnect PostConnect;
88 pAuthenticate Authenticate;
89 pVerifyCertificate VerifyCertificate;
91 pSendChannelData SendChannelData;
92 pReceiveChannelData ReceiveChannelData;
95 FREERDP_API void freerdp_context_new(freerdp* instance);
96 FREERDP_API void freerdp_context_free(freerdp* instance);
98 FREERDP_API boolean freerdp_connect(freerdp* instance);
99 FREERDP_API boolean freerdp_disconnect(freerdp* instance);
101 FREERDP_API boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount);
102 FREERDP_API boolean freerdp_check_fds(freerdp* instance);
104 FREERDP_API freerdp* freerdp_new();
105 FREERDP_API void freerdp_free(freerdp* instance);