]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/parse_conf.h
kes Correctly detect Ubuntu systems, and add ubuntu platform directory.
[bacula/bacula] / bacula / src / lib / parse_conf.h
index a480844ce65d3a2068e2f1acc3496b4088df8413..6ce558666998154cbf9e49286e19b774449d3882 100644 (file)
@@ -94,36 +94,6 @@ struct RES_TABLE {
    int rcode;                         /* code if needed */
 };
 
-class PARSER {
-public:
-   const char *m_cf;                   /* config file */
-   LEX_ERROR_HANDLER *m_scan_error;    /* error handler if non-null */
-   int m_err_type;                     /* the way to terminate on failure */
-   void *m_res_all;                    /* pointer to res_all buffer */
-   int m_res_all_size;                 /* length of buffer */
-   /* The below are not yet implemented */
-   int m_r_first;                      /* first daemon resource type */
-   int m_r_last;                       /* last daemon resource type */
-   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 */
-
-   /* functions */
-   void init(
-      const char *cf,
-      LEX_ERROR_HANDLER *scan_error,
-      int err_type,
-      void *vres_all,
-      int res_all_size,
-      int r_first,
-      int r_last,
-      RES_TABLE *resources,
-      RES **res_head);
-
-   bool parse_config();
-};
-
-PARSER *new_parser();
 
 
 /* Common Resource definitions */
@@ -149,13 +119,52 @@ public:
 
 inline char *MSGS::name() const { return hdr.name; }
 
-/* Configuration routines */
-
+/* 
+ * 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);
 void    free_config_resources(void);
 RES   **save_config_resources(void);
 RES   **new_res_head();
 
+/*
+ * New C++ configuration routines
+ */
+
+class CONFIG {
+public:
+   const char *m_cf;                   /* config file */
+   LEX_ERROR_HANDLER *m_scan_error;    /* error handler if non-null */
+   int m_err_type;                     /* the way to terminate on failure */
+   void *m_res_all;                    /* pointer to res_all buffer */
+   int m_res_all_size;                 /* length of buffer */
+   /* The below are not yet implemented */
+   int m_r_first;                      /* first daemon resource type */
+   int m_r_last;                       /* last daemon resource type */
+   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 */
+
+   /* functions */
+   void init(
+      const char *cf,
+      LEX_ERROR_HANDLER *scan_error,
+      int err_type,
+      void *vres_all,
+      int res_all_size,
+      int r_first,
+      int r_last,
+      RES_TABLE *resources,
+      RES **res_head);
+
+   bool parse_config();
+   void free_resources();
+   RES **save_resources();
+   RES **new_res_head();
+};
+CONFIG *new_config_parser();
+
 
 /* Resource routines */
 RES *GetResWithName(int rcode, const char *name);