src/util.h

changeset 10415
faceb835eb87
parent 10414
6b10b76933e1
child 10425
d82cef15da95
--- a/src/util.h	Sat Dec 25 18:33:27 2004 +0000
+++ b/src/util.h	Sat Dec 25 19:54:24 2004 +0000
@@ -377,18 +377,22 @@
 int gaim_build_dir(const char *path, int mode);
 
 /**
- * Write a null-terminated string of data to a file of the given name
- * in the Gaim user directory ($HOME/.gaim by default).  The data is
- * typically a serialized version of one of Gaim's config files, such
- * as prefs.xml, accounts.xml, etc.  And the string is typically
- * obtained using xmlnode_to_formatted_str.
+ * Write a string of data to a file of the given name in the Gaim
+ * user directory ($HOME/.gaim by default).  The data is typically
+ * a serialized version of one of Gaim's config files, such as
+ * prefs.xml, accounts.xml, etc.  And the string is typically
+ * obtained using xmlnode_to_formatted_str.  However, this function
+ * should work fine for saving binary files as well.
  *
  * @param filename The basename of the file to write in the gaim_user_dir.
  * @param data     A null-terminated string of data to write.
+ * @param size     The size of the data to save.  If data is
+ *                 null-terminated you can pass in -1.
  *
  * @return TRUE if the file was written successfully.  FALSE otherwise.
  */
-gboolean gaim_util_write_xml_file(const char *filename, const char *data);
+gboolean gaim_util_write_data_to_file(const char *filename, const char *data,
+									  size_t size);
 
 /**
  * Creates a temporary file and returns a file pointer to it.

mercurial