Half implement registration in servers list
authorunc0rr
Sun, 09 Dec 2007 11:25:59 +0000
changeset 633 9050a949db21
parent 632 5e09ae25729f
child 634 b9db5ff5cfdb
Half implement registration in servers list
QTfrontend/CMakeLists.txt
QTfrontend/netregister.cpp
QTfrontend/netregister.h
QTfrontend/netudpserver.cpp
QTfrontend/netudpserver.h
QTfrontend/netwwwserver.cpp
QTfrontend/netwwwserver.h
--- a/QTfrontend/CMakeLists.txt	Sun Dec 09 10:09:52 2007 +0000
+++ b/QTfrontend/CMakeLists.txt	Sun Dec 09 11:25:59 2007 +0000
@@ -62,7 +62,9 @@
 	newnetclient.cpp
 	netudpserver.cpp
 	netudpwidget.cpp
+	netwwwserver.cpp
 	netwwwwidget.cpp
+	netregister.cpp
 	netserverslist.cpp
 	chatwidget.cpp
 	binds.cpp
@@ -100,7 +102,9 @@
 	newnetclient.h
 	netudpserver.h
 	netudpwidget.h
+	netwwwserver.h
 	netwwwwidget.h
+	netregister.h
 	netserverslist.h
 	chatwidget.h
 	SDLs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/netregister.cpp	Sun Dec 09 11:25:59 2007 +0000
@@ -0,0 +1,25 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "netregister.h"
+
+HWNetRegisterServer::HWNetRegisterServer(QObject *parent, const QString & descr, quint16 port) :
+  QObject(parent)
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/netregister.h	Sun Dec 09 11:25:59 2007 +0000
@@ -0,0 +1,32 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _NET_REGISTER_INCLUDED
+#define _NET_REGISTER_INCLUDED
+
+#include <QObject>
+
+class HWNetRegisterServer : public QObject
+{
+	Q_OBJECT
+
+public:
+	HWNetRegisterServer(QObject *parent, const QString & descr, quint16 port);
+};
+
+#endif // _NET_REGISTER_INCLUDED
--- a/QTfrontend/netudpserver.cpp	Sun Dec 09 10:09:52 2007 +0000
+++ b/QTfrontend/netudpserver.cpp	Sun Dec 09 11:25:59 2007 +0000
@@ -20,8 +20,8 @@
 
 #include "netudpserver.h"
 
-HWNetUdpServer::HWNetUdpServer(QObject* parent) :
-  QObject(parent)
+HWNetUdpServer::HWNetUdpServer(QObject *parent, const QString & descr, quint16 port) :
+  HWNetRegisterServer(parent, descr, port)
 {
   pUdpSocket = new QUdpSocket(this);
   pUdpSocket->bind(46631);
--- a/QTfrontend/netudpserver.h	Sun Dec 09 10:09:52 2007 +0000
+++ b/QTfrontend/netudpserver.h	Sun Dec 09 11:25:59 2007 +0000
@@ -20,15 +20,16 @@
 #define _NET_UDPSERVER_INCLUDED
 
 #include <QObject>
+#include "netregister.h"
 
 class QUdpSocket;
 
-class HWNetUdpServer : public QObject
+class HWNetUdpServer : public HWNetRegisterServer
 {
   Q_OBJECT
 
  public:
-  HWNetUdpServer(QObject *parent = 0);
+  HWNetUdpServer(QObject *parent, const QString & descr, quint16 port);
 
  private slots:
   void onClientRead();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/netwwwserver.cpp	Sun Dec 09 11:25:59 2007 +0000
@@ -0,0 +1,30 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "netwwwserver.h"
+
+HWNetWwwServer::HWNetWwwServer(QObject *parent, const QString & descr, quint16 port) :
+  HWNetRegisterServer(parent, descr, port)
+{
+	qDebug("www server start");
+}
+
+void HWNetWwwServer::onClientRead()
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/netwwwserver.h	Sun Dec 09 11:25:59 2007 +0000
@@ -0,0 +1,38 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _NET_WWWSERVER_INCLUDED
+#define _NET_WWWSERVER_INCLUDED
+
+#include <QObject>
+#include "netregister.h"
+
+class HWNetWwwServer : public HWNetRegisterServer
+{
+	Q_OBJECT
+
+public:
+	HWNetWwwServer(QObject *parent, const QString & descr, quint16 port);
+
+private slots:
+	void onClientRead();
+
+private:
+};
+
+#endif // _NET_WWWSERVER_INCLUDED