KABC::Lock Class Reference

#include <lock.h>

Inheritance diagram for KABC::Lock:

QObject KABC::LockNull List of all members.

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.


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 ()

Constructor & Destructor Documentation

Lock::Lock ( const QString identifier  ) 

Constructor.

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

Definition at line 38 of file lock.cpp.

Lock::~Lock (  ) 

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