Added Server and ServersManager to the online namespace and edited everything that uses those.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13279 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx 2013-07-18 23:02:18 +00:00
parent 8ec5adeec0
commit ae6bc57b95
10 changed files with 215 additions and 199 deletions

View File

@ -24,6 +24,7 @@
#include "utils/constants.hpp" #include "utils/constants.hpp"
#include "utils/string_utils.hpp" #include "utils/string_utils.hpp"
namespace online{
Server::SortOrder Server::m_sort_order=Server::SO_NAME; //FIXME change to some other default Server::SortOrder Server::m_sort_order=Server::SO_NAME; //FIXME change to some other default
Server::Server(const XMLNode & xml) Server::Server(const XMLNode & xml)
@ -70,3 +71,4 @@ bool Server::filterByWords(const core::stringw words) const
return false; return false;
} // filterByWords } // filterByWords
} // namespace online

View File

@ -31,6 +31,7 @@
class XMLNode; class XMLNode;
namespace online{
/** /**
* \ingroup online * \ingroup online
*/ */
@ -129,6 +130,6 @@ public:
} // operator> } // operator>
}; // Server }; // Server
} // namespace online
#endif #endif

View File

@ -26,6 +26,8 @@
#include "config/user_config.hpp" #include "config/user_config.hpp"
#include "utils/translation.hpp" #include "utils/translation.hpp"
namespace online{
static ServersManager* user_singleton = NULL; static ServersManager* user_singleton = NULL;
ServersManager* ServersManager::get() ServersManager* ServersManager::get()
@ -77,3 +79,4 @@ Server * ServersManager::getQuickPlay()
return m_servers->get(0); return m_servers->get(0);
return NULL; return NULL;
} }
} // namespace online

View File

@ -23,7 +23,7 @@
#include "online/server.hpp" #include "online/server.hpp"
// ============================================================================ namespace online {
/** /**
* \brief * \brief
@ -53,6 +53,10 @@ class ServersManager
Server * getQuickPlay(); Server * getQuickPlay();
}; // class ServersManager }; // class ServersManager
} // namespace online
#endif #endif
/*EOF*/ /*EOF*/

View File

@ -34,6 +34,7 @@
using namespace GUIEngine; using namespace GUIEngine;
using namespace irr; using namespace irr;
using namespace irr::gui; using namespace irr::gui;
using namespace online;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -26,6 +26,8 @@
#include "guiengine/widgets/ribbon_widget.hpp" #include "guiengine/widgets/ribbon_widget.hpp"
#include "guiengine/widgets/label_widget.hpp" #include "guiengine/widgets/label_widget.hpp"
#include "online/server.hpp" #include "online/server.hpp"
/** /**
* \brief Dialog that allows a user to sign in * \brief Dialog that allows a user to sign in
* \ingroup states_screens * \ingroup states_screens
@ -38,7 +40,7 @@ private:
bool m_self_destroy; bool m_self_destroy;
bool m_enter_lobby; bool m_enter_lobby;
Server * m_server; online::Server * m_server;
GUIEngine::LabelWidget * m_name_widget; GUIEngine::LabelWidget * m_name_widget;
GUIEngine::LabelWidget * m_info_widget; GUIEngine::LabelWidget * m_info_widget;
@ -50,7 +52,7 @@ private:
void requestJoin(); void requestJoin();
public: public:
ServerInfoDialog(Server * server); ServerInfoDialog(online::Server * server);
~ServerInfoDialog(); ~ServerInfoDialog();
void onEnterPressedInternal(); void onEnterPressedInternal();

View File

@ -37,7 +37,7 @@
#include "utils/translation.hpp" #include "utils/translation.hpp"
#include "online/servers_manager.hpp" #include "online/servers_manager.hpp"
using namespace online;
using namespace GUIEngine; using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( NetworkingLobby ); DEFINE_SCREEN_SINGLETON( NetworkingLobby );

View File

@ -36,7 +36,7 @@ class NetworkingLobby : public GUIEngine::Screen,
private: private:
friend class GUIEngine::ScreenSingleton<NetworkingLobby>; friend class GUIEngine::ScreenSingleton<NetworkingLobby>;
Server * m_server; online::Server * m_server;
NetworkingLobby(); NetworkingLobby();

View File

@ -44,6 +44,7 @@
using namespace GUIEngine; using namespace GUIEngine;
using namespace online;
DEFINE_SCREEN_SINGLETON( OnlineScreen ); DEFINE_SCREEN_SINGLETON( OnlineScreen );

View File

@ -29,6 +29,8 @@
#include "utils/string_utils.hpp" #include "utils/string_utils.hpp"
#include "online/servers_manager.hpp" #include "online/servers_manager.hpp"
using namespace online;
DEFINE_SCREEN_SINGLETON( ServerSelection ); DEFINE_SCREEN_SINGLETON( ServerSelection );
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------