Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.2 KiB

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef MAPSLIST_H
#define MAPSLIST_H
#ifdef _WIN32
#pragma once
#endif
#include "server.h"
#include "netadr.h"
#include "maps.h"
#include "rcon.h"
#include "utlvector.h"
#include "Iresponse.h"
class CSocket;
class IResponse;
class CMapsList: public IResponse
{
public:
CMapsList(IResponse *target,serveritem_t &server, const char *rconPassword,const char *mod);
~CMapsList();
// send an rcon command to a server
void SendQuery();
void Refresh();
bool IsRefreshing();
serveritem_t &GetServer();
void RunFrame();
void UpdateServer();
CUtlVector<Maps_t> *GetMapsList();
bool NewMapsList();
void ServerResponded();
// called when a server response has timed out
void ServerFailedToRespond();
void SetPassword(const char *newPass);
private:
serveritem_t m_Server;
CUtlVector<Maps_t> m_MapsList;
IResponse *m_pResponseTarget;
CRcon *m_pRcon;
char m_sMod[64];
bool m_bIsRefreshing;
bool m_bNewMapsList;
bool m_bRconFailed;
char m_szRconPassword[100];
};
#endif // MAPSLIST_H