2 * Bacula Catalog Database Update record interface routines
4 * Bacula Catalog Database routines written specifically
5 * for Bacula. Note, these routines are VERY dumb and
6 * do not provide all the functionality of an SQL database.
7 * The purpose of these routines is to ensure that Bacula
8 * can limp along if no real database is loaded on the
11 * Kern Sibbald, January MMI
17 Bacula® - The Network Backup Solution
19 Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
21 The main author of Bacula is Kern Sibbald, with contributions from
22 many others, a complete list can be found in the file AUTHORS.
23 This program is Free Software; you can redistribute it and/or
24 modify it under the terms of version two of the GNU General Public
25 License as published by the Free Software Foundation and included
28 This program is distributed in the hope that it will be useful, but
29 WITHOUT ANY WARRANTY; without even the implied warranty of
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 General Public License for more details.
33 You should have received a copy of the GNU General Public License
34 along with this program; if not, write to the Free Software
35 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
38 Bacula® is a registered trademark of Kern Sibbald.
39 The licensor of Bacula is the Free Software Foundation Europe
40 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
41 Switzerland, email:ftf@fsfeurope.org.
45 /* The following is necessary so that we do not include
46 * the dummy external definition of DB.
48 #define __SQL_C /* indicate that this is sql.c */
56 /* -----------------------------------------------------------------------
58 * Bacula specific defines and subroutines
60 * -----------------------------------------------------------------------
65 * This is called at Job start time to add the
66 * most current start fields to the job record.
67 * It is assumed that you did a db_create_job_record() already.
69 bool db_update_job_start_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
75 * This is called at Job termination time to add all the
76 * other fields to the job record.
78 int db_update_job_end_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr, bool stats_enabled)
84 int db_update_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
89 int db_update_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
94 int db_add_digest_to_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, char *digest, int type)
99 int db_mark_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, JobId_t JobId)
104 int db_update_client_record(JCR *jcr, B_DB *mdb, CLIENT_DBR *cr)
109 int db_update_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr)
114 int db_update_media_defaults(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
119 void db_make_inchanger_unique(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
124 #endif /* HAVE_BACULA_DB */