+/* Get a list of holding disks. This is equivalent to
+ * getconf_holdingdisks() with holdingdisk_get_diskdir().
+ *
+ * @returns: newly allocated GSList of matching disks
+ */
+GSList *
+holding_get_disks(void);
+
+/* Get a list of holding files, optionally limited to a single holding
+ * directory. Can return a list either of full pathnames or of
+ * bare file names.
+ *
+ * @param hdir: holding directory to enumerate, or NULL for all
+ * @param fullpaths: if true, return full pathnames
+ * @returns: newly allocated GSList of matching files
+ */
+GSList *
+holding_get_files(char *hdir,
+ int fullpaths);
+
+/* Get a list of holding files chunks in the given holding
+ * file. Always returns full paths.
+ *
+ * @param hfile: holding file to enumerate
+ * @returns: newly allocated GSList of matching holding file chunks
+ */
+GSList *
+holding_get_file_chunks(char *hfile);
+
+/* Get a list of holding files that should be flushed, optionally
+ * matching only certain datestamps. This function does *not*
+ * match the dumps against the disklist.
+ *
+ * @param dateargs: GSList of datestamps expressions to dump, or NULL
+ * for all
+ * @returns: a newly allocated GSList listing all matching holding
+ * files
+ */
+GSList *
+holding_get_files_for_flush(GSList *dateargs);
+
+/* Get a list of all datestamps for which dumps are in the holding
+ * disk. This scans all dumps and takes the union of their
+ * datestamps (some/all of which may actually be timestamps,
+ * depending on the setting of config option usetimestamps)
+ *
+ * @returns: a newly allocated GSList listing all datestamps
+ */
+GSList *
+holding_get_all_datestamps(void);
+
+/* Get the total size of a holding file, including all holding
+ * file chunks, in kilobytes.
+ *
+ * @param holding_file: full pathname of holding file
+ * @param strip_headers: if true, don't count the headers in the
+ * total size
+ * @returns: total size in kbytes of the holding file, or -1 in an error
+ */
+off_t
+holding_file_size(char *holding_file,
+ int strip_headers);
+
+/* Unlink a holding file, including all holding file chunks.
+ *
+ * @param holding_file: full pathname of holding file
+ * @returns: 1 on success, else 0
+ */
+int
+holding_file_unlink(char *holding_file);
+
+/* Given a pathname of a holding file, read the file header.
+ * the result parameter may be altered even if an error is
+ * returned.
+ *
+ * @param fname: full pathname of holding file
+ * @param file: (result) dumpfile_t structure
+ * @returns: 1 on success, else 0
+ */
+int
+holding_file_get_dumpfile(char *fname,
+ dumpfile_t *file);
+
+/*
+ * Maintenance
+ */
+
+/* Clean up all holding disks, restoring from a possible crash or
+ * other errors. This function is intentionally opaque, as the
+ * details of holding disk are hidden from other applications.
+ *
+ * All error and warning messages go to the debug log.
+ *
+ * @param corrupt_dle: function that is called for any DLEs for
+ * which corrupt dumps are found.
+ * @param verbose_output: if non-NULL, send progress messages to
+ * this file.
+ */
+typedef void (*corrupt_dle_fn)(char *hostname, char *disk);
+void
+holding_cleanup(corrupt_dle_fn corrupt_dle,
+ FILE *verbose_output);
+
+/*
+ * application-specific support
+ */
+
+/* Set the orig_size in the header
+ *
+ * @param holding_file: full pathname of holding file.
+ * @param orig_size: the size.
+ */
+void
+holding_set_origsize(char *holding_file, off_t orig_size);
+
+/* Rename holding files from the temporary names used during
+ * creation.
+ *
+ * This is currently called by driver.c, but will disappear when
+ * holding is fully converted to the device API
+ *
+ * @param holding_file: full pathname of holding file,
+ * without '.tmp'
+ * @param complete: if 0, set 'is_partial' to 1 in each file
+ * @returns: 1 on success, else 0
+ */
+int
+rename_tmp_holding(char *holding_file,
+ int complete);
+
+/* Set up a holding directory and do basic permission
+ * checks on it
+ *
+ * @param diskdir: holding directory to set up
+ * @returns: 1 on success, else 0
+ */
+int
+mkholdingdir(char *diskdir);