📄 proto.h
字号:
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Copyright (C) Matthew Chapman 1999-2005
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef RDESKTOP_PROTO_H
#define RDESKTOP_PROTO_H
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/* bitmap.c */
BOOL bitmap_decompress(uint8 * output, int width, int height, uint8 * input, int size, int Bpp);
/* cache.c */
void cache_rebuild_bmpcache_linked_list(RDPCLIENT * This, uint8 id, sint16 * idx, int count);
void cache_bump_bitmap(RDPCLIENT * This, uint8 id, uint16 idx, int bump);
void cache_evict_bitmap(RDPCLIENT * This, uint8 id);
HBITMAP cache_get_bitmap(RDPCLIENT * This, uint8 id, uint16 idx);
void cache_put_bitmap(RDPCLIENT * This, uint8 id, uint16 idx, HBITMAP bitmap);
void cache_save_state(RDPCLIENT * This);
FONTGLYPH *cache_get_font(RDPCLIENT * This, uint8 font, uint16 character);
void cache_put_font(RDPCLIENT * This, uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width,
uint16 height, HGLYPH pixmap);
DATABLOB *cache_get_text(RDPCLIENT * This, uint8 cache_id);
void cache_put_text(RDPCLIENT * This, uint8 cache_id, void *data, int length);
uint8 *cache_get_desktop(RDPCLIENT * This, uint32 offset, int cx, int cy, int bytes_per_pixel);
void cache_put_desktop(RDPCLIENT * This, uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel,
uint8 * data);
HCURSOR cache_get_cursor(RDPCLIENT * This, uint16 cache_idx);
void cache_put_cursor(RDPCLIENT * This, uint16 cache_idx, HCURSOR cursor);
/* channels.c */
VCHANNEL *channel_register(RDPCLIENT * This, char *name, uint32 flags, void (*callback) (RDPCLIENT *, STREAM));
STREAM channel_init(RDPCLIENT * This, VCHANNEL * channel, uint32 length);
void channel_send(RDPCLIENT * This, STREAM s, VCHANNEL * channel);
void channel_process(RDPCLIENT * This, STREAM s, uint16 mcs_channel);
/* cliprdr.c */
void cliprdr_send_simple_native_format_announce(RDPCLIENT * This, uint32 format);
void cliprdr_send_native_format_announce(RDPCLIENT * This, uint8 * formats_data, uint32 formats_data_length);
void cliprdr_send_data_request(RDPCLIENT * This, uint32 format);
void cliprdr_send_data(RDPCLIENT * This, uint8 * data, uint32 length);
void cliprdr_set_mode(RDPCLIENT * This, const char *optarg);
BOOL cliprdr_init(RDPCLIENT * This);
#if 0
/* disk.c */
int disk_enum_devices(RDPCLIENT * This, uint32 * id, char *optarg);
NTSTATUS disk_query_information(RDPCLIENT * This, NTHANDLE handle, uint32 info_class, STREAM out);
NTSTATUS disk_set_information(RDPCLIENT * This, NTHANDLE handle, uint32 info_class, STREAM in, STREAM out);
NTSTATUS disk_check_notify(RDPCLIENT * This, NTHANDLE handle);
NTSTATUS disk_create_notify(RDPCLIENT * This, NTHANDLE handle, uint32 info_class);
NTSTATUS disk_query_volume_information(RDPCLIENT * This, NTHANDLE handle, uint32 info_class, STREAM out);
NTSTATUS disk_query_directory(RDPCLIENT * This, NTHANDLE handle, uint32 info_class, char *pattern, STREAM out);
#endif
/* mppc.c */
int mppc_expand(RDPCLIENT * This, uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen);
/* ewmhints.c */
int get_current_workarea(RDPCLIENT * This, uint32 * x, uint32 * y, uint32 * width, uint32 * height);
void ewmh_init(RDPCLIENT * This);
/* iso.c */
STREAM iso_init(RDPCLIENT * This, int length);
BOOL iso_send(RDPCLIENT * This, STREAM s);
STREAM iso_recv(RDPCLIENT * This, uint8 * rdpver);
BOOL iso_connect(RDPCLIENT * This, char *server, char *cookie);
BOOL iso_reconnect(RDPCLIENT * This, char *server, char *cookie);
BOOL iso_disconnect(RDPCLIENT * This);
void iso_reset_state(RDPCLIENT * This);
/* licence.c */
void licence_process(RDPCLIENT * This, STREAM s);
/* mcs.c */
STREAM mcs_init(RDPCLIENT * This, int length);
BOOL mcs_send_to_channel(RDPCLIENT * This, STREAM s, uint16 channel);
BOOL mcs_send(RDPCLIENT * This, STREAM s);
STREAM mcs_recv(RDPCLIENT * This, uint16 * channel, uint8 * rdpver);
BOOL mcs_connect(RDPCLIENT * This, char *server, char *cookie, STREAM mcs_data);
BOOL mcs_reconnect(RDPCLIENT * This, char *server, char *cookie, STREAM mcs_data);
void mcs_disconnect(RDPCLIENT * This);
void mcs_reset_state(RDPCLIENT * This);
/* orders.c */
void process_orders(RDPCLIENT * This, STREAM s, uint16 num_orders);
void reset_order_state(RDPCLIENT * This);
/* parallel.c */
int parallel_enum_devices(RDPCLIENT * This, uint32 * id, char *optarg);
/* printer.c */
int printer_enum_devices(RDPCLIENT * This, uint32 * id, char *optarg);
/* printercache.c */
int printercache_load_blob(char *printer_name, uint8 ** data);
void printercache_process(RDPCLIENT * This, STREAM s);
/* pstcache.c */
void pstcache_touch_bitmap(RDPCLIENT * This, uint8 cache_id, uint16 cache_idx, uint32 stamp);
BOOL pstcache_load_bitmap(RDPCLIENT * This, uint8 cache_id, uint16 cache_idx);
BOOL pstcache_save_bitmap(RDPCLIENT * This, uint8 cache_id, uint16 cache_idx, uint8 * key, uint8 width, uint8 height,
uint16 length, uint8 * data);
int pstcache_enumerate(RDPCLIENT * This, uint8 id, HASH_KEY * keylist);
BOOL pstcache_init(RDPCLIENT * This, uint8 cache_id);
/* rdesktop.c */
int main(int argc, char *argv[]);
void generate_random(uint8 * random);
void error(char *format, ...);
void warning(char *format, ...);
void unimpl(char *format, ...);
void hexdump(unsigned char *p, unsigned int len);
char *next_arg(char *src, char needle);
void toupper_str(char *p);
BOOL str_startswith(const char *s, const char *prefix);
BOOL str_handle_lines(RDPCLIENT * This, const char *input, char **rest, str_handle_lines_t linehandler, void *data);
BOOL subprocess(RDPCLIENT * This, char *const argv[], str_handle_lines_t linehandler, void *data);
char *l_to_a(long N, int base);
int load_licence(RDPCLIENT * This, unsigned char **data);
void save_licence(RDPCLIENT * This, unsigned char *data, int length);
BOOL rd_pstcache_mkdir(void);
int rd_open_file(char *filename);
void rd_close_file(int fd);
int rd_read_file(int fd, void *ptr, int len);
int rd_write_file(int fd, void *ptr, int len);
int rd_lseek_file(int fd, int offset);
BOOL rd_lock_file(int fd, int start, int len);
/* rdp5.c */
BOOL rdp5_process(RDPCLIENT * This, STREAM s);
/* rdp.c */
void rdp_out_unistr(RDPCLIENT * This, STREAM s, wchar_t *string, int len);
int rdp_in_unistr(RDPCLIENT * This, STREAM s, wchar_t *string, int uni_len);
BOOL rdp_send_input(RDPCLIENT * This, uint32 time, uint16 message_type, uint16 device_flags, uint16 param1,
uint16 param2);
BOOL rdp_send_client_window_status(RDPCLIENT * This, int status);
void process_colour_pointer_pdu(RDPCLIENT * This, STREAM s);
void process_cached_pointer_pdu(RDPCLIENT * This, STREAM s);
void process_system_pointer_pdu(RDPCLIENT * This, STREAM s);
void process_bitmap_updates(RDPCLIENT * This, STREAM s);
void process_palette(RDPCLIENT * This, STREAM s);
void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
void rdp_main_loop(RDPCLIENT * This, BOOL * deactivated, uint32 * ext_disc_reason);
BOOL rdp_loop(RDPCLIENT * This, BOOL * deactivated, uint32 * ext_disc_reason);
BOOL rdp_connect(RDPCLIENT * This, char *server, uint32 flags, wchar_t *username, wchar_t *domain, wchar_t *password, wchar_t *command,
wchar_t *directory, wchar_t *hostname, char *cookie);
BOOL rdp_reconnect(RDPCLIENT * This, char *server, uint32 flags, wchar_t *username, wchar_t *domain, wchar_t *password, wchar_t *command,
wchar_t *directory, wchar_t *hostname, char *cookie);
void rdp_reset_state(RDPCLIENT * This);
void rdp_disconnect(RDPCLIENT * This);
#if 0
/* rdpdr.c */
int get_device_index(RDPCLIENT * This, NTHANDLE handle);
void convert_to_unix_filename(char *filename);
BOOL rdpdr_init(RDPCLIENT * This);
void rdpdr_add_fds(RDPCLIENT * This, int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout);
struct async_iorequest *rdpdr_remove_iorequest(RDPCLIENT * This, struct async_iorequest *prev,
struct async_iorequest *iorq);
void rdpdr_check_fds(RDPCLIENT * This, fd_set * rfds, fd_set * wfds, BOOL timed_out);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -