Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tls: moved class TlsResource to tls_conf.cc/.h
- Loading branch information
Showing
6 changed files
with
142 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
BAREOS® - Backup Archiving REcovery Open Sourced | ||
Copyright (C) 2000-2010 Free Software Foundation Europe e.V. | ||
Copyright (C) 2011-2012 Planets Communications B.V. | ||
Copyright (C) 2013-2018 Bareos GmbH & Co. KG | ||
This program is Free Software; you can redistribute it and/or | ||
modify it under the terms of version three of the GNU Affero General Public | ||
License as published by the Free Software Foundation and included | ||
in the file LICENSE. | ||
This program is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
02110-1301, USA. | ||
*/ | ||
|
||
#ifndef BAREOS_LIB_BAREOS_RESOURCE_H_ | ||
#define BAREOS_LIB_BAREOS_RESOURCE_H_ | ||
|
||
#include "lib/common_resource_header.h" | ||
|
||
class PoolMem; | ||
class ConfigurationParser; | ||
|
||
/* | ||
* Base Class for all Resource Classes | ||
*/ | ||
class BareosResource { | ||
public: | ||
CommonResourceHeader hdr; | ||
|
||
/* Methods */ | ||
inline char *name() const { return this->hdr.name; } | ||
bool PrintConfig(PoolMem &buf, | ||
const ConfigurationParser &my_config, | ||
bool hide_sensitive_data = false, | ||
bool verbose = false); | ||
/* | ||
* validate can be defined by inherited classes, | ||
* when special rules for this resource type must be checked. | ||
*/ | ||
// virtual inline bool validate() { return true; }; | ||
}; | ||
|
||
#endif /* BAREOS_LIB_BAREOS_RESOURCE_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
BAREOS® - Backup Archiving REcovery Open Sourced | ||
Copyright (C) 2000-2010 Free Software Foundation Europe e.V. | ||
Copyright (C) 2011-2012 Planets Communications B.V. | ||
Copyright (C) 2013-2018 Bareos GmbH & Co. KG | ||
This program is Free Software; you can redistribute it and/or | ||
modify it under the terms of version three of the GNU Affero General Public | ||
License as published by the Free Software Foundation and included | ||
in the file LICENSE. | ||
This program is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
02110-1301, USA. | ||
*/ | ||
|
||
#ifndef BAREOS_LIB_COMMON_RESOURCE_HEADER_ | ||
#define BAREOS_LIB_COMMON_RESOURCE_HEADER_ | ||
|
||
#define MAX_RES_ITEMS 90 /* maximum resource items per CommonResourceHeader */ | ||
|
||
/* | ||
* This is the universal header that is at the beginning of every resource record. | ||
*/ | ||
class CommonResourceHeader { | ||
public: | ||
CommonResourceHeader *next; /* Pointer to next resource of this type */ | ||
char *name; /* Resource name */ | ||
char *desc; /* Resource description */ | ||
uint32_t rcode; /* Resource id or type */ | ||
int32_t refcnt; /* Reference count for releasing */ | ||
char item_present[MAX_RES_ITEMS]; /* Set if item is present in conf file */ | ||
char inherit_content[MAX_RES_ITEMS]; /* Set if item has inherited content */ | ||
}; | ||
|
||
#endif /* BAREOS_LIB_COMMON_RESOURCE_HEADER_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters