wibble  1.1
filelock.h
Go to the documentation of this file.
1 #ifndef WIBBLE_SYS_FILELOCK_H
2 #define WIBBLE_SYS_FILELOCK_H
3 
4 #include <wibble/sys/macros.h>
5 
6 #ifdef POSIX
7 
8 #include <fcntl.h>
9 
10 namespace wibble {
11 namespace sys {
12 namespace fs {
13 
19 struct FileLock
20 {
21  int fd;
22  struct flock lock;
23 
34  FileLock(int fd, short l_type, short l_whence=SEEK_SET, off_t l_start=0, off_t l_len=0);
35 
39  ~FileLock();
40 
41 private:
42  // Disallow copying
43  FileLock(const FileLock&);
44  FileLock& operator=(const FileLock&);
45 };
46 
47 }
48 }
49 }
50 
51 // vim:set ts=4 sw=4:
52 #endif
53 #endif
Definition: amorph.h:17