#include <lock.h>

Inheritance diagram for KABC::Lock:
QObject KABC::LockNull

List of all members.

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

static bool readLockFile (const QString &filename, int &pid, QString &app)
static bool writeLockFile (const QString &filename)
static QString locksDir ()

Detailed Description

This class provides locking functionality for a file, directory or an arbitrary string-represented resource.

Definition at line 35 of file lock.h.


Constructor & Destructor Documentation

Lock::Lock ( const QString identifier)

Constructor.

Parameters:
identifierAn identifier for the resource to be locked, e.g. a file name.

Definition at line 38 of file lock.cpp.

Destruct lock object.

This also removes the lock on the resource.

Definition at line 44 of file lock.cpp.


Member Function Documentation

bool Lock::lock ( ) [virtual]

Lock resource.

Reimplemented in KABC::LockNull.

Definition at line 81 of file lock.cpp.

bool Lock::unlock ( ) [virtual]

Unlock resource.

Reimplemented in KABC::LockNull.

Definition at line 136 of file lock.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys