| 1 | /***************************************************************************** |
| 2 | ** QNapi |
| 3 | ** Copyright (C) 2008-2017 Piotr KrzemiĆski <[email protected]> |
| 4 | ** |
| 5 | ** This program is free software; you can redistribute it and/or modify |
| 6 | ** it under the terms of the GNU General Public License as published by |
| 7 | ** the Free Software Foundation; either version 2 of the License, or |
| 8 | ** (at your option) any later version. |
| 9 | ** |
| 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | ** |
| 13 | *****************************************************************************/ |
| 14 | |
| 15 | #ifndef __QNAPICLI__H__ |
| 16 | #define __QNAPICLI__H__cxx . . $ `gui/src/qnapicli.h:16:9`! |
| 17 | |
| 18 | #include "config/qnapiconfig.h"cxx . . $ `<file>/libqnapi/src/config/qnapiconfig.h`/ |
| 19 | |
| 20 | #include <QCoreApplication> |
| 21 | #include <QFileInfo> |
| 22 | #include <QString> |
| 23 | #include <QStringList> |
| 24 | #include <iostream> |
| 25 | #include "qnapi.h"cxx . . $ `<file>/gui/src/qnapi.h`/ |
| 26 | |
| 27 | class QNapiClicxx . . $ QNapiCli# : public QCoreApplicationcxx . . $ QCoreApplication# { |
| 28 | Q_OBJECTcxx . . $ QMetaObject#Call# |
| 29 | |
| 30 | public: |
| 31 | QNapiClicxx . . $ QNapiCli#QNapiCli(d3c44a1e90630249).(int argc, char **argv, const QNapiConfigcxx . . $ QNapiConfig# &config, |
| 32 | const QStringcxx . . $ QString# &uiLanguage); |
| 33 | |
| 34 | static bool isCliCallcxx . . $ QNapiCli#isCliCall(999dbd1e14140801).(int argc, char **argv); |
| 35 | int execcxx . . $ QNapiCli#exec(b126dc7c1de90089).(); |
| 36 | |
| 37 | private: |
| 38 | QStringListcxx . . $ QStringList# movieListcxx . . $ QNapiCli#movieList.; |
| 39 | QNapiConfigcxx . . $ QNapiConfig# configcxx . . $ QNapiCli#config.; |
| 40 | const QStringcxx . . $ QString# uiLanguagecxx . . $ QNapiCli#uiLanguage.; |
| 41 | |
| 42 | enum CliExitCodecxx . . $ QNapiCli#CliExitCode# { |
| 43 | EC_CMD_LINE_ARG_PARSING_ERRORcxx . . $ QNapiCli#EC_CMD_LINE_ARG_PARSING_ERROR. = -1, |
| 44 | EC_OKcxx . . $ QNapiCli#EC_OK. = 0, |
| 45 | EC_NON_CLI_MODEcxx . . $ QNapiCli#EC_NON_CLI_MODE. = 1, |
| 46 | EC_P7ZIP_UNAVAILABLEcxx . . $ QNapiCli#EC_P7ZIP_UNAVAILABLE. = 2, |
| 47 | EC_CANNOT_WRITE_TMP_DIRcxx . . $ QNapiCli#EC_CANNOT_WRITE_TMP_DIR. = 3, |
| 48 | EC_UNSUPPORTED_ENGINEcxx . . $ QNapiCli#EC_UNSUPPORTED_ENGINE. = 4, |
| 49 | EC_NO_WRITE_PERMISSIONScxx . . $ QNapiCli#EC_NO_WRITE_PERMISSIONS. = 5, |
| 50 | EC_SUBTITLES_NOT_FOUNDcxx . . $ QNapiCli#EC_SUBTITLES_NOT_FOUND. = 6, |
| 51 | EC_COULD_NOT_DOWNLOADcxx . . $ QNapiCli#EC_COULD_NOT_DOWNLOAD. = 7, |
| 52 | EC_COULD_NOT_UNARCHIVEcxx . . $ QNapiCli#EC_COULD_NOT_UNARCHIVE. = 8, |
| 53 | EC_COULD_NOT_MATCHcxx . . $ QNapiCli#EC_COULD_NOT_MATCH. = 9, |
| 54 | EC_MOVIE_FILE_NOT_FOUNDcxx . . $ QNapiCli#EC_MOVIE_FILE_NOT_FOUND. = 10 |
| 55 | }; |
| 56 | |
| 57 | enum CliModecxx . . $ QNapiCli#CliMode# { CM_UNSETcxx . . $ QNapiCli#CM_UNSET., CM_HELPcxx . . $ QNapiCli#CM_HELP., CM_HELP_LANGUAGEScxx . . $ QNapiCli#CM_HELP_LANGUAGES., CM_CONSOLEcxx . . $ QNapiCli#CM_CONSOLE., CM_QUIETcxx . . $ QNapiCli#CM_QUIET. }; |
| 58 | |
| 59 | enum ShowListPolicycxx . . $ QNapiCli#ShowListPolicy# { SLP_SHOWcxx . . $ QNapiCli#SLP_SHOW., SLP_USE_CONFIGcxx . . $ QNapiCli#SLP_USE_CONFIG., SLP_NEVER_SHOWcxx . . $ QNapiCli#SLP_NEVER_SHOW. }; |
| 60 | |
| 61 | CliModecxx . . $ QNapiCli#CliMode# modecxx . . $ QNapiCli#mode.; |
| 62 | ShowListPolicycxx . . $ QNapiCli#ShowListPolicy# showPolicycxx . . $ QNapiCli#showPolicy.; |
| 63 | |
| 64 | QStringcxx . . $ QString# langcxx . . $ QNapiCli#lang.; |
| 65 | QStringcxx . . $ QString# langBackupcxx . . $ QNapiCli#langBackup.; |
| 66 | bool langBackupPassedcxx . . $ QNapiCli#langBackupPassed.; |
| 67 | QStringListcxx . . $ QStringList# argscxx . . $ QNapiCli#args.; |
| 68 | |
| 69 | bool analyzecxx . . $ QNapiCli#analyze(6ea41922f5835cfb).(const QStringListcxx . . $ QStringList# &args); |
| 70 | void printHeadercxx . . $ QNapiCli#printHeader(49f6e7a06ebc5aa8).(); |
| 71 | void printHelpcxx . . $ QNapiCli#printHelp(3520e46b33348bf6).(const QStringcxx . . $ QString# &binaryFileName); |
| 72 | void printHelpLanguagescxx . . $ QNapiCli#printHelpLanguages(49f6e7a06ebc5aa8).(); |
| 73 | void printClicxx . . $ QNapiCli#printCli(3520e46b33348bf6).(const QStringcxx . . $ QString# &string = ""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 74 | }; |
| 75 | |
| 76 | #endif |