+
+uint QtUi::invokeNotification(BufferId bufId, AbstractNotificationBackend::NotificationType type, const QString &sender, const QString &text)
+{
+ static int notificationId = 0;
+
+ AbstractNotificationBackend::Notification notification(++notificationId, bufId, type, sender, text);
+ _notifications.append(notification);
+ foreach(AbstractNotificationBackend *backend, _notificationBackends)
+ backend->notify(notification);
+ return notificationId;
+}
+
+
+void QtUi::closeNotification(uint notificationId)
+{
+ QList<AbstractNotificationBackend::Notification>::iterator i = _notifications.begin();
+ while (i != _notifications.end()) {
+ if (i->notificationId == notificationId) {
+ foreach(AbstractNotificationBackend *backend, _notificationBackends)
+ backend->close(notificationId);
+ i = _notifications.erase(i);
+ }
+ else ++i;
+ }
+}
+
+
+void QtUi::closeNotifications(BufferId bufferId)
+{