24#include <tqdatetime.h>
26#include <ksharedptr.h>
38 TDELockFile(
const TQString &file);
88 LockResult lock(
int options=0);
93 bool isLocked()
const;
104 int staleTime()
const;
109 void setStaleTime(
int _staleTime);
116 bool getLockInfo(
int &pid, TQString &hostname, TQString &appname);
119 class TDELockFilePrivate;
120 TDELockFilePrivate *d;
LockResult
Possible return values of the lock function.
@ LockStale
A stale lock has been detected.
@ LockError
The lock could not be acquired due to an error.
@ LockOK
Lock was acquired successfully.
@ LockFail
The lock could not be acquired because it is held by another process.
@ LockForce
Automatically remove a lock when a lock is detected that is stale for more than staleTime() seconds.
@ LockNoBlock
Return immediately, do not wait for the lock to become available.
Can be used to control the lifetime of an object that has derived TDEShared.
TDEShared()
Standard constructor.