XRootD
XrdClThirdPartyCopyPlugIn.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2026 by European Organization for Nuclear Research (CERN)
3 //------------------------------------------------------------------------------
4 // This file is part of the XRootD software suite.
5 //
6 // XRootD is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU Lesser General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // XRootD is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
18 //
19 // In applying this licence, CERN does not waive the privileges and immunities
20 // granted to it by virtue of its status as an Intergovernmental Organization
21 // or submit itself to any jurisdiction.
22 //------------------------------------------------------------------------------
23 
24 #ifndef __XRD_CL_THIRD_PARTY_COPY_PLUG_IN_HH__
25 #define __XRD_CL_THIRD_PARTY_COPY_PLUG_IN_HH__
26 
28 #include "XrdOuc/XrdOucCompiler.hh"
29 
30 #include <cstddef>
31 #include <ctime>
32 #include <string>
33 
34 namespace XrdCl
35 {
36  class PropertyList;
37  class URL;
38 
39  //----------------------------------------------------------------------------
41  //----------------------------------------------------------------------------
43  {
44  public:
45  virtual ~ProgressHandler();
46 
47  //------------------------------------------------------------------------
53  //------------------------------------------------------------------------
54  virtual void HandleProgress( std::size_t processed,
55  std::size_t total = 0 ) = 0;
56  };
57 
58  //----------------------------------------------------------------------------
63  //----------------------------------------------------------------------------
65  {
66  public:
68 
69  //------------------------------------------------------------------------
82  //------------------------------------------------------------------------
83  virtual XRootDStatus ThirdPartyCopy( const std::string &source,
84  const std::string &dest,
85  const PropertyList *properties,
86  ProgressHandler *progress_handler,
87  time_t timeout ) = 0;
88  };
89 
90  //----------------------------------------------------------------------------
98  //----------------------------------------------------------------------------
99  XRootDStatus ThirdPartyCopy( const URL &source,
100  const URL &dest,
101  const PropertyList *properties,
102  ProgressHandler *progress_handler,
103  time_t timeout = 0 )
105 }
106 
107 #endif // __XRD_CL_THIRD_PARTY_COPY_PLUG_IN_HH__
#define XRD_WARN_UNUSED_RESULT
Handle the progress of an asynchronous operation.
virtual void HandleProgress(std::size_t processed, std::size_t total=0)=0
A key-value pair map storing both keys and values as strings.
virtual XRootDStatus ThirdPartyCopy(const std::string &source, const std::string &dest, const PropertyList *properties, ProgressHandler *progress_handler, time_t timeout)=0
URL representation.
Definition: XrdClURL.hh:31
XRootDStatus ThirdPartyCopy(const URL &source, const URL &dest, const PropertyList *properties, ProgressHandler *progress_handler, time_t timeout)