/*
- 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);
#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 {
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; }
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);
/* 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 */
RES **save_resources();
RES **new_res_head();
};
-
+
CONFIG *new_config_parser();
#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
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);