maintains an exclusive blocking file-based lock More...

#include <certificate_db.h>

Collaboration diagram for Ssl::Lock:

Public Member Functions

 Lock (std::string const &filename)
 creates an unlocked lock More...
 ~Lock ()
 releases the lock if it is locked More...
void lock ()
 locks the lock, may block More...
void unlock ()
 unlocks locked lock or throws More...
bool locked () const
 whether our lock is locked More...
const char * name () const

Private Attributes

std::string filename
int fd
 Linux file descriptor. More...

Detailed Description

Definition at line 19 of file certificate_db.h.

Constructor & Destructor Documentation

◆ Lock()

Lock::Lock ( std::string const &  filename)

Definition at line 29 of file

◆ ~Lock()

Lock::~Lock ( )

Definition at line 93 of file

References locked(), and unlock().

Member Function Documentation

◆ lock()

void Lock::lock ( )

Definition at line 48 of file

References fd, filename, and NULL.

Referenced by Ssl::Locker::Locker().

◆ locked()

bool Lock::locked ( ) const

Definition at line 39 of file

References fd.

Referenced by Ssl::Locker::Locker(), and ~Lock().

◆ name()

const char* Ssl::Lock::name ( ) const

Definition at line 27 of file certificate_db.h.

◆ unlock()

void Lock::unlock ( )

Definition at line 70 of file

References fd, and filename.

Referenced by ~Lock(), and Ssl::Locker::~Locker().

Member Data Documentation

◆ fd

int Ssl::Lock::fd

Definition at line 33 of file certificate_db.h.

Referenced by lock(), locked(), and unlock().

◆ filename

std::string Ssl::Lock::filename

Definition at line 29 of file certificate_db.h.

Referenced by lock(), and unlock().

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






Web Site Translations