]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/bdb_create.c
ebl update debug message (last time) :)
[bacula/bacula] / bacula / src / cats / bdb_create.c
index e86beab128471748bf51ca341ed88c17106b3b4c..9876d1a05fb07136b8c5bdbf247500a473848a9f 100644 (file)
@@ -7,37 +7,44 @@
  *  The purpose of these routines is to ensure that Bacula
  *  can limp along if no real database is loaded on the
  *  system.
- *   
- *    Kern Sibbald, January MMI 
+ *
+ *    Kern Sibbald, January MMI
  *
  *    Version $Id$
  */
-
 /*
-   Copyright (C) 2001-2003 Kern Sibbald and John Walker
+   Bacula® - The Network Backup Solution
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
    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 along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   You should have received a copy of the GNU 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.
 
- */
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
 
 
 /* The following is necessary so that we do not include
  * the dummy external definition of DB.
  */
-#define __SQL_C                      /* indicate that this is sql.c */
+#define __SQL_C                       /* indicate that this is sql.c */
 
 #include "bacula.h"
 #include "cats.h"
@@ -46,7 +53,7 @@
 #ifdef HAVE_BACULA_DB
 
 /* Forward referenced functions */
-int db_create_pool_record(B_DB *mdb, POOL_DBR *pr);
+bool db_create_pool_record(B_DB *mdb, POOL_DBR *pr);
 
 /* -----------------------------------------------------------------------
  *
@@ -62,21 +69,21 @@ int db_create_file_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
 }
 
 int db_create_file_item(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
-{           
+{
    /****FIXME***** not implemented */
    return 1;
 }
 
 
-/*  
- * Create a new record for the Job    
+/*
+ * Create a new record for the Job
  *   This record is created at the start of the Job,
  *   it is updated in bdb_update.c when the Job terminates.
  *
  * Returns: 0 on failure
- *         1 on success
+ *          1 on success
  */
-int db_create_job_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
+bool db_create_job_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
 {
    int len;
 
@@ -101,11 +108,11 @@ int db_create_job_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
    return 1;
 }
 
-/* Create a JobMedia record for Volume used this job   
+/* Create a JobMedia record for Volume used this job
  * Returns: 0 on failure
- *         record-id on success
+ *          record-id on success
  */
-int db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm)
+bool db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm)
 {
    int len;
 
@@ -135,9 +142,9 @@ int db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm)
 /*
  *  Create a unique Pool record
  * Returns: 0 on failure
- *         1 on success
+ *          1 on success
  */
-int db_create_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
+bool db_create_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
 {
    int len;
    POOL_DBR mpr;
@@ -171,15 +178,24 @@ int db_create_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
    return 1;
 }
 
+bool db_create_device_record(JCR *jcr, B_DB *mdb, DEVICE_DBR *dr)
+{ return false; }
+
+bool db_create_storage_record(JCR *jcr, B_DB *mdb, STORAGE_DBR *dr)
+{ return false; }
 
-/* 
- * Create Unique Media record. This record
+bool db_create_mediatype_record(JCR *jcr, B_DB *mdb, MEDIATYPE_DBR *dr)
+{ return false; }
+
+
+/*
+ * Create Unique Media record.  This record
  *   contains all the data pertaining to a specific
  *   Volume.
  *
  * Returns: 0 on failure
- *         1 on success
- */ 
+ *          1 on success
+ */
 int db_create_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
 {
    int len;
@@ -215,7 +231,7 @@ int db_create_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
 /*
  *  Create a unique Client record or return existing record
  * Returns: 0 on failure
- *         1 on success
+ *          1 on success
  */
 int db_create_client_record(JCR *jcr, B_DB *mdb, CLIENT_DBR *cr)
 {
@@ -254,12 +270,12 @@ int db_create_client_record(JCR *jcr, B_DB *mdb, CLIENT_DBR *cr)
 /*
  *  Create a unique FileSet record or return existing record
  *
- *   Note, here we write the FILESET_DBR structure 
+ *   Note, here we write the FILESET_DBR structure
  *
  * Returns: 0 on failure
- *         1 on success
+ *          1 on success
  */
-int db_create_fileset_record(JCR *jcr, B_DB *mdb, FILESET_DBR *fsr)
+bool db_create_fileset_record(JCR *jcr, B_DB *mdb, FILESET_DBR *fsr)
 {
    int len;
    FILESET_DBR lfsr;
@@ -293,4 +309,8 @@ int db_create_fileset_record(JCR *jcr, B_DB *mdb, FILESET_DBR *fsr)
    return 1;
 }
 
+int db_create_counter_record(JCR *jcr, B_DB *mdb, COUNTER_DBR *cr)
+{ return 0; }
+
+
 #endif /* HAVE_BACULA_DB */