]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/cats.h
Merge branch 'master' of ssh://bacula.git.sourceforge.net/gitroot/bacula/bacula
[bacula/bacula] / bacula / src / cats / cats.h
index 5cfb0bbc70e4c69a8a153b786c1a6b209e334bbb..18790508757914f146ece987261ca582091bc61c 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-20098 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2009 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.
@@ -901,6 +901,7 @@ struct POOL_DBR {
    int32_t AcceptAnyVolume;           /* set to accept any volume sequence */
    int32_t AutoPrune;                 /* set to prune automatically */
    int32_t Recycle;                   /* default Vol recycle flag */
+   uint32_t ActionOnPurge;            /* action on purge, e.g. truncate the disk volume */
    utime_t  VolRetention;             /* retention period in seconds */
    utime_t  VolUseDuration;           /* time in secs volume can be used */
    uint32_t MaxVolJobs;               /* Max Jobs on Volume */
@@ -976,6 +977,7 @@ struct MEDIA_DBR {
    uint64_t VolWriteTime;             /* time spent writing volume */
    utime_t  VolRetention;             /* Volume retention in seconds */
    utime_t  VolUseDuration;           /* time in secs volume can be used */
+   uint32_t ActionOnPurge;            /* action on purge, e.g. truncate the disk volume */
    uint32_t MaxVolJobs;               /* Max Jobs on Volume */
    uint32_t MaxVolFiles;              /* Max files on Volume */
    int32_t  Recycle;                  /* recycle yes/no */
@@ -1044,6 +1046,22 @@ struct db_int64_ctx {
    int count;                         /* number of values seen */
 };
 
+/* Call back context for getting a list of comma separated strings from the
+ * database 
+ */
+class db_list_ctx {
+public:
+   POOLMEM *list;                     /* list */
+   int count;                         /* number of values seen */
+
+   db_list_ctx() { list = get_pool_memory(PM_FNAME); *list = 0; count = 0; }
+   ~db_list_ctx() { free_pool_memory(list); list = NULL; }
+
+private:
+   db_list_ctx(const db_list_ctx&);            /* prohibit pass by value */
+   db_list_ctx &operator=(const db_list_ctx&); /* prohibit class assignment */
+};
+
 
 #include "protos.h"
 #include "jcr.h"