kabc
KABC::Lock Class Reference
#include <lock.h>
Inheritance diagram for KABC::Lock:

Signals | |
void | locked () |
void | unlocked () |
Public Member Functions | |
Lock (const QString &identifier) | |
~Lock () | |
virtual QString | error () const |
virtual bool | lock () |
QString | lockFileName () const |
virtual bool | unlock () |
Static Public Member Functions | |
static QString | locksDir () |
static bool | readLockFile (const QString &filename, int &pid, QString &app) |
static bool | writeLockFile (const QString &filename) |
Detailed Description
This class provides locking functionality for a file, directory or an arbitrary string-represented resource.
Constructor & Destructor Documentation
Lock::Lock | ( | const QString & | identifier | ) |
Lock::~Lock | ( | ) |
Member Function Documentation
|
virtual |
Returns the lastest error message.
Reimplemented in KABC::LockNull.
|
virtual |
|
signal |
Emitted after the lock has been locked.
QString Lock::lockFileName | ( | ) | const |
Returns the path of the lock file.
The file will be located in the directory returned by locksDir() and have the file extension .lock
|
static |
|
static |
Reads the process ID and the application name from a lock file.
- Parameters
-
filename The lock file to read from. Full path or relative to current working directory pid The variable the process ID will be read into app The variable the application name will be read into
- Returns
false
iffilename
could not be read, otherwisetrue
, even when reading the values fails
|
virtual |
|
signal |
Emitted after the lock has been unlocked.
|
static |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.