コード例 #1
0
const QString NotificationWrapper::message() const
{
#if ENABLE(NOTIFICATIONS)
    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
    if (notification)
        return notification->contents().body();
#endif
    return QString();
}
コード例 #2
0
void NotificationPresenterClientQt::notificationClicked(const QString& title)
{
    if (!dumpNotification)
        return;
    NotificationsQueue::ConstIterator end = m_notifications.end();
    NotificationsQueue::ConstIterator iter = m_notifications.begin();
    Notification* notification = 0;
    while (iter != end) {
        notification = iter.key();
        QString notificationTitle;
        if (notification->isHTML())
            notificationTitle = notification->url().string();
        else
            notificationTitle = notification->contents().title();
        if (notificationTitle == title)
            break;
        iter++;
    }
    if (notification)
        sendEvent(notification, eventNames().clickEvent);
}
コード例 #3
0
HRESULT STDMETHODCALLTYPE NotificationCOMWrapper::text(BSTR* result)
{
    *result = BString(m_inner->contents().body()).release();
    return S_OK;
}