xrootd
XrdPosixXrootdPath.hh
Go to the documentation of this file.
00001 #ifndef __XRDPOSIXXROOTDPATH_HH__
00002 #define __XRDPOSIXXROOTDPATH_HH__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                 X r d P o s i x X r o o t d P a t h . h h                  */
00006 /*                                                                            */
00007 /* (c) 2011 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 class XrdPosixXrootPath
00014 {
00015 public:
00016 
00017 void  CWD(const char *path);
00018 
00019 char *URL(const char *path, char *buff, int blen);
00020 
00021       XrdPosixXrootPath();
00022      ~XrdPosixXrootPath();
00023 
00024 private:
00025 
00026 struct xpath 
00027        {struct xpath *next;
00028         const  char  *server;
00029                int    servln;
00030         const  char  *path;
00031                int    plen;
00032         const  char  *nath;
00033                int    nlen;
00034 
00035         xpath(struct xpath *cur,
00036               const   char *pServ,
00037               const   char *pPath,
00038               const   char *pNath) : next(cur),
00039                                      server(pServ),
00040                                      servln(strlen(pServ)),
00041                                      path(pPath),
00042                                      plen(strlen(pPath)),
00043                                      nath(pNath),
00044                                      nlen(pNath ? strlen(pNath) : 0) {}
00045        ~xpath() {}
00046        };
00047 
00048 struct xpath *xplist;
00049 char         *pBase;
00050 char         *cwdPath;
00051 int           cwdPlen;
00052 };
00053 #endif