VirtualBox

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

最後變更 在這個檔案從49891是 37224,由 vboxsync 提交於 14 年 前

RDP/client: fix OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 15.3 KB
 
1/* -*- c-basic-offset: 8 -*-
2 rdesktop: A Remote Desktop Protocol client.
3 Copyright (C) Matthew Chapman 1999-2008
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 3 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, see <http://www.gnu.org/licenses/>.
17*/
18
19/*
20 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the General Public License version 2 (GPLv2) at this time for any software where
23 * a choice of GPL license versions is made available with the language indicating
24 * that GPLv2 or any later version may be used, or where a choice of which version
25 * of the GPL is applied is otherwise unspecified.
26 */
27
28#ifndef RDESKTOP_PROTO_H
29#define RDESKTOP_PROTO_H
30
31/* *INDENT-OFF* */
32#ifdef __cplusplus
33extern "C" {
34#endif
35/* *INDENT-ON* */
36/* bitmap.c */
37RD_BOOL bitmap_decompress(uint8 * output, int width, int height, uint8 * input, int size, int Bpp);
38/* cache.c */
39void cache_rebuild_bmpcache_linked_list(uint8 id, sint16 * idx, int count);
40void cache_bump_bitmap(uint8 id, uint16 idx, int bump);
41void cache_evict_bitmap(uint8 id);
42RD_HBITMAP cache_get_bitmap(uint8 id, uint16 idx);
43void cache_put_bitmap(uint8 id, uint16 idx, RD_HBITMAP bitmap);
44void cache_save_state(void);
45FONTGLYPH *cache_get_font(uint8 font, uint16 character);
46void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width,
47 uint16 height, RD_HGLYPH pixmap);
48DATABLOB *cache_get_text(uint8 cache_id);
49void cache_put_text(uint8 cache_id, void *data, int length);
50uint8 *cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel);
51void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel,
52 uint8 * data);
53RD_HCURSOR cache_get_cursor(uint16 cache_idx);
54void cache_put_cursor(uint16 cache_idx, RD_HCURSOR cursor);
55BRUSHDATA *cache_get_brush_data(uint8 colour_code, uint8 idx);
56void cache_put_brush_data(uint8 colour_code, uint8 idx, BRUSHDATA * brush_data);
57/* channels.c */
58VCHANNEL *channel_register(char *name, uint32 flags, void (*callback) (STREAM));
59STREAM channel_init(VCHANNEL * channel, uint32 length);
60void channel_send(STREAM s, VCHANNEL * channel);
61void channel_process(STREAM s, uint16 mcs_channel);
62/* cliprdr.c */
63void cliprdr_send_simple_native_format_announce(uint32 format);
64void cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length);
65void cliprdr_send_data_request(uint32 format);
66void cliprdr_send_data(uint8 * data, uint32 length);
67void cliprdr_set_mode(const char *optarg);
68RD_BOOL cliprdr_init(void);
69/* disk.c */
70int disk_enum_devices(uint32 * id, char *optarg);
71RD_NTSTATUS disk_query_information(RD_NTHANDLE handle, uint32 info_class, STREAM out);
72RD_NTSTATUS disk_set_information(RD_NTHANDLE handle, uint32 info_class, STREAM in, STREAM out);
73RD_NTSTATUS disk_check_notify(RD_NTHANDLE handle);
74RD_NTSTATUS disk_create_notify(RD_NTHANDLE handle, uint32 info_class);
75RD_NTSTATUS disk_query_volume_information(RD_NTHANDLE handle, uint32 info_class, STREAM out);
76RD_NTSTATUS disk_query_directory(RD_NTHANDLE handle, uint32 info_class, char *pattern, STREAM out);
77/* mppc.c */
78int mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen);
79/* ewmhints.c */
80int get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height);
81void ewmh_init(void);
82/* iso.c */
83STREAM iso_init(int length);
84void iso_send(STREAM s);
85STREAM iso_recv(uint8 * rdpver);
86RD_BOOL iso_connect(char *server, char *username, RD_BOOL reconnect);
87void iso_disconnect(void);
88void iso_reset_state(void);
89/* licence.c */
90void licence_process(STREAM s);
91/* mcs.c */
92STREAM mcs_init(int length);
93void mcs_send_to_channel(STREAM s, uint16 channel);
94void mcs_send(STREAM s);
95STREAM mcs_recv(uint16 * channel, uint8 * rdpver);
96RD_BOOL mcs_connect(char *server, STREAM mcs_data, char *username, RD_BOOL reconnect);
97void mcs_disconnect(void);
98void mcs_reset_state(void);
99/* orders.c */
100void process_orders(STREAM s, uint16 num_orders);
101void reset_order_state(void);
102/* parallel.c */
103int parallel_enum_devices(uint32 * id, char *optarg);
104/* printer.c */
105int printer_enum_devices(uint32 * id, char *optarg);
106/* printercache.c */
107int printercache_load_blob(char *printer_name, uint8 ** data);
108void printercache_process(STREAM s);
109/* pstcache.c */
110void pstcache_touch_bitmap(uint8 cache_id, uint16 cache_idx, uint32 stamp);
111RD_BOOL pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx);
112RD_BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * key, uint8 width,
113 uint8 height, uint16 length, uint8 * data);
114int pstcache_enumerate(uint8 id, HASH_KEY * keylist);
115RD_BOOL pstcache_init(uint8 cache_id);
116/* rdesktop.c */
117int main(int argc, char *argv[]);
118void generate_random(uint8 * random);
119void *xmalloc(int size);
120void exit_if_null(void *ptr);
121char *xstrdup(const char *s);
122void *xrealloc(void *oldmem, size_t size);
123void xfree(void *mem);
124void error(char *format, ...);
125void warning(char *format, ...);
126void unimpl(char *format, ...);
127void hexdump(unsigned char *p, unsigned int len);
128char *next_arg(char *src, char needle);
129void toupper_str(char *p);
130RD_BOOL str_startswith(const char *s, const char *prefix);
131RD_BOOL str_handle_lines(const char *input, char **rest, str_handle_lines_t linehandler,
132 void *data);
133RD_BOOL subprocess(char *const argv[], str_handle_lines_t linehandler, void *data);
134char *l_to_a(long N, int base);
135int load_licence(unsigned char **data);
136void save_licence(unsigned char *data, int length);
137RD_BOOL rd_pstcache_mkdir(void);
138int rd_open_file(char *filename);
139void rd_close_file(int fd);
140int rd_read_file(int fd, void *ptr, int len);
141int rd_write_file(int fd, void *ptr, int len);
142int rd_lseek_file(int fd, int offset);
143RD_BOOL rd_lock_file(int fd, int start, int len);
144/* rdp5.c */
145void rdp5_process(STREAM s);
146/* rdp.c */
147void rdp_out_unistr(STREAM s, char *string, int len);
148int rdp_in_unistr(STREAM s, char *string, int str_len, int in_len);
149void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1,
150 uint16 param2);
151void rdp_send_client_window_status(int status);
152void process_colour_pointer_pdu(STREAM s);
153void process_new_pointer_pdu(STREAM s);
154void process_cached_pointer_pdu(STREAM s);
155void process_system_pointer_pdu(STREAM s);
156void process_bitmap_updates(STREAM s);
157void process_palette(STREAM s);
158void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
159void rdp_main_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
160RD_BOOL rdp_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
161RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command,
162 char *directory, RD_BOOL reconnect);
163void rdp_reset_state(void);
164void rdp_disconnect(void);
165/* rdpdr.c */
166int get_device_index(RD_NTHANDLE handle);
167void convert_to_unix_filename(char *filename);
168void rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer,
169 uint32 length);
170RD_BOOL rdpdr_init();
171void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, RD_BOOL * timeout);
172struct async_iorequest *rdpdr_remove_iorequest(struct async_iorequest *prev,
173 struct async_iorequest *iorq);
174void rdpdr_check_fds(fd_set * rfds, fd_set * wfds, RD_BOOL timed_out);
175RD_BOOL rdpdr_abort_io(uint32 fd, uint32 major, RD_NTSTATUS status);
176/* rdpsnd.c */
177void rdpsnd_record(const void *data, unsigned int size);
178RD_BOOL rdpsnd_init(char *optarg);
179void rdpsnd_show_help(void);
180void rdpsnd_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv);
181void rdpsnd_check_fds(fd_set * rfds, fd_set * wfds);
182struct audio_packet *rdpsnd_queue_current_packet(void);
183RD_BOOL rdpsnd_queue_empty(void);
184void rdpsnd_queue_next(unsigned long completed_in_us);
185int rdpsnd_queue_next_tick(void);
186void rdpsnd_reset_state(void);
187/* secure.c */
188void sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt);
189void sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2);
190void buf_out_uint32(uint8 * buffer, uint32 value);
191void sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 * data,
192 int datalen);
193void sec_decrypt(uint8 * data, int length);
194STREAM sec_init(uint32 flags, int maxlen);
195void sec_send_to_channel(STREAM s, uint32 flags, uint16 channel);
196void sec_send(STREAM s, uint32 flags);
197void sec_process_mcs_data(STREAM s);
198STREAM sec_recv(uint8 * rdpver);
199RD_BOOL sec_connect(char *server, char *username, RD_BOOL reconnect);
200void sec_disconnect(void);
201void sec_reset_state(void);
202/* serial.c */
203int serial_enum_devices(uint32 * id, char *optarg);
204RD_BOOL serial_get_event(RD_NTHANDLE handle, uint32 * result);
205RD_BOOL serial_get_timeout(RD_NTHANDLE handle, uint32 length, uint32 * timeout,
206 uint32 * itv_timeout);
207/* tcp.c */
208STREAM tcp_init(uint32 maxlen);
209void tcp_send(STREAM s);
210STREAM tcp_recv(STREAM s, uint32 length);
211RD_BOOL tcp_connect(char *server);
212void tcp_disconnect(void);
213char *tcp_get_address(void);
214void tcp_reset_state(void);
215/* xclip.c */
216void ui_clip_format_announce(uint8 * data, uint32 length);
217void ui_clip_handle_data(uint8 * data, uint32 length);
218void ui_clip_request_failed(void);
219void ui_clip_request_data(uint32 format);
220void ui_clip_sync(void);
221void ui_clip_set_mode(const char *optarg);
222void xclip_init(void);
223void xclip_deinit(void);
224/* xkeymap.c */
225RD_BOOL xkeymap_from_locale(const char *locale);
226FILE *xkeymap_open(const char *filename);
227void xkeymap_init(void);
228RD_BOOL handle_special_keys(uint32 keysym, unsigned int state, uint32 ev_time, RD_BOOL pressed);
229key_translation xkeymap_translate_key(uint32 keysym, unsigned int keycode, unsigned int state);
230void xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint32 ev_time,
231 RD_BOOL pressed, uint8 nesting);
232uint16 xkeymap_translate_button(unsigned int button);
233char *get_ksname(uint32 keysym);
234void save_remote_modifiers(uint8 scancode);
235void restore_remote_modifiers(uint32 ev_time, uint8 scancode);
236void ensure_remote_modifiers(uint32 ev_time, key_translation tr);
237unsigned int read_keyboard_state(void);
238uint16 ui_get_numlock_state(unsigned int state);
239void reset_modifier_keys(void);
240void rdp_send_scancode(uint32 time, uint16 flags, uint8 scancode);
241/* xwin.c */
242RD_BOOL get_key_state(unsigned int state, uint32 keysym);
243RD_BOOL ui_init(void);
244void ui_init_connection(void);
245void ui_deinit(void);
246RD_BOOL ui_create_window(void);
247void ui_resize_window(void);
248void ui_destroy_window(void);
249void xwin_toggle_fullscreen(void);
250int ui_select(int rdp_socket);
251void ui_move_pointer(int x, int y);
252RD_HBITMAP ui_create_bitmap(int width, int height, uint8 * data);
253void ui_paint_bitmap(int x, int y, int cx, int cy, int width, int height, uint8 * data);
254void ui_destroy_bitmap(RD_HBITMAP bmp);
255RD_HGLYPH ui_create_glyph(int width, int height, uint8 * data);
256void ui_destroy_glyph(RD_HGLYPH glyph);
257RD_HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 * andmask,
258 uint8 * xormask, int bpp);
259void ui_set_cursor(RD_HCURSOR cursor);
260void ui_destroy_cursor(RD_HCURSOR cursor);
261void ui_set_null_cursor(void);
262RD_HCOLOURMAP ui_create_colourmap(COLOURMAP * colours);
263void ui_destroy_colourmap(RD_HCOLOURMAP map);
264void ui_set_colourmap(RD_HCOLOURMAP map);
265void ui_set_clip(int x, int y, int cx, int cy);
266void ui_reset_clip(void);
267void ui_bell(void);
268void ui_destblt(uint8 opcode, int x, int y, int cx, int cy);
269void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH * brush, int bgcolour,
270 int fgcolour);
271void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy);
272void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy);
273void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy,
274 BRUSH * brush, int bgcolour, int fgcolour);
275void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN * pen);
276void ui_rect(int x, int y, int cx, int cy, int colour);
277void ui_polygon(uint8 opcode, uint8 fillmode, RD_POINT * point, int npoints, BRUSH * brush,
278 int bgcolour, int fgcolour);
279void ui_polyline(uint8 opcode, RD_POINT * points, int npoints, PEN * pen);
280void ui_ellipse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH * brush,
281 int bgcolour, int fgcolour);
282void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, RD_HGLYPH glyph, int srcx, int srcy,
283 int bgcolour, int fgcolour);
284void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx,
285 int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy,
286 BRUSH * brush, int bgcolour, int fgcolour, uint8 * text, uint8 length);
287void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
288void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
289void ui_begin_update(void);
290void ui_end_update(void);
291void ui_seamless_begin(RD_BOOL hidden);
292void ui_seamless_end();
293void ui_seamless_hide_desktop(void);
294void ui_seamless_unhide_desktop(void);
295void ui_seamless_toggle(void);
296void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent,
297 unsigned long flags);
298void ui_seamless_destroy_window(unsigned long id, unsigned long flags);
299void ui_seamless_destroy_group(unsigned long id, unsigned long flags);
300void ui_seamless_seticon(unsigned long id, const char *format, int width, int height, int chunk,
301 const char *data, int chunk_len);
302void ui_seamless_delicon(unsigned long id, const char *format, int width, int height);
303void ui_seamless_move_window(unsigned long id, int x, int y, int width, int height,
304 unsigned long flags);
305void ui_seamless_restack_window(unsigned long id, unsigned long behind, unsigned long flags);
306void ui_seamless_settitle(unsigned long id, const char *title, unsigned long flags);
307void ui_seamless_setstate(unsigned long id, unsigned int state, unsigned long flags);
308void ui_seamless_syncbegin(unsigned long flags);
309void ui_seamless_ack(unsigned int serial);
310/* lspci.c */
311RD_BOOL lspci_init(void);
312/* seamless.c */
313RD_BOOL seamless_init(void);
314unsigned int seamless_send_sync(void);
315unsigned int seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
316unsigned int seamless_send_position(unsigned long id, int x, int y, int width, int height,
317 unsigned long flags);
318void seamless_select_timeout(struct timeval *tv);
319unsigned int seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
320unsigned int seamless_send_focus(unsigned long id, unsigned long flags);
321unsigned int seamless_send_destroy(unsigned long id);
322/* scard.c */
323void scard_lock(int lock);
324void scard_unlock(int lock);
325int scard_enum_devices(uint32 * id, char *optarg);
326void scardSetInfo(uint32 device, uint32 id, uint32 bytes_out);
327void scard_reset_state();
328/* vrdp/rdpusb.c */
329RD_BOOL rdpusb_init(void);
330void rdpusb_close (void);
331void rdpusb_add_fds(int *n, fd_set * rfds, fd_set * wfds);
332void rdpusb_check_fds(fd_set * rfds, fd_set * wfds);
333
334/* *INDENT-OFF* */
335#ifdef __cplusplus
336}
337#endif
338/* *INDENT-ON* */
339
340#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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