xrootd
XrdClientAbsMonIntf.hh
Go to the documentation of this file.
1 #ifndef __XRDCLIABSMONINTF_H__
2 #define __XRDCLIABSMONINTF_H__
3 /******************************************************************************/
4 /* */
5 /* X r d C l i e n t A b s M o n I n t f . h h */
6 /* */
7 /* This file is part of the XRootD software suite. */
8 /* */
9 /* XRootD is free software: you can redistribute it and/or modify it under */
10 /* the terms of the GNU Lesser General Public License as published by the */
11 /* Free Software Foundation, either version 3 of the License, or (at your */
12 /* option) any later version. */
13 /* */
14 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
15 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
16 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
17 /* License for more details. */
18 /* */
19 /* You should have received a copy of the GNU Lesser General Public License */
20 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
21 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
22 /* */
23 /* The copyright holder's institutional names and contributor's names may not */
24 /* be used to endorse or promote products derived from this software without */
25 /* specific prior written permission of the institution or contributor. */
26 /******************************************************************************/
27 
28 // XrdClientAbsMonIntf
29 // Public interface to generic monitoring systems
30 //
31 
33 public:
34 
35 
36  // Initialization of the external library
37  virtual int Init(const char *src, const char *dest, int debug=0, void *parm=0) = 0;
38  virtual int DeInit() = 0;
39 
40  // To get the name of the library and other info
41  virtual int GetMonLibInfo(char **name, char **version, char **remarks) = 0;
42 
43 
44  // To submit a set of info about the progress of something
45  // Set force to true to be sure that the info is sent and not eventually skipped
46  virtual int PutProgressInfo(long long bytecount=0,
47  long long size=0,
48  float percentage=0.0,
49  bool force=false) = 0;
50 
51 
53  virtual ~XrdClientAbsMonIntf() {};
54 };
55 
56 
57 
58 
59 /******************************************************************************/
60 /* X r d C l i e n t A b s M o n I n t f . h h */
61 /******************************************************************************/
62 
63 // The XrdClientMonIntf() function is called when the shared library containing
64 // implementation of this class is loaded. It must exist in the library as an
65 // 'extern "C"' defined function.
66 
67 
68 #define XrdClientMonIntfArgs const char *src, const char *dst
69 
70 extern "C" {
71  typedef XrdClientAbsMonIntf *(*XrdClientMonIntfHook)(XrdClientMonIntfArgs);
73 }
74 #endif
virtual ~XrdClientAbsMonIntf()
Definition: XrdClientAbsMonIntf.hh:53
XrdClientAbsMonIntf()
Definition: XrdClientAbsMonIntf.hh:52
#define XrdClientMonIntfArgs
Definition: XrdClientAbsMonIntf.hh:68
Definition: XrdClientAbsMonIntf.hh:32
virtual int PutProgressInfo(long long bytecount=0, long long size=0, float percentage=0.0, bool force=false)=0
virtual int GetMonLibInfo(char **name, char **version, char **remarks)=0
virtual int Init(const char *src, const char *dest, int debug=0, void *parm=0)=0
XrdClientAbsMonIntf * XrdClientgetMonIntf(XrdClientMonIntfArgs)
virtual int DeInit()=0