From 2de06498311daa8878f95a3a82f1a0e1f9bd7717 Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Wed, 6 Nov 2019 09:58:05 +0100 Subject: [PATCH] jcr: cleanup forward declarations --- core/src/filed/jcr_private.h | 4 ++++ core/src/findlib/match.h | 2 ++ core/src/include/jcr.h | 21 +++------------------ core/src/stored/jcr_private.h | 3 +++ 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/core/src/filed/jcr_private.h b/core/src/filed/jcr_private.h index 4469c35e30a..30fe47dbe37 100644 --- a/core/src/filed/jcr_private.h +++ b/core/src/filed/jcr_private.h @@ -29,6 +29,10 @@ struct acl_data_t; struct xattr_data_t; +namespace filedaemon { +class BareosAccurateFilelist; +} + /* clang-format off */ struct CryptoContext { bool pki_sign = false; /**< Enable PKI Signatures? */ diff --git a/core/src/findlib/match.h b/core/src/findlib/match.h index b5a406aa0ec..d519942e137 100644 --- a/core/src/findlib/match.h +++ b/core/src/findlib/match.h @@ -21,6 +21,8 @@ #ifndef BAREOS_FINDLIB_MATCH_H_ #define BAREOS_FINDLIB_MATCH_H_ +struct FindFilesPacket; + void InitIncludeExcludeFiles(FindFilesPacket* ff); void TermIncludeExcludeFiles(FindFilesPacket* ff); void AddFnameToIncludeList(FindFilesPacket* ff, diff --git a/core/src/include/jcr.h b/core/src/include/jcr.h index 83ddfe3fae7..e3a30eb4d31 100644 --- a/core/src/include/jcr.h +++ b/core/src/include/jcr.h @@ -48,11 +48,6 @@ typedef struct s_tree_root TREE_ROOT; class dlist; -namespace filedaemon { -class BareosAccurateFilelist; -struct save_pkt; -} // namespace filedaemon - /** * Backup/Verify level code. These are stored in the DB */ @@ -179,19 +174,12 @@ enum #define endeach_jcr(jcr) JcrWalkEnd(jcr) -#define SD_APPEND 1 -#define SD_READ 0 - -/** - * Forward referenced structures - */ class JobControlRecord; class BareosSocket; class BareosDb; class htable; struct AttributesDbRecord; -struct FindFilesPacket; struct bpContext; #ifdef HAVE_WIN32 struct CopyThreadContext; @@ -232,7 +220,7 @@ class JobControlRecord { int32_t JobType_ = 0; /**< Backup, restore, verify ... */ int32_t JobLevel_ = 0; /**< Job level */ int32_t Protocol_ = 0; /**< Backup Protocol */ - bool my_thread_killable = false; /**< Can we kill the thread? */ + bool my_thread_killable = false; public: JobControlRecord(); ~JobControlRecord(); @@ -291,11 +279,8 @@ class JobControlRecord { void SetKillable(bool killable); /**< in lib/jcr.c */ bool IsKillable() const { return my_thread_killable; } - /* - * Global part of JobControlRecord common to all daemons - */ - dlink link; /**< JobControlRecord chain link */ - pthread_t my_thread_id = 0; /**< Id of thread controlling jcr */ + dlink link; /**< JobControlRecord chain link */ + pthread_t my_thread_id = 0; /**< Id of thread controlling jcr */ BareosSocket* dir_bsock = nullptr; /**< Director bsock or NULL if we are him */ BareosSocket* store_bsock = nullptr; /**< Storage connection socket */ BareosSocket* file_bsock; /**< File daemon connection socket */ diff --git a/core/src/stored/jcr_private.h b/core/src/stored/jcr_private.h index 147e51a7225..6b8c74bd53f 100644 --- a/core/src/stored/jcr_private.h +++ b/core/src/stored/jcr_private.h @@ -26,6 +26,9 @@ #include "stored/read_ctx.h" +#define SD_APPEND 1 +#define SD_READ 0 + namespace storagedaemon { struct VolumeList; class DeviceControlRecord;