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 (*pContextNew)(freerdp* instance, rdpContext* context);
47 typedef void (*pContextFree)(freerdp* instance, rdpContext* context);
49 typedef boolean (*pPreConnect)(freerdp* instance);
50 typedef boolean (*pPostConnect)(freerdp* instance);
51 typedef boolean (*pAuthenticate)(freerdp* instance, char** username, char** password, char** domain);
52 typedef boolean (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint);
54 typedef int (*pSendChannelData)(freerdp* instance, int channelId, uint8* data, int size);
55 typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size);
59 freerdp* instance; /* 0 */
60 freerdp_peer* peer; /* 1 */
61 uint32 paddingA[16 - 2]; /* 2 */
65 uint32 paddingB[32 - 18]; /* 18 */
69 rdpRail* rail; /* 34 */
70 rdpCache* cache; /* 35 */
71 rdpChannels* channels; /* 36 */
72 rdpGraphics* graphics; /* 37 */
73 uint32 paddingC[64 - 38]; /* 38 */
78 rdpContext* context; /* 0 */
79 uint32 paddingA[16 - 1]; /* 1 */
81 rdpInput* input; /* 16 */
82 rdpUpdate* update; /* 17 */
83 rdpSettings* settings; /* 18 */
84 uint32 paddingB[32 - 19]; /* 19 */
86 size_t context_size; /* 32 */
87 pContextNew ContextNew; /* 33 */
88 pContextFree ContextFree; /* 34 */
89 uint32 paddingC[48 - 35]; /* 35 */
91 pPreConnect PreConnect; /* 48 */
92 pPostConnect PostConnect; /* 49 */
93 pAuthenticate Authenticate; /* 50 */
94 pVerifyCertificate VerifyCertificate; /* 51 */
95 uint32 paddingD[64 - 52]; /* 52 */
97 pSendChannelData SendChannelData; /* 64 */
98 pReceiveChannelData ReceiveChannelData; /* 65 */
99 uint32 paddingE[80 - 66]; /* 66 */
102 FREERDP_API void freerdp_context_new(freerdp* instance);
103 FREERDP_API void freerdp_context_free(freerdp* instance);
105 FREERDP_API boolean freerdp_connect(freerdp* instance);
106 FREERDP_API boolean freerdp_shall_disconnect(freerdp* instance);
107 FREERDP_API boolean freerdp_disconnect(freerdp* instance);
109 FREERDP_API boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount);
110 FREERDP_API boolean freerdp_check_fds(freerdp* instance);
112 FREERDP_API void freerdp_send_keep_alive(freerdp* instance);
113 FREERDP_API uint32 freerdp_error_info(freerdp* instance);
115 FREERDP_API void freerdp_get_version(int* major, int* minor, int* revision);
117 FREERDP_API freerdp* freerdp_new();
118 FREERDP_API void freerdp_free(freerdp* instance);