| 1 | /* |
| 2 | * File: NamedPipe.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: Aug 7, 2009 |
| 6 | * |
| 7 | * Copyright (c) 2009-2013 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * This object manages the pipe between hercules and hercules studio |
| 11 | * |
| 12 | * This program is free software: you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by |
| 14 | * the Free Software Foundation, either version 3 of the License, or |
| 15 | * (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | #ifndef NAMEDPIPE_H_ |
| 28 | #define NAMEDPIPE_H_cxx . . $ `HercStudio/NamedPipe.h:28:9`! |
| 29 | |
| 30 | #include <QMutex> |
| 31 | #include <QFile> |
| 32 | |
| 33 | #include <string> |
| 34 | #include <cstdio> |
| 35 | |
| 36 | class NamedPipecxx . . $ NamedPipe# |
| 37 | { |
| 38 | public: |
| 39 | static NamedPipecxx . . $ NamedPipe#& getInstancecxx . . $ NamedPipe#getInstance(464fad7f4e589b3).(); |
| 40 | virtual ~cxx . . $ NamedPipe#`~NamedPipe`(49f6e7a06ebc5aa8).NamedPipecxx . . $ NamedPipe#(); |
| 41 | int recovercxx . . $ NamedPipe#recover(b126dc7c1de90089).(); |
| 42 | void generatePidcxx . . $ NamedPipe#generatePid(3e454b8ccf442868).(int studioPid, int herculesPid); |
| 43 | int getHerculesPidcxx . . $ NamedPipe#getHerculesPid(b126dc7c1de90089).(); |
| 44 | stdcxx . . $ std/::stringcxx . . $ std/string# getHerculesCommandlinecxx . . $ NamedPipe#getHerculesCommandline(efd28698952f529a).(); |
| 45 | |
| 46 | FILEcxx . . $ FILE# * getHerculesStdincxx . . $ NamedPipe#getHerculesStdin(3637adb0f06093ef).(); |
| 47 | FILEcxx . . $ FILE# * getHerculesCommandsFilecxx . . $ NamedPipe#getHerculesCommandsFile(3637adb0f06093ef).(); |
| 48 | FILEcxx . . $ FILE# * getHerculesStdoutcxx . . $ NamedPipe#getHerculesStdout(3637adb0f06093ef).(); |
| 49 | QFilecxx . . $ QFile#& getHerculesLogfilecxx . . $ NamedPipe#getHerculesLogfile(b409ea4a0265da19).(); |
| 50 | FILEcxx . . $ FILE# * getHerculesStderrcxx . . $ NamedPipe#getHerculesStderr(3637adb0f06093ef).(); |
| 51 | QFilecxx . . $ QFile#& getHerculesStatuscxx . . $ NamedPipe#getHerculesStatus(b409ea4a0265da19).(); |
| 52 | |
| 53 | private: |
| 54 | static NamedPipecxx . . $ NamedPipe# sInstancecxx . . $ NamedPipe#sInstance.; |
| 55 | stdcxx . . $ std/::stringcxx . . $ std/string# mSetPathcxx . . $ NamedPipe#mSetPath.; |
| 56 | stdcxx . . $ std/::stringcxx . . $ std/string# mFifo0cxx . . $ NamedPipe#mFifo0.; |
| 57 | stdcxx . . $ std/::stringcxx . . $ std/string# mFifo1cxx . . $ NamedPipe#mFifo1.; |
| 58 | stdcxx . . $ std/::stringcxx . . $ std/string# mFifo2cxx . . $ NamedPipe#mFifo2.; |
| 59 | bool mRecoverycxx . . $ NamedPipe#mRecovery.; |
| 60 | int mHerculesPidcxx . . $ NamedPipe#mHerculesPid.; |
| 61 | |
| 62 | int delDircxx . . $ NamedPipe#delDir(9b8588921b9c6c2f).(stdcxx . . $ std/::stringcxx . . $ std/string#& path); |
| 63 | |
| 64 | QMutexcxx . . $ QMutex# mMutexcxx . . $ NamedPipe#mMutex.; |
| 65 | FILEcxx . . $ FILE# * mStdinOutputcxx . . $ NamedPipe#mStdinOutput.; |
| 66 | FILEcxx . . $ FILE# * mStdoutcxx . . $ NamedPipe#mStdout.; |
| 67 | QFilecxx . . $ QFile# * mStdoutInputcxx . . $ NamedPipe#mStdoutInput.; |
| 68 | FILEcxx . . $ FILE# * mStderrcxx . . $ NamedPipe#mStderr.; |
| 69 | QFilecxx . . $ QFile# * mStderrInputcxx . . $ NamedPipe#mStderrInput.; |
| 70 | |
| 71 | |
| 72 | protected: |
| 73 | NamedPipecxx . . $ NamedPipe#NamedPipe(49f6e7a06ebc5aa8).(); |
| 74 | }; |
| 75 | |
| 76 | #endif /* NAMEDPIPE_H_ */ |