]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.h
kes Correct return status on db_batch... routines.
[bacula/bacula] / bacula / src / dird / dird_conf.h
index 69381516fc60d46bb4ae5b3be7e7b7b577056b74..cd56a61e91deeaa75ed2a44e73074c7b6b2e81a9 100644 (file)
@@ -1,14 +1,7 @@
-/*
- * Director specific configuration and defines
- *
- *     Kern Sibbald, Feb MM
- *
- *    Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2007 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.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * Director specific configuration and defines
+ *
+ *     Kern Sibbald, Feb MM
+ *
+ *    Version $Id$
+ */
 
 /* NOTE:  #includes at the end of this file */
 
@@ -307,6 +307,41 @@ inline char *STORE::dev_name() const
 
 inline char *STORE::name() const { return hdr.name; }
 
+/*
+ * This is a sort of "unified" store that has both the
+ *  storage pointer and the text of where the pointer was
+ *  found.
+ */
+class USTORE {
+public:
+   STORE *store;
+   POOLMEM *store_source;
+
+   /* Methods */
+   USTORE() { store = NULL; store_source = get_pool_memory(PM_MESSAGE); 
+              *store_source = 0; };
+   ~USTORE() { destroy(); }   
+   void set_source(const char *where);
+   void destroy();
+};
+
+inline void USTORE::destroy()
+{
+   if (store_source) {
+      free_pool_memory(store_source);
+      store_source = NULL;
+   }
+}
+
+
+inline void USTORE::set_source(const char *where)
+{
+   if (!store_source) {
+      store_source = get_pool_memory(PM_MESSAGE);
+   }
+   pm_strcpy(store_source, where);
+}
+
 
 /*
  *   Job Resource
@@ -488,7 +523,7 @@ public:
    bool  recycle_current_volume;      /* attempt recycle of current volume */
    bool  AutoPrune;                   /* default for pool auto prune */
    bool  Recycle;                     /* default for media recycle yes/no */
-
+   POOL  *RecyclePool;                /* RecyclePool destination when media is purged */
    /* Methods */
    char *name() const;
 };