\section{KABC::Lock Class Reference}
\label{classKABC_1_1Lock}\index{KABC::Lock@{KABC::Lock}}
This class provides locking functionality for a file, directory or an arbitrary string-represented resource.  


{\tt \#include $<$lock.h$>$}

Inheritance diagram for KABC::Lock:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=61pt]{classKABC_1_1Lock__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KABC::Lock:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=109pt]{classKABC_1_1Lock__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf locked} ()\label{classKABC_1_1Lock_l0}

\item 
void {\bf unlocked} ()\label{classKABC_1_1Lock_l1}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Lock} (const {\bf QString} \&identifier)
\item 
{\bf $\sim$Lock} ()
\item 
virtual bool {\bf lock} ()
\item 
virtual bool {\bf unlock} ()
\item 
virtual {\bf QString} {\bf error} () const \label{classKABC_1_1Lock_a4}

\item 
{\bf QString} {\bf lock\-File\-Name} () const \label{classKABC_1_1Lock_a5}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf read\-Lock\-File} (const {\bf QString} \&filename, int \&pid, {\bf QString} \&app)\label{classKABC_1_1Lock_e0}

\item 
static bool {\bf write\-Lock\-File} (const {\bf QString} \&filename)\label{classKABC_1_1Lock_e1}

\item 
static {\bf QString} {\bf locks\-Dir} ()\label{classKABC_1_1Lock_e2}

\end{CompactItemize}


\subsection{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.

\subsection{Constructor \& Destructor Documentation}
\index{KABC::Lock@{KABC::Lock}!Lock@{Lock}}
\index{Lock@{Lock}!KABC::Lock@{KABC::Lock}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Lock::Lock (const {\bf QString} \& {\em identifier})}\label{classKABC_1_1Lock_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em identifier}]An identifier for the resource to be locked, e.g. a file name. \end{description}
\end{Desc}


Definition at line 38 of file lock.cpp.

References QString::replace().\index{KABC::Lock@{KABC::Lock}!~Lock@{$\sim$Lock}}
\index{~Lock@{$\sim$Lock}!KABC::Lock@{KABC::Lock}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Lock::$\sim${\bf Lock} ()}\label{classKABC_1_1Lock_a1}


Destruct lock object. 

This also removes the lock on the resource. 

Definition at line 44 of file lock.cpp.

References unlock().

\subsection{Member Function Documentation}
\index{KABC::Lock@{KABC::Lock}!lock@{lock}}
\index{lock@{lock}!KABC::Lock@{KABC::Lock}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Lock::lock ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1Lock_a2}


{\bf Lock}{\rm (p.\,\pageref{classKABC_1_1Lock})} resource. 



Reimplemented in {\bf KABC::Lock\-Null} {\rm (p.\,\pageref{classKABC_1_1LockNull_a2})}.

Definition at line 80 of file lock.cpp.

References QString::arg(), QFile::encode\-Name(), endl(), kd\-Debug(), kd\-Warning(), locate\-Local(), QFile::remove(), and QString::replace().\index{KABC::Lock@{KABC::Lock}!unlock@{unlock}}
\index{unlock@{unlock}!KABC::Lock@{KABC::Lock}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Lock::unlock ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKABC_1_1Lock_a3}


Unlock resource. 



Reimplemented in {\bf KABC::Lock\-Null} {\rm (p.\,\pageref{classKABC_1_1LockNull_a3})}.

Definition at line 135 of file lock.cpp.

References QString::arg(), endl(), kd\-Debug(), and QFile::remove().

Referenced by $\sim$Lock().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
lock.h\item 
lock.cpp\end{CompactItemize}
