WvStreams
wvlockdev.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  * Some handy functions to create/remove /var/lock lockfiles.
6  */
7 #ifndef __WVLOCKDEV_H
8 #define __WVLOCKDEV_H
9 
10 #include "wvstring.h"
11 
17 class WvLockDev
18 {
19  WvString devicename, filename;
20  int lock_count;
21 public:
22  WvLockDev(WvString _devicename);
23  ~WvLockDev();
24 
25  bool lock();
26  void unlock();
27  bool islocked() const
28  { return lock_count != 0; }
29 };
30 
31 #endif // __WVLOCKDEV_H
WvLockDev
Class to handle Lock files - useful for WvDial and other places where we need to guarantee exclusive ...
Definition: wvlockdev.h:17
WvString
WvString is an implementation of a simple and efficient printable-string class.
Definition: wvstring.h:329