]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/bdb_update.c
Fix segfault when loading Plugins
[bacula/bacula] / bacula / src / cats / bdb_update.c
1 /*
2  * Bacula Catalog Database Update record interface routines
3  *
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
9  *  system.
10  *
11  *    Kern Sibbald, January MMI
12  *
13  *
14  *    Version $Id$
15  */
16 /*
17    Bacula® - The Network Backup Solution
18
19    Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
20
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
26    in the file LICENSE.
27
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.
32
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
36    02110-1301, USA.
37
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.
42 */
43
44
45 /* The following is necessary so that we do not include
46  * the dummy external definition of DB.
47  */
48 #define __SQL_C                       /* indicate that this is sql.c */
49
50 #include "bacula.h"
51 #include "cats.h"
52 #include "bdb.h"
53
54 #ifdef HAVE_BACULA_DB
55
56 /* -----------------------------------------------------------------------
57  *
58  *   Bacula specific defines and subroutines
59  *
60  * -----------------------------------------------------------------------
61  */
62
63
64 /*
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.
68  */
69 bool db_update_job_start_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
70 {
71    return false;
72 }
73
74 /*
75  * This is called at Job termination time to add all the
76  * other fields to the job record.
77  */
78 int db_update_job_end_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr, bool stats_enabled)
79 {
80    return 0;
81 }
82
83
84 int db_update_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
85 {
86    return 0;
87 }
88
89 int db_update_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
90 {
91    return 0;
92 }
93
94 int db_add_digest_to_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, char *digest, int type)
95 {
96    return 1;
97 }
98
99 int db_mark_file_record(JCR *jcr, B_DB *mdb, FileId_t FileId, JobId_t JobId)
100 {
101    return 1;
102 }
103
104 int db_update_client_record(JCR *jcr, B_DB *mdb, CLIENT_DBR *cr)
105 {
106    return 1;
107 }
108
109 int db_update_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr)
110 {
111    return 0;
112 }
113
114 int db_update_media_defaults(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
115 {
116    return 1;
117 }
118
119 void db_make_inchanger_unique(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
120 {
121   return;
122 }
123
124 #endif /* HAVE_BACULA_DB */