joinerror.h
1 //------------------------------------------------------------------------------
2 // joinerror.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2014 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #ifndef id0375B082_FEE9_4270_B314893A57DB3840
24 #define id0375B082_FEE9_4270_B314893A57DB3840
25 
26 #include "dptr.h"
27 #include "global.h"
28 #include <QString>
29 #include <QtContainerFwd>
30 
31 class PWad;
32 
41 class MAIN_EXPORT JoinError
42 {
43  public:
45  {
46  NoError,
47  MissingWads,
48  ConfigurationError,
49  Critical,
60  CanAutomaticallyInstallGame
61  };
62 
63  JoinError();
64  JoinError(JoinErrorType errorType);
65  JoinError(const JoinError& other);
66  JoinError& operator=(const JoinError& other);
67  virtual ~JoinError();
68 
69  void addMissingWad(const PWad& wad);
70  void clearMissingWads();
71 
72  const QString& error() const;
73  bool isError() const;
74  bool isMissingIwadOnly() const;
75  bool isMissingWadsError() const;
76 
80  const QString& missingIwad() const;
81 
85  const QList<PWad>& missingWads() const;
86 
87  void setError(const QString& error);
88  void setMissingIwad(const QString& iwad);
89  void setMissingWads(const QList<PWad>& wads);
90  void setType(JoinErrorType type);
91 
92  JoinErrorType type() const;
93 
94  private:
96 };
97 
98 #endif
PWAD hosted on a server.
Aborts without printing error.
Definition: joinerror.h:55
Indicator of error for the server join process.
Definition: joinerror.h:41