00001 #ifndef _sys_LockFile_h
00002 #define _sys_LockFile_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <boost/noncopyable.hpp>
00023 #include <boost/shared_ptr.hpp>
00024 #include <string>
00025
00026 #include "IntegerTypes.h"
00027
00028 namespace qpid {
00029 namespace sys {
00030
00031 class LockFilePrivate;
00032
00043 class LockFile : private boost::noncopyable
00044 {
00045 boost::shared_ptr<LockFilePrivate> impl;
00046
00047 std::string path;
00048 bool created;
00049
00050 public:
00051 LockFile(const std::string& path_, bool create);
00052 ~LockFile();
00053
00063 pid_t readPid(void) const;
00064
00072 void writePid(void);
00073 };
00074
00075 }}
00076
00077 #endif