]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/parse_conf.h
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / lib / parse_conf.h
index 2d84752868bc193b31c266c436bfd6d7119493ac..9b147d6fc4c311bda9f06e2d830c44b4e83c8dfd 100644 (file)
@@ -1,29 +1,20 @@
 /*
-   Bacula® - The Network Backup Solution
-
-   Copyright (C) 2000-2010 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
-   License as published by the Free Software Foundation and included
-   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., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-   Bacula® is a registered trademark of Kern Sibbald.
-   The licensor of Bacula is the Free Software Foundation Europe
-   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-   Switzerland, email:ftf@fsfeurope.org.
+   Bacula(R) - The Network Backup Solution
+
+   Copyright (C) 2000-2016 Kern Sibbald
+
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
+
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
+
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 /*
  *
  *
  */
 
-struct RES_ITEM;                    /* Declare forward referenced structure */
+/* Used for certain keyword tables */
+struct s_kw {
+   const char *name;
+   uint32_t token;
+};
+
+struct RES_ITEM;                   /* Declare forward referenced structure */
 struct RES_ITEM2;                  /* Declare forward referenced structure */
 class RES;                         /* Declare forware referenced structure */
 typedef void (MSG_RES_HANDLER)(LEX *lc, RES_ITEM *item, int index, int pass);
@@ -125,6 +122,7 @@ struct RES_TABLE {
 #define ITEM_REQUIRED    0x1          /* item required */
 #define ITEM_DEFAULT     0x2          /* default supplied */
 #define ITEM_NO_EQUALS   0x4          /* Don't scan = after name */
+#define ITEM_LAST        0x8          /* Last item in list */
 
 /* Message Resource */
 class MSGS {
@@ -145,6 +143,7 @@ public:
    void clear_in_use() { lock(); m_in_use=false; unlock(); }
    void set_in_use() { wait_not_in_use(); m_in_use=true; unlock(); }
    void set_closing() { m_closing=true; }
+   bool get_closing() { return m_closing; }
    void clear_closing() { lock(); m_closing=false; unlock(); }
    bool is_closing() { lock(); bool rtn=m_closing; unlock(); return rtn; }
 
@@ -155,7 +154,7 @@ public:
 
 inline char *MSGS::name() const { return hdr.name; }
 
-/* 
+/*
  * Old C style configuration routines -- deprecated do not use.
  */
 //int   parse_config(const char *cf, LEX_ERROR_HANDLER *scan_error = NULL, int err_type=M_ERROR_TERM);
@@ -178,7 +177,7 @@ public:
    /* The below are not yet implemented */
    int32_t m_r_first;                  /* first daemon resource type */
    int32_t m_r_last;                   /* last daemon resource type */
-   RES_TABLE *m_resources;             /* pointer to table of permitted resources */      
+   RES_TABLE *m_resources;             /* pointer to table of permitted resources */
    RES **m_res_head;                   /* pointer to defined resources */
    brwlock_t m_res_lock;               /* resource lock */
 
@@ -199,7 +198,7 @@ public:
    RES **save_resources();
    RES **new_res_head();
 };
+
 CONFIG *new_config_parser();
 
 
@@ -218,7 +217,7 @@ const char *res_to_str(int rcode);
 #ifdef HAVE_TYPEOF
 #define foreach_res(var, type) \
         for((var)=NULL; ((var)=(typeof(var))GetNextRes((type), (RES *)var));)
-#else 
+#else
 #define foreach_res(var, type) \
     for(var=NULL; (*((void **)&(var))=(void *)GetNextRes((type), (RES *)var));)
 #endif
@@ -244,6 +243,7 @@ void store_bool(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_time(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_size64(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_size32(LEX *lc, RES_ITEM *item, int index, int pass);
+void store_speed(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_defs(LEX *lc, RES_ITEM *item, int index, int pass);
 void store_label(LEX *lc, RES_ITEM *item, int index, int pass);