1 /*
2    BAREOS® - Backup Archiving REcovery Open Sourced
3 
4    Copyright (C) 2018-2018 Bareos GmbH & Co. KG
5 
6    This program is Free Software; you can redistribute it and/or
7    modify it under the terms of version three of the GNU Affero General Public
8    License as published by the Free Software Foundation and included
9    in the file LICENSE.
10 
11    This program is distributed in the hope that it will be useful, but
12    WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14    Affero General Public License for more details.
15 
16    You should have received a copy of the GNU Affero General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19    02110-1301, USA.
20 */
21 
22 #ifndef BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_
23 #define BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_
24 
25 struct ndm_job_param;
26 struct ndm_session;
27 class JobControlRecord;
28 
29 namespace directordaemon {
30 
31 void AddToNamelist(struct ndm_job_param* job,
32                    char* filename,
33                    const char* restore_prefix,
34                    char* name,
35                    char* other_name,
36                    uint64_t node,
37                    uint64_t fhinfo);
38 int SetFilesToRestoreNdmpNative(JobControlRecord* jcr,
39                                 struct ndm_job_param* job,
40                                 int32_t FileIndex,
41                                 const char* restore_prefix,
42                                 const char* ndmp_filesystem);
43 int NdmpEnvHandler(void* ctx, int num_fields, char** row);
44 bool ExtractPostRestoreStats(JobControlRecord* jcr, struct ndm_session* sess);
45 void NdmpRestoreCleanup(JobControlRecord* jcr, int TermCode);
46 
47 } /* namespace directordaemon */
48 #endif  // BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_
49