summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 13:40:14 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 13:40:43 (GMT)
commitb61486fefe602e0d18fa5279021006f87b965307 (patch)
tree437585cbef1179e1ec31f79789591d5610200c29 /Swiften/EventLoop/Cocoa
parentdae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8 (diff)
downloadswift-contrib-b61486fefe602e0d18fa5279021006f87b965307.zip
swift-contrib-b61486fefe602e0d18fa5279021006f87b965307.tar.bz2
Moved Swiften to a separate module.
Diffstat (limited to 'Swiften/EventLoop/Cocoa')
m---------Swiften0
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.h20
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.mm25
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.h14
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.mm21
5 files changed, 0 insertions, 80 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.h b/Swiften/EventLoop/Cocoa/CocoaEvent.h
deleted file mode 100644
index 0ff4453..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-
-#include <Cocoa/Cocoa.h>
-
-namespace Swift {
- class Event;
- class CocoaEventLoop;
-}
-
-@interface CocoaEvent : NSObject {
- Swift::Event* event;
- Swift::CocoaEventLoop* eventLoop;
-}
-
-// Takes ownership of event
-- (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el;
-- (void) process;
-- (void) dealloc;
-
-@end
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.mm b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
deleted file mode 100644
index 8a90983..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.mm
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "Swiften/EventLoop/Cocoa/CocoaEvent.h"
-#include "Swiften/EventLoop/Event.h"
-#include "Swiften/EventLoop/Cocoa/CocoaEventLoop.h"
-
-@implementation CocoaEvent
-
-- (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el {
- self = [super init];
- if (self != nil) {
- event = e;
- eventLoop = el;
- }
- return self;
-}
-
-- (void) process {
- eventLoop->handleEvent(*event);
-}
-
-- (void) dealloc {
- delete event;
- [super dealloc];
-}
-
-@end
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h b/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
deleted file mode 100644
index ad8e456..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#include "Swiften/EventLoop/EventLoop.h"
-
-namespace Swift {
- class CocoaEventLoop : public EventLoop {
- public:
- CocoaEventLoop();
-
- virtual void post(const Event& event);
-
- using EventLoop::handleEvent;
- };
-}
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
deleted file mode 100644
index b90f3c6..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "Swiften/EventLoop/Cocoa/CocoaEventLoop.h"
-#include "Swiften/EventLoop/Cocoa/CocoaEvent.h"
-
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-
-namespace Swift {
-
-CocoaEventLoop::CocoaEventLoop() {
-}
-
-void CocoaEventLoop::post(const Event& event) {
- Event* eventCopy = new Event(event);
- CocoaEvent* cocoaEvent = [[CocoaEvent alloc] initWithEvent: eventCopy eventLoop: this];
- [cocoaEvent
- performSelectorOnMainThread:@selector(process)
- withObject: nil
- waitUntilDone: NO];
- [cocoaEvent release];
-}
-
-}