/[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 885 by stargo, Thu Apr 14 16:46:13 2005 UTC revision 1025 by forsberg, Mon Nov 7 13:15:19 2005 UTC
# Line 50  cliprdr_send_packet(uint16 type, uint16 Line 50  cliprdr_send_packet(uint16 type, uint16
50          channel_send(s, cliprdr_channel);          channel_send(s, cliprdr_channel);
51  }  }
52    
53    /* Helper which announces our readiness to supply clipboard data
54       in a single format (such as CF_TEXT) to the RDP side.
55       To announce more than one format at a time, use
56       cliprdr_send_native_format_announce.
57     */
58  void  void
59  cliprdr_send_text_format_announce(void)  cliprdr_send_simple_native_format_announce(uint32 format)
60  {  {
61          uint8 buffer[36];          uint8 buffer[36];
62    
63          buf_out_uint32(buffer, CF_TEXT);          buf_out_uint32(buffer, format);
         memset(buffer + 4, 0, sizeof(buffer) - 4);      /* description */  
         cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));  
 }  
   
 void  
 cliprdr_send_blah_format_announce(void)  
 {  
         uint8 buffer[36];  
   
         buf_out_uint32(buffer, CF_OEMTEXT);  
64          memset(buffer + 4, 0, sizeof(buffer) - 4);      /* description */          memset(buffer + 4, 0, sizeof(buffer) - 4);      /* description */
65          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, buffer, sizeof(buffer));          cliprdr_send_native_format_announce(buffer, sizeof(buffer));
66  }  }
67    
68    /* Announces our readiness to supply clipboard data in multiple
69       formats, each denoted by a 36-byte format descriptor of
70       [ uint32 format + 32-byte description ].
71     */
72  void  void
73  cliprdr_send_native_format_announce(uint8 * data, uint32 length)  cliprdr_send_native_format_announce(uint8 * formats_data, uint32 formats_data_length)
74  {  {
75          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, data, length);          cliprdr_send_packet(CLIPRDR_FORMAT_ANNOUNCE, CLIPRDR_REQUEST, formats_data, formats_data_length);
76  }  }
77    
78  void  void
# Line 111  cliprdr_process(STREAM s) Line 110  cliprdr_process(STREAM s)
110                  {                  {
111                          /* FIXME: We seem to get this when we send an announce while the server is                          /* FIXME: We seem to get this when we send an announce while the server is
112                             still processing a paste. Try sending another announce. */                             still processing a paste. Try sending another announce. */
113                          cliprdr_send_text_format_announce();                          cliprdr_send_simple_native_format_announce(CF_TEXT);
114                          return;                          return;
115                  }                  }
116    

Legend:
Removed from v.885  
changed lines
  Added in v.1025

  ViewVC Help
Powered by ViewVC 1.1.26