/* autoprune.c */
extern void do_autoprune(JCR *jcr);
-extern int prune_volumes(JCR *jcr);
+extern bool prune_volumes(JCR *jcr, MEDIA_DBR *mr);
/* autorecycle.c */
extern bool recycle_oldest_purged_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
extern bool setup_job(JCR *jcr);
extern void create_clones(JCR *jcr);
extern bool create_restore_bootstrap_file(JCR *jcr);
+extern void dird_free_jcr(JCR *jcr);
+extern void dird_free_jcr_pointers(JCR *jcr);
/* migration.c */
extern bool do_migration(JCR *jcr);
extern void wait_for_storage_daemon_termination(JCR *jcr);
/* next_vol.c */
-int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index, bool create);
+int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index,
+ bool create, bool purge);
bool has_volume_expired(JCR *jcr, MEDIA_DBR *mr);
void check_if_volume_valid_or_recyclable(JCR *jcr, MEDIA_DBR *mr, const char **reason);
int confirm_retention(UAContext *ua, utime_t *ret, const char *msg);
bool get_level_from_name(JCR *jcr, const char *level_name);
+/* ua_status.c */
+void list_dir_status_header(UAContext *ua);
+
/* ua_tree.c */
bool user_select_files_from_tree(TREE_CTX *tree);
int insert_tree_handler(void *ctx, int num_fields, char **row);
int prune_files(UAContext *ua, CLIENT *client);
int prune_jobs(UAContext *ua, CLIENT *client, int JobType);
bool prune_volume(UAContext *ua, MEDIA_DBR *mr);
+int job_delete_handler(void *ctx, int num_fields, char **row);
+int del_count_handler(void *ctx, int num_fields, char **row);
+int file_delete_handler(void *ctx, int num_fields, char **row);
+int get_prune_list_for_volume(UAContext *ua, MEDIA_DBR *mr, del_ctx *del);
/* ua_purge.c */
+bool is_volume_purged(UAContext *ua, MEDIA_DBR *mr);
bool mark_media_purged(UAContext *ua, MEDIA_DBR *mr);
void purge_files_from_volume(UAContext *ua, MEDIA_DBR *mr );
-int purge_jobs_from_volume(UAContext *ua, MEDIA_DBR *mr);
-void purge_files_from_job(UAContext *ua, JobId_t JobId);
-void purge_job_from_catalog(UAContext *ua, JobId_t JobId);
-void purge_job_records_from_catalog(UAContext *ua, JobId_t JobId);
+bool purge_jobs_from_volume(UAContext *ua, MEDIA_DBR *mr);
+void purge_files_from_jobs(UAContext *ua, char *jobs);
+void purge_jobs_from_catalog(UAContext *ua, char *jobs);
+void purge_job_list_from_catalog(UAContext *ua, del_ctx &del);
+void purge_files_from_job_list(UAContext *ua, del_ctx &del);
/* ua_run.c */