summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-23 20:29:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-23 20:29:01 (GMT)
commit44bbd50e7eb8085d49e4e326e0c82d6968a658bb (patch)
treea9ff132256d6cb90b083de434b5d064b014edf06 /Slimber
parent4395aa54a74b719c40931364390f94bdc35c81db (diff)
downloadswift-contrib-44bbd50e7eb8085d49e4e326e0c82d6968a658bb.zip
swift-contrib-44bbd50e7eb8085d49e4e326e0c82d6968a658bb.tar.bz2
Complete Slimber CLI.
Diffstat (limited to 'Slimber')
-rw-r--r--Slimber/CLI/DummyMenulet.cpp8
-rw-r--r--Slimber/CLI/DummyMenulet.h36
-rw-r--r--Slimber/CLI/SConscript5
-rw-r--r--Slimber/CLI/main.cpp27
4 files changed, 53 insertions, 23 deletions
diff --git a/Slimber/CLI/DummyMenulet.cpp b/Slimber/CLI/DummyMenulet.cpp
new file mode 100644
index 0000000..8bef0bb
--- /dev/null
+++ b/Slimber/CLI/DummyMenulet.cpp
@@ -0,0 +1,8 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Slimber/CLI/DummyMenulet.h"
+
diff --git a/Slimber/CLI/DummyMenulet.h b/Slimber/CLI/DummyMenulet.h
new file mode 100644
index 0000000..e0bcb2f
--- /dev/null
+++ b/Slimber/CLI/DummyMenulet.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include "Slimber/Menulet.h"
+
+class DummyMenulet : public Menulet {
+ public:
+ DummyMenulet() {
+ }
+
+ void clear() {
+ }
+
+ void addItem(const Swift::String&, const Swift::String&) {
+ }
+
+ void addAboutItem() {
+ }
+
+ void addRestartItem() {
+ }
+
+ void addExitItem() {
+ }
+
+ void addSeparator() {
+ }
+
+ void setIcon(const Swift::String&) {
+ }
+};
diff --git a/Slimber/CLI/SConscript b/Slimber/CLI/SConscript
index 825660c..13c5eb2 100644
--- a/Slimber/CLI/SConscript
+++ b/Slimber/CLI/SConscript
@@ -6,4 +6,7 @@ myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env.get("AVAHI_FLAGS", {}))
-myenv.Program("slimber", ["main.cpp"])
+myenv.Program("slimber", [
+ "main.cpp",
+ "DummyMenulet.cpp",
+ ])
diff --git a/Slimber/CLI/main.cpp b/Slimber/CLI/main.cpp
index 287859b..d254cb1 100644
--- a/Slimber/CLI/main.cpp
+++ b/Slimber/CLI/main.cpp
@@ -4,35 +4,18 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include <string>
-#include <boost/bind.hpp>
-
-#include "Swiften/Base/Platform.h"
-#include "Slimber/Server.h"
-#include "Slimber/FileVCardCollection.h"
-#include "Swiften/LinkLocal/LinkLocalServiceBrowser.h"
-#include "Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h"
-#include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h"
-//#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h"
#include "Swiften/EventLoop/SimpleEventLoop.h"
-#include "Swiften/Application/Platform/PlatformApplication.h"
+#include "Slimber/CLI/DummyMenulet.h"
+#include "Slimber/MainController.h"
using namespace Swift;
int main() {
SimpleEventLoop eventLoop;
- /*
- boost::shared_ptr<BonjourQuerier> querier(new BonjourQuerier());
- querier->start();
- LinkLocalServiceBrowser browser(querier);
- browser.start();
- */
-
-/*
- FileVCardCollection vCardCollection(PlatformApplication("Slimber").getSettingsDir());
- Server server(5222, 5562, linkLocalRoster, dnsSDService, &vCardCollection);
- */
+ DummyMenulet menulet;
+ MainController controller(&menulet);
+
eventLoop.run();
return 0;
}