summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/Cocoa')
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.h4
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.mm14
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.h24
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.mm32
4 files changed, 37 insertions, 37 deletions
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.h b/Swiften/EventLoop/Cocoa/CocoaEvent.h
index 1e2c6f6..945056e 100644
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.h
+++ b/Swiften/EventLoop/Cocoa/CocoaEvent.h
@@ -13,7 +13,7 @@
#undef check
namespace Swift {
- class CocoaEventLoop;
+ class CocoaEventLoop;
}
// Using deprecated declaration of instance vars in interface, because this
@@ -22,7 +22,7 @@ namespace Swift {
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
@interface CocoaEvent : NSObject {
- Swift::CocoaEventLoop* eventLoop;
+ Swift::CocoaEventLoop* eventLoop;
}
#pragma clang diagnostic pop
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.mm b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
index 8615b48..fc9695b 100644
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.mm
+++ b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
@@ -11,19 +11,19 @@
@implementation CocoaEvent
- (id) init:(Swift::CocoaEventLoop*) el {
- self = [super init];
- if (self != nil) {
- eventLoop = el;
- }
- return self;
+ self = [super init];
+ if (self != nil) {
+ eventLoop = el;
+ }
+ return self;
}
- (void) process {
- eventLoop->handleNextCocoaEvent();
+ eventLoop->handleNextCocoaEvent();
}
- (void) dealloc {
- [super dealloc];
+ [super dealloc];
}
@end
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h b/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
index aad6b0a..bbe8390 100644
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
+++ b/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
@@ -11,18 +11,18 @@
#include <Swiften/EventLoop/EventLoop.h>
namespace Swift {
- class CocoaEventLoop : public EventLoop {
- public:
- CocoaEventLoop();
- virtual ~CocoaEventLoop();
+ class CocoaEventLoop : public EventLoop {
+ public:
+ CocoaEventLoop();
+ virtual ~CocoaEventLoop();
- void handleNextCocoaEvent();
-
- protected:
- virtual void eventPosted();
+ void handleNextCocoaEvent();
- private:
- bool isEventInCocoaEventLoop_;
- boost::recursive_mutex isEventInCocoaEventLoopMutex_;
- };
+ protected:
+ virtual void eventPosted();
+
+ private:
+ bool isEventInCocoaEventLoop_;
+ boost::recursive_mutex isEventInCocoaEventLoopMutex_;
+ };
}
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
index 2d7c613..de7c1de 100644
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
+++ b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
@@ -19,25 +19,25 @@ CocoaEventLoop::~CocoaEventLoop() {
}
void CocoaEventLoop::handleNextCocoaEvent() {
- {
- boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_);
- isEventInCocoaEventLoop_ = false;
- }
- handleNextEvents();
+ {
+ boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_);
+ isEventInCocoaEventLoop_ = false;
+ }
+ handleNextEvents();
}
void CocoaEventLoop::eventPosted() {
- boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_);
- if (!isEventInCocoaEventLoop_) {
- isEventInCocoaEventLoop_ = true;
-
- CocoaEvent* cocoaEvent = [[CocoaEvent alloc] init: this];
- [cocoaEvent
- performSelectorOnMainThread:@selector(process)
- withObject: nil
- waitUntilDone: NO];
- [cocoaEvent release];
- }
+ boost::recursive_mutex::scoped_lock lock(isEventInCocoaEventLoopMutex_);
+ if (!isEventInCocoaEventLoop_) {
+ isEventInCocoaEventLoop_ = true;
+
+ CocoaEvent* cocoaEvent = [[CocoaEvent alloc] init: this];
+ [cocoaEvent
+ performSelectorOnMainThread:@selector(process)
+ withObject: nil
+ waitUntilDone: NO];
+ [cocoaEvent release];
+ }
}
}