2
* Copyright (C) 2011 Intel Corporation
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) version 3.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20
#ifndef __NOTIFICATION_BACKEND_LIBNOTIFY_H
21
#define __NOTIFICATION_BACKEND_LIBNOTIFY_H
29
#include "syncevo/declarations.h"
30
#include "NotificationBackendBase.h"
32
#include <libnotify/notify.h>
36
class NotificationBackendLibnotify : public NotificationBackendBase {
38
NotificationBackendLibnotify();
39
virtual ~NotificationBackendLibnotify();
42
* Callback for the notification action.
44
static void notifyAction(NotifyNotification *notify,
45
gchar *action, gpointer userData);
49
void publish(const std::string& summary, const std::string& body,
50
const std::string& viewParams = std::string());
54
* Flag to indicate whether libnotify has been successfully
60
* Flag to indicate whether libnotify accepts actions.
62
bool m_acceptsActions;
65
* The current notification.
67
NotifyNotification *m_notification;
74
#endif // __NOTIFICATION_BACKEND_LIBNOTIFY_H