Fixed command calling crash
[silc.git] / lib / silcutil / silcmime.h
index 649c3d369c3e91a450c7de8a2d7f7242b6c6ce86..8bc221cd07ec2d968228c3e60b42d296ec94a410 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 Pekka Riikonen
+  Copyright (C) 2005 - 2006 Pekka Riikonen
 
   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
@@ -25,6 +25,9 @@
  * MIME messages, multipart MIME messages, including nested multiparts, and
  * MIME fragmentation and defragmentation.
  *
+ * SILC Mime API is not thread-safe.  If the same MIME context must be
+ * used in multithreaded environment concurrency control must be employed.
+ *
  ***/
 
 #ifndef SILCMIME_H
@@ -290,6 +293,22 @@ void silc_mime_add_data(SilcMime mime, const unsigned char *data,
  ***/
 const unsigned char *silc_mime_get_data(SilcMime mime, SilcUInt32 *data_len);
 
+/****f* silcutil/SILCMIMEAPI/silc_mime_steal_data
+ *
+ * SYNOPSIS
+ *
+ *    unsigned char *
+ *    silc_mime_steal_data(SilcMime mime, SilcUInt32 *data_len);
+ *
+ * DESCRIPTION
+ *
+ *    Returns the MIME data from the `mime' message.  The data will be
+ *    removed from the `mime' and the caller is responsible of freeing the
+ *    returned pointer.
+ *
+ ***/
+unsigned char *silc_mime_steal_data(SilcMime mime, SilcUInt32 *data_len);
+
 /****f* silcutil/SILCMIMEAPI/silc_mime_is_partial
  *
  * SYNOPSIS