XRootD
XrdClCheckSumManager.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// Copyright (c) 2012-2014 by European Organization for Nuclear Research (CERN)
3
// Author: Lukasz Janyst <ljanyst@cern.ch>
4
//------------------------------------------------------------------------------
5
// This file is part of the XRootD software suite.
6
//
7
// XRootD is free software: you can redistribute it and/or modify
8
// it under the terms of the GNU Lesser General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// XRootD is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
16
//
17
// You should have received a copy of the GNU Lesser General Public License
18
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19
//
20
// In applying this licence, CERN does not waive the privileges and immunities
21
// granted to it by virtue of its status as an Intergovernmental Organization
22
// or submit itself to any jurisdiction.
23
//------------------------------------------------------------------------------
24
25
#ifndef __XRD_CL_CHECK_SUM_MANAGER_HH__
26
#define __XRD_CL_CHECK_SUM_MANAGER_HH__
27
28
#include <map>
29
#include <string>
30
#include "
XrdSys/XrdSysPthread.hh
"
31
#include "
XrdCks/XrdCksData.hh
"
32
33
class
XrdCksLoader
;
34
class
XrdCksCalc
;
35
36
namespace
XrdCl
37
{
38
//----------------------------------------------------------------------------
40
//----------------------------------------------------------------------------
41
class
CheckSumManager
42
{
43
public
:
44
//------------------------------------------------------------------------
46
//------------------------------------------------------------------------
47
CheckSumManager
();
48
49
//------------------------------------------------------------------------
50
// Destructor
51
//------------------------------------------------------------------------
52
virtual
~CheckSumManager
();
53
54
//------------------------------------------------------------------------
60
//------------------------------------------------------------------------
61
XrdCksCalc
*
GetCalculator
(
const
std::string &algName );
62
63
//------------------------------------------------------------------------
65
//------------------------------------------------------------------------
66
bool
Calculate
(
XrdCksData
&result,
67
const
std::string &algName,
68
const
std::string &filePath );
69
70
private
:
71
CheckSumManager
(
const
CheckSumManager
&other);
72
CheckSumManager
&operator = (
const
CheckSumManager
&other);
73
74
typedef
std::map<std::string, XrdCksCalc*> CalcMap;
75
CalcMap pCalculators;
76
XrdCksLoader
*pLoader;
77
XrdSysMutex
pMutex;
78
};
79
}
80
81
#endif
// __XRD_CL_CHECK_SUM_MANAGER_HH__
XrdCksData.hh
XrdSysPthread.hh
XrdCksCalc
Definition:
XrdCksCalc.hh:40
XrdCksData
Definition:
XrdCksData.hh:38
XrdCksLoader
Definition:
XrdCksLoader.hh:43
XrdCl::CheckSumManager
Manage the checksum calc objects.
Definition:
XrdClCheckSumManager.hh:42
XrdCl::CheckSumManager::GetCalculator
XrdCksCalc * GetCalculator(const std::string &algName)
Definition:
XrdClCheckSumManager.cc:70
XrdCl::CheckSumManager::~CheckSumManager
virtual ~CheckSumManager()
Definition:
XrdClCheckSumManager.cc:59
XrdCl::CheckSumManager::CheckSumManager
CheckSumManager()
Constructor.
Definition:
XrdClCheckSumManager.cc:47
XrdCl::CheckSumManager::Calculate
bool Calculate(XrdCksData &result, const std::string &algName, const std::string &filePath)
Calculate a checksum of for a given file.
Definition:
XrdClCheckSumManager.cc:100
XrdSysMutex
Definition:
XrdSysPthread.hh:165
XrdCl
Definition:
XrdClAction.hh:34
XrdCl
XrdClCheckSumManager.hh
Generated by
1.9.1