xrootd
XrdCmsRRData.hh
Go to the documentation of this file.
00001 #ifndef __XRDCMSRRDATA_H__
00002 #define __XRDCMSRRDATA_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                       X r d C m s R R D a t a . 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 /* This file is part of the XRootD software suite.                            */
00013 /*                                                                            */
00014 /* XRootD is free software: you can redistribute it and/or modify it under    */
00015 /* the terms of the GNU Lesser General Public License as published by the     */
00016 /* Free Software Foundation, either version 3 of the License, or (at your     */
00017 /* option) any later version.                                                 */
00018 /*                                                                            */
00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
00021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
00022 /* License for more details.                                                  */
00023 /*                                                                            */
00024 /* You should have received a copy of the GNU Lesser General Public License   */
00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
00026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
00027 /*                                                                            */
00028 /* The copyright holder's institutional names and contributor's names may not */
00029 /* be used to endorse or promote products derived from this software without  */
00030 /* specific prior written permission of the institution or contributor.       */
00031 /******************************************************************************/
00032 
00033 #include <stdlib.h>
00034 
00035 #include "XProtocol/YProtocol.hh"
00036 
00037 class XrdCmsRLData
00038 {
00039 public:
00040 
00041        char          *theAuth;
00042        char          *theSID;
00043        char          *thePaths;
00044        int            totLen;
00045 
00046 //     XrdCmsRLData() {}  Lack of constructor makes this a POD type
00047 //    ~XrdCmsRLData() {}  Lack of destructor  makes this a POD type
00048 };
00049 
00050 
00051 class XrdCmsRRData
00052 {
00053 public:
00054 XrdCms::CmsRRHdr       Request;     // all
00055         char          *Path;        // all -prepcan
00056         char          *Opaque;      // all -prepcan
00057         char          *Path2;       // mv
00058         char          *Opaque2;     // mv
00059         char          *Avoid;       // locate, select
00060         char          *Reqid;       // prepadd, prepcan
00061         char          *Notify;      // prepadd
00062         char          *Prty;        // prepadd
00063         char          *Mode;        // chmod, mkdir, mkpath, prepadd
00064         char          *Ident;       // all
00065         unsigned int   Opts;        // locate, select
00066                  int   PathLen;     // locate, prepadd, select (inc null byte)
00067         unsigned int   dskFree;     // avail, load
00068 union  {unsigned int   dskUtil;     // avail
00069                  int   waitVal;
00070        };
00071         char          *Buff;        // Buffer underlying the pointers
00072         int            Blen;        // Length of buffer
00073         int            Dlen;        // Length of data in the buffer
00074         int            Routing;     // Routing options
00075 
00076 enum ArgName
00077 {    Arg_Null=0,   Arg_AToken,    Arg_Avoid,     Arg_Datlen,
00078      Arg_Ident,    Arg_Info,      Arg_Mode,      Arg_Notify,
00079      Arg_Opaque2,  Arg_Opaque,    Arg_Opts,      Arg_Path,
00080      Arg_Path2,    Arg_Port,      Arg_Prty,      Arg_Reqid,
00081      Arg_dskFree,  Arg_dskUtil,   Arg_theLoad,   Arg_SID,
00082      Arg_dskTot,   Arg_dskMinf,
00083 
00084      Arg_Count     // Always the last item which equals the number of elements
00085 };
00086 
00087 static XrdCmsRRData *Objectify(XrdCmsRRData *op=0);
00088 
00089        int           getBuff(size_t bsz);
00090 
00091 //      XrdCmsRRData() {}  Lack of constructor makes this a POD type
00092 //     ~XrdCmsRRData() {}  Lack of destructor  makes this a POD type
00093 
00094 XrdCmsRRData *Next;   // POD types canot have private members so virtual private
00095 };
00096 #endif