xrootd
XrdCmsAdmin.hh
Go to the documentation of this file.
1 #ifndef __CMSADMIN__
2 #define __CMSADMIN__
3 /******************************************************************************/
4 /* */
5 /* X r d C m s A d m i n . h h */
6 /* */
7 /* (c) 2007 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 // $Id$
14 
15 #include <stdlib.h>
16 #include <sys/uio.h>
17 
18 #include "XrdCms/XrdCmsProtocol.hh"
19 #include "XrdCms/XrdCmsRRData.hh"
20 #include "XrdOuc/XrdOucStream.hh"
21 #include "XrdSys/XrdSysPthread.hh"
22 
23 class XrdNetSocket;
24 
26 {
27 public:
28 
29  void Login(int socknum);
30 
31 static void setSync(XrdSysSemaphore *sync) {SyncUp = sync;}
32 
33  void *Notes(XrdNetSocket *AdminSock);
34 
35 static void Relay(int setSock, int newSock);
36 
37  void Send(const char *Req, XrdCmsRRData &Data);
38 
39  void *Start(XrdNetSocket *AdminSock);
40 
41  XrdCmsAdmin() {Sname = 0; Stype = "Server"; Primary = 0;}
42  ~XrdCmsAdmin() {if (Sname) free(Sname);}
43 
44 private:
45 
46 int do_Login();
47 void do_RmDid(int dotrim=0);
48 void do_RmDud(int dotrim=0);
49 
52 static int POnline;
54  const char *Stype;
55  char *Sname;
56  int Primary;
57 };
58 #endif