--- sourceforge.net/trunk/rdesktop/proto.h 2002/11/19 14:48:02 275 +++ sourceforge.net/trunk/rdesktop/proto.h 2003/06/19 07:29:53 424 @@ -1,6 +1,6 @@ /* bitmap.c */ -BOOL bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, - int size); +BOOL bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, int size, + int Bpp); /* cache.c */ HBITMAP cache_get_bitmap(uint8 cache_id, uint16 cache_idx); void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap); @@ -14,24 +14,45 @@ uint8 * data); HCURSOR cache_get_cursor(uint16 cache_idx); void cache_put_cursor(uint16 cache_idx, HCURSOR cursor); +/* channels.c */ +uint16 get_num_channels(void); +void register_channel(char *name, uint32 flags, void (*callback) (STREAM, uint16)); +rdp5_channel *find_channel_by_channelno(uint16 channelno); +rdp5_channel *find_channel_by_num(uint16 num); +void dummy_callback(STREAM s, uint16 channelno); +void channels_init(void); +/* cliprdr.c */ +void cliprdr_ipc_format_announce(unsigned char *data, uint16 length); +void cliprdr_handle_SelectionClear(void); +void cliprdr_handle_server_data(uint32 length, uint32 flags, STREAM s); +void cliprdr_handle_server_data_request(STREAM s); +void cliprdr_callback(STREAM s, uint16 channelno); +void cliprdr_ipc_primary_lost(unsigned char *data, uint16 length); +void cliprdr_init(void); /* ewmhints.c */ int get_current_workarea(uint32 * x, uint32 * y, uint32 * width, uint32 * height); +/* ipc.c */ +void ipc_register_ipcnotify(uint16 messagetype, void (*notifycallback) (unsigned char *, uint16)); +void ipc_deregister_ipcnotify(uint16 messagetype); +void ipc_init(void); +void ipc_send_message(uint16 messagetype, unsigned char *data, uint16 length); /* iso.c */ STREAM iso_init(int length); void iso_send(STREAM s); STREAM iso_recv(void); -BOOL iso_connect(char *server); +BOOL iso_connect(char *server, char *username); void iso_disconnect(void); /* licence.c */ void licence_process(STREAM s); /* mcs.c */ STREAM mcs_init(int length); +void mcs_send_to_channel(STREAM s, uint16 channel); void mcs_send(STREAM s); -STREAM mcs_recv(void); -BOOL mcs_connect(char *server, STREAM mcs_data); +STREAM mcs_recv(uint16 * channel); +BOOL mcs_connect(char *server, STREAM mcs_data, char *username); void mcs_disconnect(void); /* orders.c */ -void process_orders(STREAM s); +void process_orders(STREAM s, uint16 num_orders); void reset_order_state(void); /* rdesktop.c */ int main(int argc, char *argv[]); @@ -40,31 +61,45 @@ void *xrealloc(void *oldmem, int size); void xfree(void *mem); void error(char *format, ...); +void warning(char *format, ...); void unimpl(char *format, ...); -void hexdump(unsigned char *p, unsigned int len); +void hexdump(unsigned char *p, int len); +int load_licence(unsigned char **data); +void save_licence(unsigned char *data, int length); /* rdp.c */ void rdp_out_unistr(STREAM s, char *string, int len); void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2); -void rdp_main_loop(void); +void process_null_system_pointer_pdu(STREAM s); +void process_colour_pointer_pdu(STREAM s); +void process_cached_pointer_pdu(STREAM s); +void process_bitmap_updates(STREAM s); +void process_palette(STREAM s); +BOOL rdp_main_loop(void); BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory); void rdp_disconnect(void); +/* rdp5.c */ +void rdp5_process(STREAM s, BOOL encryption); +void rdp5_process_channel(STREAM s, uint16 channelno); /* secure.c */ void sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt); void sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2); void buf_out_uint32(uint8 * buffer, uint32 value); void sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 * data, int datalen); +void sec_decrypt(uint8 * data, int length); STREAM sec_init(uint32 flags, int maxlen); +void sec_send_to_channel(STREAM s, uint32 flags, uint16 channel); void sec_send(STREAM s, uint32 flags); +void sec_process_mcs_data(STREAM s); STREAM sec_recv(void); -BOOL sec_connect(char *server); +BOOL sec_connect(char *server, char *username); void sec_disconnect(void); /* tcp.c */ -STREAM tcp_init(int maxlen); +STREAM tcp_init(uint32 maxlen); void tcp_send(STREAM s); -STREAM tcp_recv(int length); +STREAM tcp_recv(STREAM s, uint32 length); BOOL tcp_connect(char *server); void tcp_disconnect(void); /* xkeymap.c */ @@ -77,7 +112,6 @@ void reset_modifier_keys(unsigned int state); void rdp_send_scancode(uint32 time, uint16 flags, uint8 scancode); /* xwin.c */ -void mwm_hide_decorations(void); BOOL get_key_state(unsigned int state, uint32 keysym); BOOL ui_init(void); void ui_deinit(void);