XRootD
XrdPssUtils Class Reference

#include <XrdPssUtils.hh>

+ Collaboration diagram for XrdPssUtils:

Public Member Functions

 XrdPssUtils ()
 
 ~XrdPssUtils ()
 

Static Public Member Functions

static const char * getDomain (const char *hName)
 
static bool is4Xrootd (const char *pname)
 
static const char * valProt (const char *pname, int &plen, int adj=0)
 
static bool Vectorize (char *str, std::vector< char * > &vec, char sep)
 

Detailed Description

Definition at line 35 of file XrdPssUtils.hh.

Constructor & Destructor Documentation

◆ XrdPssUtils()

XrdPssUtils::XrdPssUtils ( )
inline

Definition at line 58 of file XrdPssUtils.hh.

58 {}

◆ ~XrdPssUtils()

XrdPssUtils::~XrdPssUtils ( )
inline

Definition at line 59 of file XrdPssUtils.hh.

59 {}

Member Function Documentation

◆ getDomain()

const char * XrdPssUtils::getDomain ( const char *  hName)
static

Definition at line 56 of file XrdPssUtils.cc.

57 {
58  const char *dot = index(hName, '.');
59 
60  if (dot) return dot+1;
61  return hName;
62 }

◆ is4Xrootd()

bool XrdPssUtils::is4Xrootd ( const char *  pname)
static

Definition at line 68 of file XrdPssUtils.cc.

69 {
70 // Find out of protocol is for xroot protocol
71 //
72  if (*pname == 'x' || *pname == 'r')
73  for (int i = xrBeg; i < pTNum; i++)
74  if (!strncmp(pname, pTab[i].pname, pTab[i].pnlen)) return true;
75  return false;
76 }

Referenced by XrdPssUrlInfo::addCGI().

+ Here is the caller graph for this function:

◆ valProt()

const char * XrdPssUtils::valProt ( const char *  pname,
int &  plen,
int  adj = 0 
)
static

Definition at line 82 of file XrdPssUtils.cc.

83 {
84  int i;
85 
86 // Find a match
87 //
88  for (i = 0; i < pTNum; i++)
89  {if (!strncmp(pname, pTab[i].pname, pTab[i].pnlen-adj)) break;}
90  if (i >= pTNum) return 0;
91  plen = pTab[i].pnlen-adj;
92  return pTab[i].pname;
93 }

Referenced by XrdPssSys::P2OUT().

+ Here is the caller graph for this function:

◆ Vectorize()

bool XrdPssUtils::Vectorize ( char *  str,
std::vector< char * > &  vec,
char  sep 
)
static

Definition at line 99 of file XrdPssUtils.cc.

100 {
101  char *seppos;
102 
103 // Get each element and place it in the vecor. Null elements are not allowed.
104 //
105  do {seppos = index(str, sep);
106  if (seppos)
107  {if (!(*(seppos+1))) return false;
108  *seppos = '\0';
109  }
110  if (!strlen(str)) return false;
111  vec.push_back(str);
112  str = seppos+1;
113  } while(seppos && *str);
114  return true;
115 }

The documentation for this class was generated from the following files: