XrdCmsAdmin.hh

Go to the documentation of this file.
00001 #ifndef __CMSADMIN__
00002 #define __CMSADMIN__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                        X r d C m s A d m i n . h h                         */
00006 /*                                                                            */
00007 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012   
00013 //         $Id: XrdCmsAdmin.hh 24468 2008-06-22 16:47:03Z ganis $
00014 
00015 #include <stdlib.h>
00016 #include <sys/uio.h>
00017 
00018 #include "XrdCms/XrdCmsProtocol.hh"
00019 #include "XrdCms/XrdCmsRRData.hh"
00020 #include "XrdOuc/XrdOucStream.hh"
00021 #include "XrdSys/XrdSysPthread.hh"
00022 
00023 class XrdNetSocket;
00024 
00025 class XrdCmsAdmin
00026 {
00027 public:
00028 
00029        void  Login(int socknum);
00030 
00031 static void  setSync(XrdSysSemaphore  *sync)  {SyncUp = sync;}
00032 
00033        void *Notes(XrdNetSocket *AdminSock);
00034 
00035 static void  Relay(int setSock, int newSock);
00036 
00037        void  Send(const char *Req, XrdCmsRRData &Data);
00038 
00039        void *Start(XrdNetSocket *AdminSock);
00040 
00041       XrdCmsAdmin() {Sname = 0; Stype = "Server"; Primary = 0;}
00042      ~XrdCmsAdmin() {if (Sname) free(Sname);}
00043 
00044 private:
00045 
00046 int   do_Login();
00047 void  do_RmDid(int dotrim=0);
00048 void  do_RmDud(int dotrim=0);
00049 
00050 static XrdSysMutex      myMutex;
00051 static XrdSysSemaphore *SyncUp;
00052 static int              POnline;
00053        XrdOucStream     Stream;
00054        const char      *Stype;
00055        char            *Sname;
00056        int              Primary;
00057 };
00058 #endif

Generated on Tue Jul 5 14:46:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1