![]() |
XRootD
|
#include <XrdOucFileInfo.hh>
Public Member Functions | |
XrdOucFileInfo (const char *lfn=0) | |
~XrdOucFileInfo () | |
Destructor. More... | |
void | AddDigest (const char *hname, const char *hval) |
void | AddFileName (const char *filename) |
void | AddLfn (const char *lfn) |
void | AddProtocol (const char *protname) |
void | AddUrl (const char *url, const char *cntry=0, int prty=0, bool fifo=true) |
const char * | GetDigest (const char *&hval, bool xrdname=true) |
const char * | GetLfn () |
long long | GetSize () |
const char * | GetTargetName () |
const char * | GetUrl (char *cntry=0, int *prty=0) |
bool | HasProtocol (const char *protname) |
void | SetSize (long long fsz) |
Public Attributes | |
XrdOucFileInfo * | nextFile |
Link field to simply miltiple file processing. More... | |
Definition at line 45 of file XrdOucFileInfo.hh.
|
inline |
Constructor
lfn | An optional logical file name associated with this file. |
Definition at line 178 of file XrdOucFileInfo.hh.
XrdOucFileInfo::~XrdOucFileInfo | ( | ) |
Destructor.
Definition at line 88 of file XrdOucFileInfo.cc.
References XrdOucFIHash::next, and XrdOucFIUrl::next.
void XrdOucFileInfo::AddDigest | ( | const char * | hname, |
const char * | hval | ||
) |
Add a digest to the file descriptions.
hname | Poiner to hash name. |
hval | Poiner to hash value. |
Definition at line 114 of file XrdOucFileInfo.cc.
References XrdOucFIHash::hName.
void XrdOucFileInfo::AddFileName | ( | const char * | filename | ) |
Add target filename to the file descriptions.
filename | Poiner to file name. |
Definition at line 166 of file XrdOucFileInfo.cc.
void XrdOucFileInfo::AddLfn | ( | const char * | lfn | ) |
Add logical filename to the file descriptions.
lfn | Poiner to logical file name. |
Definition at line 178 of file XrdOucFileInfo.cc.
void XrdOucFileInfo::AddProtocol | ( | const char * | protname | ) |
Add protocol to the list of available protocols.
protname | Poiner to protocol name ending with a colon |
Definition at line 190 of file XrdOucFileInfo.cc.
Referenced by XrdXmlMetaLink::Convert().
void XrdOucFileInfo::AddUrl | ( | const char * | url, |
const char * | cntry = 0 , |
||
int | prty = 0 , |
||
bool | fifo = true |
||
) |
Add a url to the file descriptions.
url | Poiner to file url. |
cntry | Poiner to the optional 2-char null terminated country code. Upper case country codes are converted to lower case. |
prty | Selection priority. If less than 0 it is set to zero. Urls are placed in increasing prty order (0 is top priority). |
fifo | When true, the location is placed at the end of locations of equal pririoty. Otherwise, is is placed at the head. |
Definition at line 132 of file XrdOucFileInfo.cc.
References XrdOucFIUrl::fCC, XrdOucFIUrl::fPrty, and XrdOucFIUrl::next.
Referenced by XrdXmlMetaLink::Convert().
const char * XrdOucFileInfo::GetDigest | ( | const char *& | hval, |
bool | xrdname = true |
||
) |
Obtain the next digest that can be used to validate the file.
hval | Place to put the pointer to the hash value in ASCII encoded hex, |
xrdname | When true the corresponding name expected by XRootD is returned |
Definition at line 199 of file XrdOucFileInfo.cc.
References XrdOucFIHash::hName, XrdOucFIHash::hValue, and XrdOucFIHash::next.
|
inline |
Obtain the logical file name associated with this file.
Definition at line 119 of file XrdOucFileInfo.hh.
Referenced by XrdXmlMetaLink::Convert().
|
inline |
Get file size.
Definition at line 135 of file XrdOucFileInfo.hh.
|
inline |
Obtain the target file name.
Definition at line 127 of file XrdOucFileInfo.hh.
const char * XrdOucFileInfo::GetUrl | ( | char * | cntry = 0 , |
int * | prty = 0 |
||
) |
Obtain the next url for this file.
cntry | If not nil, the null terminated country code is placed in the buffer which must be atleast three characters in size. |
prty | If not nil, the url's priority is placed in the int pointed to by this parameter. |
Definition at line 221 of file XrdOucFileInfo.cc.
References XrdOucFIUrl::fCC, XrdOucFIUrl::fPrty, XrdOucFIUrl::fUrl, and XrdOucFIUrl::next.
bool XrdOucFileInfo::HasProtocol | ( | const char * | protname | ) |
Check if protocol is in he list of protocols. This does not indicate that an actual url for the protocol was added to this object.
protname | Poiner to protocol name ending with a colon |
Definition at line 250 of file XrdOucFileInfo.cc.
|
inline |
Set file size.
fsz | Supposed size of the file. |
Definition at line 170 of file XrdOucFileInfo.hh.
XrdOucFileInfo* XrdOucFileInfo::nextFile |
Link field to simply miltiple file processing.
Definition at line 195 of file XrdOucFileInfo.hh.
Referenced by XrdXmlMetaLink::Convert(), and XrdXmlMetaLink::ConvertAll().