Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

WvLockFile Class Reference

#include <wvlockfile.h>

List of all members.

Public Methods

 WvLockFile (WvString _devicename)
 ~WvLockFile ()
bool lock ()
void unlock ()
bool islocked () const
 WvLockFile (WvString _devicename)
 ~WvLockFile ()
bool lock ()
void unlock ()
bool islocked () const

Private Attributes

WvString devicename
WvString filename
int lock_count


Detailed Description

Class to handle Lock files - usefull for WvDial, and other places where we need to guarantee exclusive access to a file or device. Creates/Removes lockfiles in /var/lock

Definition at line 17 of file include/wvlockfile.h.


Constructor & Destructor Documentation

WvLockFile::WvLockFile WvString    _devicename
 

Definition at line 17 of file wvlockfile.cc.

References devicename, filename, and lock_count.

WvLockFile::~WvLockFile  
 

Definition at line 31 of file wvlockfile.cc.

References lock_count, and unlock.

WvLockFile::WvLockFile WvString    _devicename
 

WvLockFile::~WvLockFile  
 


Member Function Documentation

bool WvLockFile::islocked   const [inline]
 

Definition at line 27 of file streams/wvlockfile.h.

References lock_count.

bool WvLockFile::islocked   const [inline]
 

Definition at line 27 of file include/wvlockfile.h.

References lock_count.

bool WvLockFile::lock  
 

bool WvLockFile::lock  
 

Definition at line 79 of file wvlockfile.cc.

References WvStream::close, filename, WvStream::getline, WvStream::isok, lock_count, WvFile::open, WvStream::print, and trim_string.

Referenced by WvModem::WvModem.

void WvLockFile::unlock  
 

void WvLockFile::unlock  
 

Definition at line 130 of file wvlockfile.cc.

References filename, and lock_count.

Referenced by ~WvLockFile.


Member Data Documentation

WvString WvLockFile::devicename [private]
 

Definition at line 19 of file streams/wvlockfile.h.

Referenced by WvLockFile.

WvString WvLockFile::filename [private]
 

Definition at line 19 of file streams/wvlockfile.h.

Referenced by lock, unlock, and WvLockFile.

int WvLockFile::lock_count [private]
 

Definition at line 20 of file streams/wvlockfile.h.

Referenced by islocked, lock, unlock, WvLockFile, and ~WvLockFile.


The documentation for this class was generated from the following files:
Generated on Sun Aug 25 02:29:42 2002 for WvStreams by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002