| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2006-2008 fullmetalcoder <[email protected]> |
| 4 | ** |
| 5 | ** This file is part of the Edyuk project <http://edyuk.org> |
| 6 | ** |
| 7 | ** This file may be used under the terms of the GNU General Public License |
| 8 | ** version 2 as published by the Free Software Foundation and appearing in the |
| 9 | ** file GPL.txt included in the packaging of this file. |
| 10 | ** |
| 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | ** |
| 14 | ****************************************************************************/ |
| 15 | |
| 16 | #ifndef _QMANAGED_REQUEST_H_ |
| 17 | #define _QMANAGED_REQUEST_H_ |
| 18 | |
| 19 | #include "qcumber.h" |
| 20 | |
| 21 | /*! |
| 22 | \file qmanagedrequest.h |
| 23 | |
| 24 | \brief Definition of the QManagedRequest class. |
| 25 | */ |
| 26 | |
| 27 | #include <QStringList> |
| 28 | |
| 29 | class QCUMBER_EXPORT QManagedRequest { |
| 30 | public: |
| 31 | QManagedRequest(const QString& cmd, const QStringList& args = QStringList()); |
| 32 | QManagedRequest(const QManagedRequest& r); |
| 33 | ~QManagedRequest(); |
| 34 | |
| 35 | static QManagedRequest createSystemRequest(const QStringList& args, |
| 36 | int id = -1); |
| 37 | |
| 38 | QManagedRequest& operator=(const QManagedRequest& r); |
| 39 | |
| 40 | QString toString() const; |
| 41 | static QManagedRequest fromString(const QString& s); |
| 42 | |
| 43 | static QStringList splitArguments(const QString& s); |
| 44 | static QByteArray joinArguments(const QString& cmd, const QStringList& l); |
| 45 | |
| 46 | private: |
| 47 | QString sCommand; |
| 48 | QStringList lArguments; |
| 49 | }; |
| 50 | |
| 51 | #endif // _QMANAGED_REQUEST_H_ |