]> git.sven.stormbind.net Git - sven/vym.git/blob - src/vymlock.h
Replace Pierre as the maintainer
[sven/vym.git] / src / vymlock.h
1 #ifndef VYMLOCK_H
2 #define VYMLOCK_H
3
4 extern bool debug;
5
6 class VymLock {
7   public:
8     enum LockState { Undefined, LockedByMyself, LockedByOther, NotWritable };
9     void operator==(const VymLock &);
10     VymLock();
11     VymLock(const QString &fn);
12     ~VymLock();
13     void init();
14     bool tryLock();
15     LockState getState();
16     bool releaseLock();
17     bool removeLockForced();
18     void setAuthor(const QString &s);
19     QString getAuthor();
20     void setHost(const QString &s);
21     QString getHost();
22     void setMapPath(const QString &path);
23     QString getMapPath();
24
25   private:
26     QString author;
27     QString host;
28     QString mapPath;
29     QString lockPath;
30     LockState state;
31 };
32
33 #endif