summaryrefslogtreecommitdiffstats
blob: 84ec943247f74929398dd9a09a0bb9ad5a3e5415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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