KABC::Lock Class Reference
This class provides locking functionality for a file, directory or an arbitrary string-represented resource. More...
#include <lock.h>
Inheritance diagram for KABC::Lock:


Signals | |
void | locked () |
void | unlocked () |
Public Member Functions | |
Lock (const QString &identifier) | |
~Lock () | |
virtual bool | lock () |
virtual bool | unlock () |
virtual QString | error () const |
QString | lockFileName () const |
Static Public Member Functions | |
bool | readLockFile (const QString &filename, int &pid, QString &app) |
bool | writeLockFile (const QString &filename) |
QString | locksDir () |
Detailed Description
This class provides locking functionality for a file, directory or an arbitrary string-represented resource.
Definition at line 33 of file lock.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 38 of file lock.cpp. References QString::replace(). |
|
Destruct lock object. This also removes the lock on the resource. Definition at line 44 of file lock.cpp. References unlock(). |
Member Function Documentation
|
Lock resource.
Reimplemented in KABC::LockNull. Definition at line 80 of file lock.cpp. References QString::arg(), QFile::encodeName(), endl(), QFile::exists(), kdDebug(), kdWarning(), locateLocal(), and QFile::remove(). Referenced by KABC::ResourceFile::requestSaveTicket(). |
|
Unlock resource.
Reimplemented in KABC::LockNull. Definition at line 132 of file lock.cpp. References QString::arg(), endl(), kdDebug(), QString::number(), and QFile::remove(). Referenced by ~Lock(). |
The documentation for this class was generated from the following files: