XrdCmsClient.hh

Go to the documentation of this file.
00001 #ifndef __CMS_CLIENT__
00002 #define __CMS_CLIENT__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                       X r d C m s C l i e n t . 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: XrdCmsClient.hh 28902 2009-06-11 12:36:21Z ganis $
00014 
00015 class  XrdOucEnv;
00016 class  XrdOucErrInfo;
00017 class  XrdOucLogger;
00018 struct XrdSfsPrep;
00019 
00020 // The following return conventions are use by Forward(), Locate(), & Prepare()
00021 //
00022 // Return Val   Resp.errcode          Resp.errtext
00023 // ---------    -------------------   --------
00024 // -EREMOTE     port (0 for default)  Host name
00025 // -EINPROGRESS n/a                   n/a
00026 // -EEXIST      Length of errtext     Data to be returned to client as response
00027 // > 0          Wait time (= retval)  Reason for wait
00028 // < 0          Error number          Error message
00029 // = 0          Not applicable        Not applicable (see below)
00030 //                                    Forward() -> Request forwarded
00031 //                                    Locate()  -> Redirection does not apply
00032 //                                    Prepare() -> Request submitted
00033 //
00034 
00035 class XrdCmsClient
00036 {
00037 public:
00038 virtual void   Added(const char *path, int Pend=0) = 0;
00039 
00040 virtual int    Configure(char *cfn) = 0;
00041 
00042 virtual int    Forward(XrdOucErrInfo &Resp,   const char *cmd,
00043                        const char    *arg1=0, const char *arg2=0,
00044                        const char    *arg3=0, const char *arg4=0) = 0;
00045 
00046 virtual int    isRemote() {return myPersona == XrdCmsClient::amRemote;}
00047 
00048 virtual int    Locate(XrdOucErrInfo &Resp, const char *path, int flags,
00049                       XrdOucEnv  *Info=0) = 0;
00050 
00051 virtual int    Prepare(XrdOucErrInfo &Resp, XrdSfsPrep &pargs) = 0;
00052 
00053 virtual void   Removed(const char *path) = 0;
00054 
00055 virtual int    Space(XrdOucErrInfo &Resp, const char *path) = 0;
00056 
00057         enum   Persona {amLocal, amProxy, amRemote, amTarget};
00058 
00059                XrdCmsClient(Persona acting) {myPersona = acting;}
00060 virtual       ~XrdCmsClient() {}
00061 
00062 protected:
00063 
00064 Persona        myPersona;
00065 };
00066 #endif

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