xrootd
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdOucN2N Class Reference
Inheritance diagram for XrdOucN2N:
Inheritance graph
[legend]
Collaboration diagram for XrdOucN2N:
Collaboration graph
[legend]

Public Member Functions

virtual int lfn2pfn (const char *lfn, char *buff, int blen)
 
virtual int lfn2rfn (const char *lfn, char *buff, int blen)
 
virtual int pfn2lfn (const char *lfn, char *buff, int blen)
 
 XrdOucN2N (XrdSysError *erp, const char *lpfx, const char *rpfx)
 
- Public Member Functions inherited from XrdOucName2Name
 XrdOucName2Name ()
 Constructor. More...
 
virtual ~XrdOucName2Name ()
 Destructor. More...
 

Private Member Functions

int concat_fn (const char *prefix, int pfxlen, const char *path, char *buffer, int blen)
 

Private Attributes

XrdSysErroreDest
 
char * LocalRoot
 
int LocalRootLen
 
char * RemotRoot
 
int RemotRootLen
 

Constructor & Destructor Documentation

XrdOucN2N::XrdOucN2N ( XrdSysError erp,
const char *  lpfx,
const char *  rpfx 
)

Member Function Documentation

int XrdOucN2N::concat_fn ( const char *  prefix,
int  pfxlen,
const char *  path,
char *  buffer,
int  blen 
)
private

Referenced by lfn2pfn(), and lfn2rfn().

int XrdOucN2N::lfn2pfn ( const char *  lfn,
char *  buff,
int  blen 
)
virtual

Map a logical file name to a physical file name.

Parameters
lfn-> Logical file name.
buff-> Buffer where the physical file name of an existing file is to be placed. It must end with a null byte.
blenThe length of the buffer.
Returns
Success: Zero. Failure: An errno number describing the failure; typically EINVAL - The supplied lfn is invalid. ENAMETOOLONG - The buffer is too small for the pfn.

Implements XrdOucName2Name.

References concat_fn(), eDest, XrdSysError::Emsg(), LocalRoot, and LocalRootLen.

int XrdOucN2N::lfn2rfn ( const char *  lfn,
char *  buff,
int  blen 
)
virtual

Map a logical file name to the name the file would have in a remote storage system (e.g. Mass Storage System at a remote location).

Parameters
lfn-> Logical file name.
buff-> Buffer where the remote file name is to be placed. It need not actually exist in that location but could be created there with that name. It must end with a null byte.
blenThe length of the buffer.
Returns
Success: Zero. Failure: An errno number describing the failure; typically EINVAL - The supplied lfn is invalid. ENAMETOOLONG - The buffer is too small for the pfn.

Implements XrdOucName2Name.

References concat_fn(), eDest, XrdSysError::Emsg(), RemotRoot, and RemotRootLen.

int XrdOucN2N::pfn2lfn ( const char *  pfn,
char *  buff,
int  blen 
)
virtual

Map a physical file name to it's logical file name.

Parameters
pfn-> Physical file name. This is always a valid name of either an existing file or a file that could been created.
buff-> Buffer where the logical file name is to be placed. It need not actually exist but could be created with that name. It must end with a null byte.
blenThe length of the buffer.
Returns
Success: Zero. Failure: An errno number describing the failure; typically EINVAL - The supplied lfn is invalid. ENAMETOOLONG - The buffer is too small for the pfn.

Implements XrdOucName2Name.

References LocalRoot, LocalRootLen, and strlcpy().

Member Data Documentation

XrdSysError* XrdOucN2N::eDest
private

Referenced by lfn2pfn(), lfn2rfn(), and XrdOucN2N().

char* XrdOucN2N::LocalRoot
private

Referenced by lfn2pfn(), pfn2lfn(), and XrdOucN2N().

int XrdOucN2N::LocalRootLen
private

Referenced by lfn2pfn(), pfn2lfn(), and XrdOucN2N().

char* XrdOucN2N::RemotRoot
private

Referenced by lfn2rfn(), and XrdOucN2N().

int XrdOucN2N::RemotRootLen
private

Referenced by lfn2rfn(), and XrdOucN2N().


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