Clean up indentation.
[metze/wireshark/wip.git] / file.h
diff --git a/file.h b/file.h
index ea6b908e902ac36597012b60bac3d16b4dc91b5b..e3b9acff0e8dfa46950db4a64d2a56fcf9afb1e6 100644 (file)
--- a/file.h
+++ b/file.h
@@ -118,7 +118,7 @@ void cf_reload(capture_file *cf);
  * Read all packets of a capture file into the internal structures.
  *
  * @param cf the capture file to be read
- * @param from_save reread asked from cf_save
+ * @param from_save reread asked from cf_save_packets
  * @return one of cf_read_status_t
  */
 cf_read_status_t cf_read(capture_file *cf, gboolean from_save);
@@ -195,34 +195,31 @@ cf_read_status_t cf_finish_tail(capture_file *cf, int *err);
  */
 gboolean cf_can_save_as(capture_file *cf);
 
-/**
- * Save a capture file.  Does a "safe save" if the specified
- * pathname already exists.
- *
- * @param cf the capture file to save to
- * @param fname the filename to save to
- * @param save_format the format of the file to save (libpcap, ...)
- * @param compressed whether to gzip compress the file
- * @return one of cf_status_t
- */
-cf_status_t cf_save(capture_file * cf, const char *fname, guint save_format, gboolean compressed);
-
 /**
  * Save all packets in a capture file to a new file, and, if that succeeds,
- * make that file the current capture file.  Fails if the specified
- * target file already exists.
+ * make that file the current capture file.  If there's already a file with
+ * that name, do a "safe save", writing to a temporary file in the same
+ * directory and, if the write succeeds, renaming the new file on top of the
+ * old file, so that if the write fails, the old file is still intact.
  *
  * @param cf the capture file to save to
  * @param fname the filename to save to
  * @param save_format the format of the file to save (libpcap, ...)
  * @param compressed whether to gzip compress the file
+ * @param dont_reopen TRUE if it shouldn't reopen and make that file the
+ * current capture file
  * @return one of cf_status_t
  */
-cf_status_t cf_save_as(capture_file * cf, const char *fname, guint save_format, gboolean compressed);
+cf_status_t cf_save_packets(capture_file * cf, const char *fname,
+                            guint save_format, gboolean compressed,
+                            gboolean dont_reopen);
 
 /**
- * Export some or all packets from a capture file to a new file.  Fails if
- * the specified target file already exists.
+ * Export some or all packets from a capture file to a new file.  If there's
+ * already a file with that name, do a "safe save", writing to a temporary
+ * file in the same directory and, if the write succeeds, renaming the new
+ * file on top of the old file, so that if the write fails, the old file is
+ * still intact.
  *
  * @param cf the capture file to write to
  * @param fname the filename to write to
@@ -240,9 +237,9 @@ cf_status_t cf_export_specified_packets(capture_file *cf, const char *fname,
  * Get a displayable name of the capture file.
  *
  * @param cf the capture file
- * @return the displayable name (don't have to be g_free'd)
+ * @return the displayable name (must be g_free'd)
  */
-const gchar *cf_get_display_name(capture_file *cf);
+gchar *cf_get_display_name(capture_file *cf);
 
 /**
  * Set the source of the capture data for temporary files, e.g.