]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/protos.h
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / dird / protos.h
index ee7bef42deffc969d7e6d3cb9a4a01ff62ce0b0d..d832494350a9e1868645e77ab10e3414554ea2f3 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -42,12 +42,16 @@ extern int authenticate_user_agent(UAContext *ua);
 
 /* autoprune.c */
 extern void do_autoprune(JCR *jcr);
-extern void prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
+extern void prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr,
+              STORE *store);
 
 /* autorecycle.c */
-extern bool recycle_oldest_purged_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
+extern bool recycle_oldest_purged_volume(JCR *jcr, bool InChanger,
+              MEDIA_DBR *mr, STORE *store);
+
 extern int recycle_volume(JCR *jcr, MEDIA_DBR *mr);
-extern bool find_recycled_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
+extern bool find_recycled_volume(JCR *jcr, bool InChanger,
+                MEDIA_DBR *mr, STORE *store);
 
 /* backup.c */
 extern int wait_for_job_termination(JCR *jcr, int timeout=0);
@@ -84,7 +88,7 @@ extern bool despool_attributes_from_file(JCR *jcr, const char *file);
 
 /* dird_conf.c */
 extern const char *level_to_str(int level);
-extern "C" char *job_code_callback_filesetname(JCR *jcr, const char*);
+extern "C" char *job_code_callback_director(JCR *jcr, const char*);
 
 /* expand.c */
 int variable_expansion(JCR *jcr, char *inp, POOLMEM **exp);
@@ -141,6 +145,11 @@ extern void dird_free_jcr(JCR *jcr);
 extern void dird_free_jcr_pointers(JCR *jcr);
 extern void cancel_storage_daemon_job(JCR *jcr);
 extern bool run_console_command(JCR *jcr, const char *cmd);
+extern void sd_msg_thread_send_signal(JCR *jcr, int sig);
+
+/* jobq.c */
+extern bool inc_read_store(JCR *jcr);
+extern void dec_read_store(JCR *jcr);
 
 /* migration.c */
 extern bool do_migration(JCR *jcr);
@@ -163,14 +172,16 @@ extern void wait_for_storage_daemon_termination(JCR *jcr);
 extern bool send_bootstrap_file(JCR *jcr, BSOCK *sd);
 
 /* next_vol.c */
+void set_storageid_in_mr(STORE *store, MEDIA_DBR *mr);
 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);
-bool get_scratch_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
+bool get_scratch_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr,
+        STORE *store);
 
 /* newvol.c */
-bool newVolume(JCR *jcr, MEDIA_DBR *mr);
+bool newVolume(JCR *jcr, MEDIA_DBR *mr, STORE *store);
 
 /* python.c */
 int generate_job_event(JCR *jcr, const char *event);
@@ -205,7 +216,7 @@ void set_pooldbr_from_poolres(POOL_DBR *pr, POOL *pool, e_pool_op op);
 int update_pool_references(JCR *jcr, B_DB *db, POOL *pool);
 
 /* ua_input.c */
-int get_cmd(UAContext *ua, const char *prompt);
+int get_cmd(UAContext *ua, const char *prompt, bool subprompt=false);
 bool get_pint(UAContext *ua, const char *prompt);
 bool get_yesno(UAContext *ua, const char *prompt);
 bool is_yesno(char *val, int *ret);
@@ -261,7 +272,9 @@ int     get_media_type(UAContext *ua, char *MediaType, int max_media);
 bool    get_pool_dbr(UAContext *ua, POOL_DBR *pr, const char *argk="pool");
 bool    get_client_dbr(UAContext *ua, CLIENT_DBR *cr);
 POOL   *get_pool_resource(UAContext *ua);
+JOB    *get_restore_job(UAContext *ua);
 POOL   *select_pool_resource(UAContext *ua);
+JCR *select_running_job(UAContext *ua, const char *reason);
 CLIENT *get_client_resource(UAContext *ua);
 int     get_job_dbr(UAContext *ua, JOB_DBR *jr);