UniSet  2.6.0
RunLock.h
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // --------------------------------------------------------------------------
21 // ---------------------------------------------------------------------------
22 #ifndef RunLock_H_
23 #define RunLock_H_
24 // ---------------------------------------------------------------------------
25 #include <string>
26 // ---------------------------------------------------------------------------
27 namespace uniset
28 {
37  class RunLock
38  {
39  public:
40  RunLock();
41  ~RunLock();
42 
43  static bool isLocked(const std::string& lockFile); //, char* **argv );
44  static bool lock(const std::string& lockFile);
45  static bool unlock(const std::string& lockFile);
46 
47  protected:
48 
49  };
50  // -------------------------------------------------------------------------
51 } // end of uniset namespace
52 // ----------------------------------------------------------------------------
53 #endif