~ubuntu-branches/ubuntu/trusty/syncevolution/trusty-proposed

« back to all changes in this revision

Viewing changes to src/NotificationBackendLibnotify.h

  • Committer: Bazaar Package Importer
  • Author(s): Tino Keitel
  • Date: 2011-07-20 16:02:02 UTC
  • mfrom: (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110720160202-e8uf7ogw4vh0q0f3
Tags: 1.1.99.5a-1
* New upstream version 1.1.99.5a, first release candiate for 1.2
* Added python-openssl dependency, the HTTP server needs it for HTTPS support
* Added versioned dependency on libsynthesis0 to get required features
* Fixed .orig.tar.gz generation in get-orig-source target
* Added myself to Uploaders:, thanks to David for sponsoring
* Use updated upstream tag for source package generation
* Removed 0001-Replace-with-in-call-to-PKG_CHECK_MODULES.patch, fixed upstream
* Renamed NEWS.Debian to NEWS so that it is actually used
* Updated NEWS for 1.1.99.5a

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Intel Corporation
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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
 
17
 * 02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef __NOTIFICATION_BACKEND_LIBNOTIFY_H
 
21
#define __NOTIFICATION_BACKEND_LIBNOTIFY_H
 
22
 
 
23
#ifdef HAVE_CONFIG_H
 
24
#include "config.h"
 
25
#endif
 
26
 
 
27
#if HAS_NOTIFY
 
28
 
 
29
#include "syncevo/declarations.h"
 
30
#include "NotificationBackendBase.h"
 
31
 
 
32
#include <libnotify/notify.h>
 
33
 
 
34
SE_BEGIN_CXX
 
35
 
 
36
class NotificationBackendLibnotify : public NotificationBackendBase {
 
37
    public:
 
38
        NotificationBackendLibnotify();
 
39
        virtual ~NotificationBackendLibnotify();
 
40
 
 
41
        /**
 
42
         * Callback for the notification action.
 
43
         */
 
44
        static void notifyAction(NotifyNotification *notify,
 
45
                                 gchar *action, gpointer userData);
 
46
 
 
47
        bool init();
 
48
 
 
49
        void publish(const std::string& summary, const std::string& body,
 
50
                     const std::string& viewParams = std::string());
 
51
 
 
52
    private:
 
53
        /**
 
54
         * Flag to indicate whether libnotify has been successfully
 
55
         * initialized.
 
56
         */
 
57
        bool m_initialized;
 
58
 
 
59
        /**
 
60
         * Flag to indicate whether libnotify accepts actions.
 
61
         */
 
62
        bool m_acceptsActions;
 
63
 
 
64
        /**
 
65
         * The current notification.
 
66
         */
 
67
        NotifyNotification *m_notification;
 
68
};
 
69
 
 
70
SE_END_CXX
 
71
 
 
72
#endif // HAS_NOTIFY
 
73
 
 
74
#endif // __NOTIFICATION_BACKEND_LIBNOTIFY_H
 
75