Loading...
Searching...
No Matches
XrdSutPFEntry Class Reference

`#include <XrdSutPFEntry.hh>`

Collaboration diagram for XrdSutPFEntry:

## Public Member Functions

| XrdSutPFEntry (const char *n=0, short st=0, short cn=0, kXR_int32 mt=0)
| XrdSutPFEntry (const XrdSutPFEntry &e)
virtual | ~XrdSutPFEntry ()
char * | AsString () const
kXR_int32 | Length () const
XrdSutPFEntry & | operator= (const XrdSutPFEntry &pfe)
void | Reset ()
void | SetName (const char *n=0)

## Public Attributes

XrdSutPFBuf | buf1
XrdSutPFBuf | buf2
XrdSutPFBuf | buf3
XrdSutPFBuf | buf4
short | cnt
kXR_int32 | mtime
char * | name
XrdSysMutex | pfeMutex
short | status

## Detailed Description

Definition at line 78 of file XrdSutPFEntry.hh.

## Constructor & Destructor Documentation

## XrdSutPFEntry() [1/2]

XrdSutPFEntry::XrdSutPFEntry | ( | const char * | n = 0,
|  | short | st = 0,
|  | short | cn = 0,
|  | kXR_int32 | mt = 0 )

Definition at line 85 of file XrdSutPFEntry.cc.

{
// Constructor
name = 0;
status = st;
cnt = cn;
mtime = (mt > 0) ? mt : (kXR_int32)time(0);
if (n) {
name = new char[strlen(n)+1];
if (name)
strcpy(name,n);
}
}
kXR_int32
int kXR_int32
Definition XPtypes.hh:89
XrdSutPFEntry::mtime
kXR_int32 mtime
Definition XrdSutPFEntry.hh:83
XrdSutPFEntry::status
short status
Definition XrdSutPFEntry.hh:81
XrdSutPFEntry::cnt
short cnt
Definition XrdSutPFEntry.hh:82
XrdSutPFEntry::name
char * name
Definition XrdSutPFEntry.hh:80

References cnt, mtime, name, and status.

Referenced by XrdSutPFEntry(), and operator=().

Here is the caller graph for this function:

## XrdSutPFEntry() [2/2]

XrdSutPFEntry::XrdSutPFEntry | ( | const XrdSutPFEntry & | e | ) |

Definition at line 102 of file XrdSutPFEntry.cc.

: buf1(e.buf1),
buf2(e.buf2), buf3(e.buf3), buf4(e.buf4)
{
// Copy constructor
name = 0;
status = e.status;
cnt = e.cnt;
mtime = e.mtime;
if (e.name) {
name = new char[strlen(e.name)+1];
if (name)
strcpy(name,e.name);
}
}
XrdSutPFEntry::buf3
XrdSutPFBuf buf3
Definition XrdSutPFEntry.hh:86
XrdSutPFEntry::buf1
XrdSutPFBuf buf1
Definition XrdSutPFEntry.hh:84
XrdSutPFEntry::buf2
XrdSutPFBuf buf2
Definition XrdSutPFEntry.hh:85
XrdSutPFEntry::buf4
XrdSutPFBuf buf4
Definition XrdSutPFEntry.hh:87

References XrdSutPFEntry(), buf1, buf2, buf3, buf4, cnt, mtime, name, and status.

Here is the call graph for this function:

## ~XrdSutPFEntry()

virtual XrdSutPFEntry::~XrdSutPFEntry | ( |  | ) |

inline virtual

Definition at line 92 of file XrdSutPFEntry.hh.

{ if (name) delete[] name; }

References name.

## Member Function Documentation

## AsString()

char * XrdSutPFEntry::AsString | ( |  | ) | const

Definition at line 152 of file XrdSutPFEntry.cc.

{
// Return a string with serialized information
// For print purposes
// The output string points to a static buffer, so it must
// not be deleted by the caller
static char pbuf[2048];
char smt[20] = {0};
XrdSutTimeString(mtime,smt);
sprintf(pbuf,"st:%d cn:%d buf:%d,%d,%d,%d modified:%s name:%s",
status,cnt,buf1.len,buf2.len,buf3.len,buf4.len,smt,name);
return pbuf;
}
XrdSutTimeString
int XrdSutTimeString(int t, char *st, int opt)
Definition XrdSutAux.cc:305

References buf1, buf2, buf3, buf4, cnt, mtime, name, status, and XrdSutTimeString().

