]> git.sven.stormbind.net Git - sven/vym.git/blob - vymlock.h
a78a6aba521e7f30418c3db4a9e84086c408932e
[sven/vym.git] / vymlock.h
1 #ifndef VYMLOCK_H
2 #define VYMLOCK_H
3
4 extern bool debug;
5
6 class VymLock
7 {
8 public:
9     enum LockState {undefined, lockedByMyself, lockedByOther, notWritable};
10     VymLock();
11     VymLock( const QString &fn );
12     ~VymLock();
13     void init();
14     bool tryLock();
15     LockState getState();
16     bool removeLock();
17     bool releaseLock();
18     bool rename( const QString &newMapPath);
19     void setAuthor(const QString &s);
20     QString getAuthor();
21     void setHost(const QString &s);
22     QString getHost();
23     void setMapPath(const QString &s);
24     QString getMapPath();
25
26 private:
27     QWidget *parent;
28     QString author;
29     QString host;
30     QString mapPath;
31     LockState state;
32 };
33
34 #endif