diff src/util.h @ 10414:26eac2362c32

[gaim-migrate @ 11664] I'm starting to feel better. Little change here, little change there. Mostly I added a function gaim_util_write_xml_file to be used to write our config files. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 25 Dec 2004 18:33:27 +0000
parents 8d42237564f6
children 5b7a74d397cc
line wrap: on
line diff
--- a/src/util.h	Fri Dec 24 16:45:33 2004 +0000
+++ b/src/util.h	Sat Dec 25 18:33:27 2004 +0000
@@ -377,6 +377,20 @@
 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.
+ *
+ * @param filename The basename of the file to write in the gaim_user_dir.
+ * @param data     A null-terminated string of data to write.
+ *
+ * @return TRUE if the file was written successfully.  FALSE otherwise.
+ */
+gboolean gaim_util_write_xml_file(const char *filename, const char *data);
+
+/**
  * Creates a temporary file and returns a file pointer to it.
  *
  * This is like mkstemp(), but returns a file pointer and uses a