xrootd
XrdXrootdCallBack.hh
Go to the documentation of this file.
1 #ifndef __XRDXROOTDCALLBACK_H__
2 #define __XRDXROOTDCALLBACK_H__
3 /******************************************************************************/
4 /* */
5 /* X r d X r o o t d C a l l B a c k . h h */
6 /* */
7 /* (c) 2006 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 #include "XrdOuc/XrdOucErrInfo.hh"
14 #include "XrdSys/XrdSysPthread.hh"
15 
16 class XrdScheduler;
17 class XrdOurError;
18 class XrdXrootdStats;
19 
21 {
22 public:
23 
24  void Done(int &Result, //I/O: Function result
25  XrdOucErrInfo *eInfo, // In: Error information
26  const char *Path=0); // In: Path related to call
27 
28  const char *Func() {return Opname;}
29 
30  const char Oper() {return Opcode;}
31 
32  int Same(unsigned long long arg1, unsigned long long arg2);
33 
34  void sendError(int rc, XrdOucErrInfo *eInfo, const char *Path);
35 
36  void sendResp(XrdOucErrInfo *eInfo,
37  XResponseType xrt, int *Data=0,
38  const char *Msg=0, int ovhd=0);
39 
40 static void setVals(XrdSysError *erp,
41  XrdXrootdStats *SIp,
42  XrdScheduler *schp,
43  int port)
44  {eDest=erp; SI=SIp; Sched=schp; Port=port;}
45 
46  XrdXrootdCallBack(const char *opn, const char opc)
47  : Opname(opn), Opcode(opc) {}
48 
50 private:
54  const char *Opname;
55  const char Opcode;
56 static int Port;
57 };
58 #endif