From ae90b381727ac8c378044eb2ebce3fe1be9e3512 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 1 Oct 2014 17:19:34 -0700 Subject: [PATCH] add the ice server --- CMakeLists.txt | 1 + ice-server/CMakeLists.txt | 9 +++++++++ ice-server/src/IceServer.cpp | 18 ++++++++++++++++++ ice-server/src/IceServer.h | 22 ++++++++++++++++++++++ ice-server/src/main.cpp | 27 +++++++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 ice-server/CMakeLists.txt create mode 100644 ice-server/src/IceServer.cpp create mode 100644 ice-server/src/IceServer.h create mode 100644 ice-server/src/main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c0bfb0892..62cdc925f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,7 @@ endforeach() # targets on all platforms add_subdirectory(assignment-client) add_subdirectory(domain-server) +add_subdirectory(ice-server) add_subdirectory(interface) add_subdirectory(tests) add_subdirectory(tools) diff --git a/ice-server/CMakeLists.txt b/ice-server/CMakeLists.txt new file mode 100644 index 0000000000..c81ba16248 --- /dev/null +++ b/ice-server/CMakeLists.txt @@ -0,0 +1,9 @@ +set(TARGET_NAME ice-server) + +# setup the project and link required Qt modules +setup_hifi_project(Network) + +# link the shared hifi libraries +link_hifi_libraries(networking shared) + +link_shared_dependencies() \ No newline at end of file diff --git a/ice-server/src/IceServer.cpp b/ice-server/src/IceServer.cpp new file mode 100644 index 0000000000..6543c41c31 --- /dev/null +++ b/ice-server/src/IceServer.cpp @@ -0,0 +1,18 @@ +// +// IceServer.cpp +// ice-server/src +// +// Created by Stephen Birarda on 2014-10-01. +// Copyright 2014 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include "IceServer.h" + +IceServer::IceServer(int argc, char* argv[]) : + QCoreApplication(argc, argv) +{ + +} diff --git a/ice-server/src/IceServer.h b/ice-server/src/IceServer.h new file mode 100644 index 0000000000..7d56737ca1 --- /dev/null +++ b/ice-server/src/IceServer.h @@ -0,0 +1,22 @@ +// +// IceServer.h +// ice-server/src +// +// Created by Stephen Birarda on 2014-10-01. +// Copyright 2014 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#ifndef hifi_IceServer_h +#define hifi_IceServer_h + +#include + +class IceServer : public QCoreApplication { +public: + IceServer(int argc, char* argv[]); +}; + +#endif // hifi_IceServer_h \ No newline at end of file diff --git a/ice-server/src/main.cpp b/ice-server/src/main.cpp new file mode 100644 index 0000000000..21c8b563b1 --- /dev/null +++ b/ice-server/src/main.cpp @@ -0,0 +1,27 @@ +// +// main.cpp +// ice-server/src +// +// Created by Stephen Birarda on 10/01/12. +// Copyright 2014 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +#include + +#include + +#include "IceServer.h" + +int main(int argc, char* argv[]) { +#ifndef WIN32 + setvbuf(stdout, NULL, _IOLBF, 0); +#endif + + qInstallMessageHandler(Logging::verboseMessageHandler); + + IceServer iceServer(argc, argv); + return iceServer.exec(); +} \ No newline at end of file