Referenced by GetEntry(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

## Length()

kXR_int32 XrdSutPFEntry::Length | ( |  | ) | const

inline

Definition at line 93 of file XrdSutPFEntry.hh.

{ return (buf1.len + buf2.len + 2*sizeof(short) +
buf3.len + buf4.len + 5*sizeof(kXR_int32)); }

References buf1, buf2, buf3, and buf4.

Referenced by XrdSutPFile::WriteEntry().

Here is the caller graph for this function:

## operator=()

XrdSutPFEntry & XrdSutPFEntry::operator= | ( | const XrdSutPFEntry & | pfe | ) |

Definition at line 170 of file XrdSutPFEntry.cc.

{
// Assign entry e to local entry.
SetName(name);
status = e.status;
cnt = e.cnt; // counter
mtime = e.mtime; // time of last modification / creation
buf1.SetBuf(e.buf1.buf);
buf2.SetBuf(e.buf2.buf);
buf3.SetBuf(e.buf3.buf);
buf4.SetBuf(e.buf4.buf);
return (*this);
}
XrdSutPFEntry::SetName
void SetName(const char *n=0)
Definition XrdSutPFEntry.cc:136

References XrdSutPFEntry(), XrdSutPFBuf::buf, buf1, buf2, buf3, buf4, cnt, mtime, name, SetName(), and status.

Here is the call graph for this function:

## Reset()

void XrdSutPFEntry::Reset | ( |  | ) |

Definition at line 119 of file XrdSutPFEntry.cc.

{
// Resetting entry
if (name)
delete[] name;
name = 0;
status = 0;
cnt = 0;
mtime = (kXR_int32)time(0);
buf1.SetBuf();
buf2.SetBuf();
buf3.SetBuf();
buf4.SetBuf();
}

References buf1, buf2, buf3, buf4, cnt, mtime, name, and status.

Referenced by main(), and XrdSutPFile::ReadEntry().

Here is the caller graph for this function:

## SetName()

void XrdSutPFEntry::SetName | ( | const char * | n = 0 | ) |

Definition at line 136 of file XrdSutPFEntry.cc.

{
// Set the name
if (name) {
delete[] name;
name = 0;
}
if (n) {
name = new char[strlen(n)+1];
if (name)
strcpy(name,n);
}
}

References name.

Referenced by GetEntry(), XrdSutPFCache::Load(), main(), operator=(), XrdSutPFile::ReadEntry(), and XrdSutPFile::ReadEntry().

Here is the caller graph for this function:

## Member Data Documentation

## buf1

XrdSutPFBuf XrdSutPFEntry::buf1

Definition at line 84 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), AddPassword(), AddPassword(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), XrdSecProtocolpwd::Init(), Length(), main(), operator=(), and Reset().

## buf2

XrdSutPFBuf XrdSutPFEntry::buf2

Definition at line 85 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), AddPassword(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), Length(), main(), operator=(), and Reset().

## buf3

XrdSutPFBuf XrdSutPFEntry::buf3

Definition at line 86 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), Length(), main(), operator=(), and Reset().

## buf4

XrdSutPFBuf XrdSutPFEntry::buf4

Definition at line 87 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), Length(), main(), operator=(), and Reset().

## cnt

short XrdSutPFEntry::cnt

Definition at line 82 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), XrdSutPFEntry(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), GetEntry(), main(), operator=(), Reset(), and XrdSutPFile::UpdateCount().

## mtime

kXR_int32 XrdSutPFEntry::mtime

Definition at line 83 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), XrdSutPFEntry(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), XrdSutPFCache::Flush(), main(), operator=(), Reset(), and XrdSutPFile::UpdateCount().

## name

char* XrdSutPFEntry::name

Definition at line 80 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), XrdSutPFEntry(), ~XrdSutPFEntry(), AsString(), XrdSutPFCache::Dump(), main(), operator=(), Reset(), SetName(), and XrdSutPFile::WriteEntry().

## pfeMutex

XrdSysMutex XrdSutPFEntry::pfeMutex

Definition at line 88 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFCache::Get().

## status

short XrdSutPFEntry::status

Definition at line 81 of file XrdSutPFEntry.hh.

Referenced by XrdSutPFEntry(), XrdSutPFEntry(), AsString(), XrdSutPFile::Browse(), XrdSutPFCache::Dump(), main(), operator=(), Reset(), and XrdSutPFile::SearchSpecialEntries().

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

- XrdSutPFEntry.hh
- XrdSutPFEntry.cc