diff options
Diffstat (limited to 'SwifTools/Notifier/NotificationCenterNotifierDelegate.mm')
-rw-r--r-- | SwifTools/Notifier/NotificationCenterNotifierDelegate.mm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm b/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm new file mode 100644 index 0000000..84ec943 --- /dev/null +++ b/SwifTools/Notifier/NotificationCenterNotifierDelegate.mm @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2015-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + +#import "SwifTools/Notifier/NotificationCenterNotifierDelegate.h" + +#include <string> + +#include <SwifTools/Cocoa/CocoaUtil.h> +#include <SwifTools/Notifier/NotificationCenterNotifier.h> + +@implementation NotificationCenterNotifierDelegate + +using namespace Swift; + +@synthesize notifier; + +- (void)userNotificationCenter:(NSUserNotificationCenter *) center didActivateNotification:(NSUserNotification *)notification { + (void)center; + std::string identifier = ns2StdString(notification.identifier); + notifier->handleUserNotificationActivated(identifier); +} + +@end |