.TH "KABC::Lock" kde3 "11 Jun 2005" "Version Version 3.4.1" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::Lock \- This class provides locking functionality for a file, directory or an arbitrary string-represented resource.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <lock.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
Inherited by \fBKABC::LockNull\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBlocked\fP ()"
.br
.ti -1c
.RI "void \fBunlocked\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBLock\fP (const \fBQString\fP &identifier)"
.br
.ti -1c
.RI "\fB~Lock\fP ()"
.br
.ti -1c
.RI "virtual bool \fBlock\fP ()"
.br
.ti -1c
.RI "virtual bool \fBunlock\fP ()"
.br
.ti -1c
.RI "virtual \fBQString\fP \fBerror\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBlockFileName\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBreadLockFile\fP (const \fBQString\fP &filename, int &pid, \fBQString\fP &app)"
.br
.ti -1c
.RI "static bool \fBwriteLockFile\fP (const \fBQString\fP &filename)"
.br
.ti -1c
.RI "static \fBQString\fP \fBlocksDir\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class provides locking functionality for a file, directory or an arbitrary string-represented resource. 
.PP
Definition at line 35 of file lock.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "Lock::Lock (const \fBQString\fP & identifier)"
.PP
Constructor. 
.PP
\fBParameters:\fP
.RS 4
\fIidentifier\fP An identifier for the resource to be locked, e.g. a file name. 
.RE
.PP

.PP
Definition at line 38 of file lock.cpp.
.PP
References QString::replace().
.SS "Lock::~\fBLock\fP ()"
.PP
Destruct lock object. 
.PP
This also removes the lock on the resource. 
.PP
Definition at line 44 of file lock.cpp.
.PP
References unlock().
.SH "Member Function Documentation"
.PP 
.SS "bool Lock::lock ()\fC [virtual]\fP"
.PP
\fBLock\fP resource. 
.PP
Reimplemented in \fBKABC::LockNull\fP.
.PP
Definition at line 80 of file lock.cpp.
.PP
References QString::arg(), QFile::encodeName(), endl(), kdDebug(), kdWarning(), locateLocal(), QFile::remove(), and QString::replace().
.SS "bool Lock::unlock ()\fC [virtual]\fP"
.PP
Unlock resource. 
.PP
Reimplemented in \fBKABC::LockNull\fP.
.PP
Definition at line 135 of file lock.cpp.
.PP
References QString::arg(), endl(), kdDebug(), and QFile::remove().
.PP
Referenced by ~Lock().

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
