VirtualBox

source: vbox/trunk/src/VBox/RDP/client/proto.h@ 8973

Last change on this file since 8973 was 7826, checked in by vboxsync, 17 years ago

Export modified rdesktop version including USB support to OSE. It's GPL anyway.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 13.9 KB
Line 
1/* -*- c-basic-offset: 8 -*-
2 rdesktop: A Remote Desktop Protocol client.
3 Copyright (C) Matthew Chapman 1999-2005
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*/
19
20#ifndef RDESKTOP_PROTO_H
21#define RDESKTOP_PROTO_H
22
23/* *INDENT-OFF* */
24#ifdef __cplusplus
25extern "C" {
26#endif
27/* *INDENT-ON* */
28/* bitmap.c */
29BOOL bitmap_decompress(uint8 * output, int width, int height, uint8 * input, int size, int Bpp);
30/* cache.c */
31void cache_rebuild_bmpcache_linked_list(uint8 id, sint16 * idx, int count);
32void cache_bump_bitmap(uint8 id, uint16 idx, int bump);
33void cache_evict_bitmap(uint8 id);
34HBITMAP cache_get_bitmap(uint8 id, uint16 idx);
35void cache_put_bitmap(uint8 id, uint16 idx, HBITMAP bitmap);
36void cache_save_state(void);
37FONTGLYPH *cache_get_font(uint8 font, uint16 character);
38void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width,
39 uint16 height, HGLYPH pixmap);
40DATABLOB *cache_get_text(uint8 cache_id);
41void cache_put_text(uint8 cache_id, void *data, int length);
42uint8 *cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel);
43void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel,
44 uint8 * data);
45HCURSOR cache_get_cursor(uint16 cache_idx);
46void cache_put_cursor(uint16 cache_idx, HCURSOR cursor);
47/* channels.c */
48VCHANNEL *channel_register(char *name, uint32 flags, void (*callback) (STREAM));
49STREAM channel_init(VCHANNEL * channel, uint32 length);
50void channel_send(STREAM s, VCHANNEL * channel);
51void channel_process(STREAM s, uint16 mcs_channel);
52/* cliprdr.c */
53void cliprdr_send_simple_native_format_announce(uint32 format);
54void cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length);
55void cliprdr_send_data_request(uint32 format);
56void cliprdr_send_data(uint8 * data, uint32 length);
57void cliprdr_set_mode(const char *optarg);
58BOOL cliprdr_init(void);
59/* disk.c */
60int disk_enum_devices(uint32 * id, char *optarg);
61NTSTATUS disk_query_information(NTHANDLE handle, uint32 info_class, STREAM out);
62NTSTATUS disk_set_information(NTHANDLE handle, uint32 info_class, STREAM in, STREAM out);
63NTSTATUS disk_check_notify(NTHANDLE handle);
64NTSTATUS disk_create_notify(NTHANDLE handle, uint32 info_class);
65NTSTATUS disk_query_volume_information(NTHANDLE handle, uint32 info_class, STREAM out);
66NTSTATUS disk_query_directory(NTHANDLE handle, uint32 info_class, char *pattern, STREAM out);
67/* mppc.c */
68int mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen);
69/* ewmhints.c */
70int get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height);
71void ewmh_init(void);
72/* iso.c */
73STREAM iso_init(int length);
74void iso_send(STREAM s);
75STREAM iso_recv(uint8 * rdpver);
76BOOL iso_connect(char *server, char *username);
77BOOL iso_reconnect(char *server);
78void iso_disconnect(void);
79void iso_reset_state(void);
80/* licence.c */
81void licence_process(STREAM s);
82/* mcs.c */
83STREAM mcs_init(int length);
84void mcs_send_to_channel(STREAM s, uint16 channel);
85void mcs_send(STREAM s);
86STREAM mcs_recv(uint16 * channel, uint8 * rdpver);
87BOOL mcs_connect(char *server, STREAM mcs_data, char *username);
88BOOL mcs_reconnect(char *server, STREAM mcs_data);
89void mcs_disconnect(void);
90void mcs_reset_state(void);
91/* orders.c */
92void process_orders(STREAM s, uint16 num_orders);
93void reset_order_state(void);
94/* parallel.c */
95int parallel_enum_devices(uint32 * id, char *optarg);
96/* printer.c */
97int printer_enum_devices(uint32 * id, char *optarg);
98/* printercache.c */
99int printercache_load_blob(char *printer_name, uint8 ** data);
100void printercache_process(STREAM s);
101/* pstcache.c */
102void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp);
103BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx);
104BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, uint8 width, uint8 height,
105 uint16 length, uint8 * data);
106int pstcache_enumerate(uint8 id, HASH_KEY * keylist);
107BOOL pstcache_init(uint8 cache_id);
108/* rdesktop.c */
109int main(int argc, char *argv[]);
110void generate_random(uint8 * random);
111void *xmalloc(int size);
112char *xstrdup(const char *s);
113void *xrealloc(void *oldmem, int size);
114void xfree(void *mem);
115void error(char *format, ...);
116void warning(char *format, ...);
117void unimpl(char *format, ...);
118void hexdump(unsigned char *p, unsigned int len);
119char *next_arg(char *src, char needle);
120void toupper_str(char *p);
121BOOL str_startswith(const char *s, const char *prefix);
122BOOL str_handle_lines(const char *input, char **rest, str_handle_lines_t linehandler, void *data);
123BOOL subprocess(char *const argv[], str_handle_lines_t linehandler, void *data);
124char *l_to_a(long N, int base);
125int load_licence(unsigned char **data);
126void save_licence(unsigned char *data, int length);
127BOOL rd_pstcache_mkdir(void);
128int rd_open_file(char *filename);
129void rd_close_file(int fd);
130int rd_read_file(int fd, void *ptr, int len);
131int rd_write_file(int fd, void *ptr, int len);
132int rd_lseek_file(int fd, int offset);
133BOOL rd_lock_file(int fd, int start, int len);
134/* rdp5.c */
135void rdp5_process(STREAM s);
136/* rdp.c */
137void rdp_out_unistr(STREAM s, char *string, int len);
138int rdp_in_unistr(STREAM s, char *string, int uni_len);
139void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1,
140 uint16 param2);
141void rdp_send_client_window_status(int status);
142void process_colour_pointer_pdu(STREAM s);
143void process_cached_pointer_pdu(STREAM s);
144void process_system_pointer_pdu(STREAM s);
145void process_bitmap_updates(STREAM s);
146void process_palette(STREAM s);
147void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
148void rdp_main_loop(BOOL * deactivated, uint32 * ext_disc_reason);
149BOOL rdp_loop(BOOL * deactivated, uint32 * ext_disc_reason);
150BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command,
151 char *directory);
152BOOL rdp_reconnect(char *server, uint32 flags, char *domain, char *password, char *command,
153 char *directory, char *cookie);
154void rdp_reset_state(void);
155void rdp_disconnect(void);
156/* rdpdr.c */
157int get_device_index(NTHANDLE handle);
158void convert_to_unix_filename(char *filename);
159BOOL rdpdr_init(void);
160void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout);
161struct async_iorequest *rdpdr_remove_iorequest(struct async_iorequest *prev,
162 struct async_iorequest *iorq);
163void rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out);
164BOOL rdpdr_abort_io(uint32 fd, uint32 major, NTSTATUS status);
165/* rdpsnd.c */
166void rdpsnd_send_completion(uint16 tick, uint8 packet_index);
167BOOL rdpsnd_init(void);
168/* rdpsnd_oss.c */
169BOOL wave_out_open(void);
170void wave_out_close(void);
171BOOL wave_out_format_supported(WAVEFORMATEX * pwfx);
172BOOL wave_out_set_format(WAVEFORMATEX * pwfx);
173void wave_out_volume(uint16 left, uint16 right);
174void wave_out_write(STREAM s, uint16 tick, uint8 index);
175void wave_out_play(void);
176/* secure.c */
177void sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt);
178void sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2);
179void buf_out_uint32(uint8 * buffer, uint32 value);
180void sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 * data,
181 int datalen);
182void sec_decrypt(uint8 * data, int length);
183STREAM sec_init(uint32 flags, int maxlen);
184void sec_send_to_channel(STREAM s, uint32 flags, uint16 channel);
185void sec_send(STREAM s, uint32 flags);
186void sec_process_mcs_data(STREAM s);
187STREAM sec_recv(uint8 * rdpver);
188BOOL sec_connect(char *server, char *username);
189BOOL sec_reconnect(char *server);
190void sec_disconnect(void);
191void sec_reset_state(void);
192/* serial.c */
193int serial_enum_devices(uint32 * id, char *optarg);
194BOOL serial_get_event(NTHANDLE handle, uint32 * result);
195BOOL serial_get_timeout(NTHANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout);
196/* tcp.c */
197STREAM tcp_init(uint32 maxlen);
198void tcp_send(STREAM s);
199STREAM tcp_recv(STREAM s, uint32 length);
200BOOL tcp_connect(char *server);
201void tcp_disconnect(void);
202char *tcp_get_address(void);
203void tcp_reset_state(void);
204/* xclip.c */
205void ui_clip_format_announce(uint8 * data, uint32 length);
206void ui_clip_handle_data(uint8 * data, uint32 length);
207void ui_clip_request_failed(void);
208void ui_clip_request_data(uint32 format);
209void ui_clip_sync(void);
210void ui_clip_set_mode(const char *optarg);
211void xclip_init(void);
212void xclip_deinit(void);
213/* xkeymap.c */
214BOOL xkeymap_from_locale(const char *locale);
215FILE *xkeymap_open(const char *filename);
216void xkeymap_init(void);
217BOOL handle_special_keys(uint32 keysym, unsigned int state, uint32 ev_time, BOOL pressed);
218key_translation xkeymap_translate_key(uint32 keysym, unsigned int keycode, unsigned int state);
219void xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint32 ev_time,
220 BOOL pressed, uint8 nesting);
221uint16 xkeymap_translate_button(unsigned int button);
222char *get_ksname(uint32 keysym);
223void save_remote_modifiers(uint8 scancode);
224void restore_remote_modifiers(uint32 ev_time, uint8 scancode);
225void ensure_remote_modifiers(uint32 ev_time, key_translation tr);
226unsigned int read_keyboard_state(void);
227uint16 ui_get_numlock_state(unsigned int state);
228void reset_modifier_keys(void);
229void rdp_send_scancode(uint32 time, uint16 flags, uint8 scancode);
230/* xwin.c */
231BOOL get_key_state(unsigned int state, uint32 keysym);
232BOOL ui_init(void);
233void ui_deinit(void);
234BOOL ui_create_window(void);
235void ui_resize_window(void);
236void ui_destroy_window(void);
237void xwin_toggle_fullscreen(void);
238int ui_select(int rdp_socket);
239void ui_move_pointer(int x, int y);
240HBITMAP ui_create_bitmap(int width, int height, uint8 * data);
241void ui_paint_bitmap(int x, int y, int cx, int cy, int width, int height, uint8 * data);
242void ui_destroy_bitmap(HBITMAP bmp);
243HGLYPH ui_create_glyph(int width, int height, uint8 * data);
244void ui_destroy_glyph(HGLYPH glyph);
245HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 * andmask,
246 uint8 * xormask);
247void ui_set_cursor(HCURSOR cursor);
248void ui_destroy_cursor(HCURSOR cursor);
249void ui_set_null_cursor(void);
250HCOLOURMAP ui_create_colourmap(COLOURMAP * colours);
251void ui_destroy_colourmap(HCOLOURMAP map);
252void ui_set_colourmap(HCOLOURMAP map);
253void ui_set_clip(int x, int y, int cx, int cy);
254void ui_reset_clip(void);
255void ui_bell(void);
256void ui_destblt(uint8 opcode, int x, int y, int cx, int cy);
257void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH * brush, int bgcolour,
258 int fgcolour);
259void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy);
260void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy);
261void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy,
262 BRUSH * brush, int bgcolour, int fgcolour);
263void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN * pen);
264void ui_rect(int x, int y, int cx, int cy, int colour);
265void ui_polygon(uint8 opcode, uint8 fillmode, POINT * point, int npoints, BRUSH * brush,
266 int bgcolour, int fgcolour);
267void ui_polyline(uint8 opcode, POINT * points, int npoints, PEN * pen);
268void ui_ellipse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH * brush,
269 int bgcolour, int fgcolour);
270void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy,
271 int bgcolour, int fgcolour);
272void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx,
273 int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy,
274 BRUSH * brush, int bgcolour, int fgcolour, uint8 * text, uint8 length);
275void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
276void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
277void ui_begin_update(void);
278void ui_end_update(void);
279void ui_seamless_begin(BOOL hidden);
280void ui_seamless_hide_desktop(void);
281void ui_seamless_unhide_desktop(void);
282void ui_seamless_toggle(void);
283void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent,
284 unsigned long flags);
285void ui_seamless_destroy_window(unsigned long id, unsigned long flags);
286void ui_seamless_destroy_group(unsigned long id, unsigned long flags);
287void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height,
288 unsigned long flags);
289void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long flags);
290void ui_seamless_settitle(unsigned long id, const char *title, unsigned long flags);
291void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags);
292void ui_seamless_syncbegin(unsigned long flags);
293void ui_seamless_ack(unsigned int serial);
294/* lspci.c */
295BOOL lspci_init(void);
296/* seamless.c */
297BOOL seamless_init(void);
298unsigned int seamless_send_sync(void);
299unsigned int seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
300unsigned int seamless_send_position(unsigned long id, int x, int y, int width, int height,
301 unsigned long flags);
302void seamless_select_timeout(struct timeval *tv);
303unsigned int seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
304unsigned int seamless_send_focus(unsigned long id, unsigned long flags);
305/* vrdp/rdpusb.c */
306BOOL rdpusb_init(void);
307void rdpusb_close (void);
308void rdpusb_add_fds(int *n, fd_set * rfds, fd_set * wfds);
309void rdpusb_check_fds(fd_set * rfds, fd_set * wfds);
310
311/* *INDENT-OFF* */
312#ifdef __cplusplus
313}
314#endif
315/* *INDENT-ON* */
316
317#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette