]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/cats.h
Tweak mutex order for SD
[bacula/bacula] / bacula / src / cats / cats.h
index 64f5c15e3638f8c54fd62ee125df782cbf460f88..8c0d4f90c45129e786595a2c2f06fd2254f98a79 100644 (file)
@@ -87,6 +87,7 @@ typedef int (DB_RESULT_HANDLER)(void *, int, char **);
 
 #if defined(BUILDING_CATS)
 #ifdef HAVE_SQLITE
+#error "SQLite2 is now deprecated, use SQLite3 instead."
 
 #define BDB_VERSION 11
 
@@ -835,7 +836,7 @@ struct JOBMEDIA_DBR {
    uint32_t EndFile;                  /* End file on Volume */
    uint32_t StartBlock;               /* start block on tape */
    uint32_t EndBlock;                 /* last block */
-   uint32_t Copy;                     /* identical copy */
+// uint32_t Copy;                     /* identical copy */
 };
 
 
@@ -902,6 +903,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 */
@@ -977,6 +979,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 */
@@ -1045,7 +1048,9 @@ struct db_int64_ctx {
    int count;                         /* number of values seen */
 };
 
-/* Call back context for getting a list of comma separated strings from the database */
+/* Call back context for getting a list of comma separated strings from the
+ * database 
+ */
 class db_list_ctx {
 public:
    POOLMEM *list;                     /* list */
@@ -1053,6 +1058,10 @@ public:
 
    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 */
 };
 
 
@@ -1063,7 +1072,7 @@ public:
 /*
  * Exported globals from sql.c
  */
-extern int DLL_IMP_EXP db_type;        /* SQL engine type index */
+extern int CATS_IMP_EXP db_type;        /* SQL engine type index */
 
 /*
  * Some functions exported by sql.c for use within the
@@ -1073,6 +1082,7 @@ void list_result(JCR *jcr, B_DB *mdb, DB_LIST_HANDLER *send, void *ctx, e_list_t
 void list_dashes(B_DB *mdb, DB_LIST_HANDLER *send, void *ctx);
 int get_sql_record_max(JCR *jcr, B_DB *mdb);
 bool check_tables_version(JCR *jcr, B_DB *mdb);
+bool db_check_max_connections(JCR *jcr, B_DB *mdb, uint32_t nb);
 void _db_unlock(const char *file, int line, B_DB *mdb);
 void _db_lock(const char *file, int line, B_DB *mdb);
 const char *db_get_type(void);