/[rdesktop]/sourceforge.net/trunk/rdesktop/cliprdr.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/cliprdr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 434 by matthewc, Tue Jul 1 09:31:25 2003 UTC revision 435 by astrand, Wed Jul 9 09:18:20 2003 UTC
# Line 34  Line 34 
34  static VCHANNEL *cliprdr_channel;  static VCHANNEL *cliprdr_channel;
35    
36  static void  static void
37  cliprdr_send_packet(uint16 type, uint16 status, uint8 *data, uint32 length)  cliprdr_send_packet(uint16 type, uint16 status, uint8 * data, uint32 length)
38  {  {
39          STREAM s;          STREAM s;
40    
# Line 45  cliprdr_send_packet(uint16 type, uint16 Line 45  cliprdr_send_packet(uint16 type, uint16
45          out_uint16_le(s, status);          out_uint16_le(s, status);
46          out_uint32_le(s, length);          out_uint32_le(s, length);
47          out_uint8p(s, data, length);          out_uint8p(s, data, length);
48          out_uint32(s, 0); /* pad? */          out_uint32(s, 0);       /* pad? */
49          s_mark_end(s);          s_mark_end(s);
50          channel_send(s, cliprdr_channel);          channel_send(s, cliprdr_channel);
51  }  }
# Line 56  cliprdr_send_text_format_announce(void) Line 56  cliprdr_send_text_format_announce(void)
56          uint8 buffer[36];          uint8 buffer[36];
57    
58          buf_out_uint32(buffer, CF_TEXT);          buf_out_uint32(buffer, CF_TEXT);
59          memset(buffer+4, 0, sizeof(buffer)-4); /* description */          memset(buffer + 4, 0, sizeof(buffer) - 4);      /* description */
60          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));
61  }  }
62    
# Line 66  cliprdr_send_blah_format_announce(void) Line 66  cliprdr_send_blah_format_announce(void)
66          uint8 buffer[36];          uint8 buffer[36];
67    
68          buf_out_uint32(buffer, CF_OEMTEXT);          buf_out_uint32(buffer, CF_OEMTEXT);
69          memset(buffer+4, 0, sizeof(buffer)-4); /* description */          memset(buffer + 4, 0, sizeof(buffer) - 4);      /* description */
70          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));
71  }  }
72    
73  void  void
74  cliprdr_send_native_format_announce(uint8 *data, uint32 length)  cliprdr_send_native_format_announce(uint8 * data, uint32 length)
75  {  {
76          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, data, length);          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, data, length);
77  }  }
# Line 86  cliprdr_send_data_request(uint32 format) Line 86  cliprdr_send_data_request(uint32 format)
86  }  }
87    
88  void  void
89  cliprdr_send_data(uint8 *data, uint32 length)  cliprdr_send_data(uint8 * data, uint32 length)
90  {  {
91          cliprdr_send_packet(CLIPRDR_DATA_RESPONSE, CLIPRDR_RESPONSE, data, length);          cliprdr_send_packet(CLIPRDR_DATA_RESPONSE, CLIPRDR_RESPONSE, data, length);
92  }  }
# Line 145  cliprdr_process(STREAM s) Line 145  cliprdr_process(STREAM s)
145  BOOL  BOOL
146  cliprdr_init(void)  cliprdr_init(void)
147  {  {
148          cliprdr_channel = channel_register("cliprdr", CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP \          cliprdr_channel =
149                                   | CHANNEL_OPTION_COMPRESS_RDP | CHANNEL_OPTION_SHOW_PROTOCOL, cliprdr_process);                  channel_register("cliprdr",
150                                     CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP |
151                                     CHANNEL_OPTION_COMPRESS_RDP | CHANNEL_OPTION_SHOW_PROTOCOL,
152                                     cliprdr_process);
153          return (cliprdr_channel != NULL);          return (cliprdr_channel != NULL);
154  }  }

Legend:
Removed from v.434  
changed lines
  Added in v.435

  ViewVC Help
Powered by ViewVC 1.1.26