qmlFrontend/hwengine.cpp
branchqmlfrontend
changeset 10896 5a74923120d5
parent 10888 a04e04aaf599
child 10951 89a7f617e091
--- a/qmlFrontend/hwengine.cpp	Tue Apr 14 11:18:14 2015 +0300
+++ b/qmlFrontend/hwengine.cpp	Thu Apr 16 23:31:13 2015 +0300
@@ -33,6 +33,8 @@
     tryAddTeam_t * flibTryAddTeam;
     tryRemoveTeam_t * flibTryRemoveTeam;
     changeTeamColor_t * flibChangeTeamColor;
+
+    connectOfficialServer_t * flibConnectOfficialServer;
 }
 
 Q_DECLARE_METATYPE(MessageType);
@@ -77,6 +79,8 @@
     flibTryRemoveTeam = (tryRemoveTeam_t*) hwlib.resolve("tryRemoveTeam");
     flibChangeTeamColor = (changeTeamColor_t*) hwlib.resolve("changeTeamColor");
 
+    flibConnectOfficialServer = (connectOfficialServer_t*) hwlib.resolve("connectOfficialServer");
+
     flibInit("/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GC/share/hedgewars/Data", "/usr/home/unC0Rr/.hedgewars");
     flibRegisterGUIMessagesCallback(this, &guiMessagesCallback);
 
@@ -237,6 +241,11 @@
     flibChangeTeamColor(teamName.toUtf8().constData(), dir);
 }
 
+void HWEngine::connect(const QString &host, quint16 port)
+{
+    flibConnectOfficialServer();
+}
+
 void HWEngine::setTheme(const QString &theme)
 {
     flibSetTheme(theme.toUtf8().constData());