]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/bdb_find.c
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / bacula / src / cats / bdb_find.c
1 /*
2  * Bacula Catalog Database Find record interface routines
3  *
4  *  Note, generally, these routines are more complicated
5  *        that a simple search by name or id. Such simple
6  *        request are in get.c
7  *
8  * Bacula Catalog Database routines written specifically
9  *  for Bacula.  Note, these routines are VERY dumb and
10  *  do not provide all the functionality of an SQL database.
11  *  The purpose of these routines is to ensure that Bacula
12  *  can limp along if no real database is loaded on the
13  *  system.
14  *
15  *    Kern Sibbald, January MMI
16  *
17  *    Version $Id$
18  */
19 /*
20    Bacula® - The Network Backup Solution
21
22    Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
23
24    The main author of Bacula is Kern Sibbald, with contributions from
25    many others, a complete list can be found in the file AUTHORS.
26    This program is Free Software; you can redistribute it and/or
27    modify it under the terms of version two of the GNU General Public
28    License as published by the Free Software Foundation and included
29    in the file LICENSE.
30
31    This program is distributed in the hope that it will be useful, but
32    WITHOUT ANY WARRANTY; without even the implied warranty of
33    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34    General Public License for more details.
35
36    You should have received a copy of the GNU General Public License
37    along with this program; if not, write to the Free Software
38    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
39    02110-1301, USA.
40
41    Bacula® is a registered trademark of Kern Sibbald.
42    The licensor of Bacula is the Free Software Foundation Europe
43    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
44    Switzerland, email:ftf@fsfeurope.org.
45 */
46
47 /* The following is necessary so that we do not include
48  * the dummy external definition of DB.
49  */
50 #define __SQL_C                       /* indicate that this is sql.c */
51
52 #include "bacula.h"
53 #include "cats.h"
54 #include "bdb.h"
55
56 #ifdef HAVE_BACULA_DB
57
58 /* Forward referenced functions */
59
60 /* -----------------------------------------------------------------------
61  *
62  *   Bacula specific defines and subroutines
63  *
64  * -----------------------------------------------------------------------
65  */
66
67
68 /*
69  * Find job start time. Used to find last full save that terminated normally
70  * so we can do Incremental and Differential saves.
71  *
72  * Returns: 0 on failure
73  *          1 on success, jr unchanged, but stime set
74  */
75 bool db_find_job_start_time(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM **stime)
76 {
77    return 0;
78 }
79
80
81 /*
82  * Find Available Media (Volume) for Pool
83  *
84  * Find a Volume for a given PoolId, MediaType, and VolStatus
85  *
86  *   Note! this does not correctly implement InChanger.
87  *
88  * Returns: 0 on failure
89  *          numrows on success
90  */
91 int
92 db_find_next_volume(JCR *jcr, B_DB *mdb, int item, bool InChanger, MEDIA_DBR *mr)
93 {
94    return 0;
95 }
96
97 bool
98 db_find_last_jobid(JCR *jcr, B_DB *mdb, const char *Name, JOB_DBR *jr)
99 { return false; }
100
101 bool
102 db_find_failed_job_since(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM *stime, int &JobLevel)
103 { return false; }
104
105
106 #endif /* HAVE_BACULA_DB */