UniSet  2.6.0
RunLock.h
00001 /*
00002  * Copyright (c) 2015 Pavel Vainerman.
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as
00006  * published by the Free Software Foundation, version 2.1.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00011  * Lesser General Lesser Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00015  */
00016 // --------------------------------------------------------------------------
00021 // ---------------------------------------------------------------------------
00022 #ifndef RunLock_H_
00023 #define RunLock_H_
00024 // ---------------------------------------------------------------------------
00025 #include <string>
00026 // ---------------------------------------------------------------------------
00027 namespace uniset
00028 {
00037 class RunLock
00038 {
00039     public:
00040         RunLock();
00041         ~RunLock();
00042 
00043         static bool isLocked(const std::string& lockFile); //, char* **argv );
00044         static bool lock(const std::string& lockFile);
00045         static bool unlock(const std::string& lockFile);
00046 
00047     protected:
00048 
00049 };
00050 // -------------------------------------------------------------------------
00051 } // end of uniset namespace
00052 // ----------------------------------------------------------------------------
00053 #endif