src/core/serverapi/gamerunnerstructs.h
00001 //------------------------------------------------------------------------------
00002 // gamerunnerstructs.h
00003 //------------------------------------------------------------------------------
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018 // 02110-1301, USA.
00019 //
00020 //------------------------------------------------------------------------------
00021 // Copyright (C) 2010 "Zalewa" <zalewapl@gmail.com>
00022 //------------------------------------------------------------------------------
00023 #ifndef __GAME_RUNNER_STRUCTS_H_
00024 #define __GAME_RUNNER_STRUCTS_H_
00025 
00026 #include "global.h"
00027 #include "serverstructs.h"
00028 #include <QDir>
00029 #include <QFileInfo>
00030 #include <QString>
00031 #include <QStringList>
00032 
00041 struct MAIN_EXPORT HostInfo
00042 {
00043         QString                 executablePath; 
00044         QString                 demoPath; 
00045         QString                 iwadPath;
00046         QStringList     pwadsPaths;
00047         QStringList     customParameters;
00048         DMFlags                 dmFlags;
00049 
00054         QList<GameCVar> cvars;
00055 
00056         ~HostInfo()
00057         {
00058                 foreach(DMFlagsSection* sec, dmFlags)
00059                         delete sec;
00060         }
00061 };
00062 
00070 struct JoinError
00071 {
00072         enum JoinErrorType
00073         {
00074                 NoError = 0,
00075                 MissingWads = 1,
00076                 Critical = 2,
00077 
00078                 Terminate = 3, // Special use to terminate the connection process.
00079         };
00080 
00081         JoinErrorType           type;
00082         QString                         error;
00083 
00087         QString                         missingIwad;
00088 
00092         QStringList             missingWads;
00093 
00094         bool                            isMissingIwadOnly() const
00095         {
00096                 return type == MissingWads
00097                         && !missingIwad.isEmpty() 
00098                         && missingWads.isEmpty();
00099         }
00100 };
00101 
00102 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator