notifier.h 2.22 KB
Newer Older
1
/*
2
 *  Copyright (C) 2015-2019 Savoir-faire Linux Inc.
3
 *  Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4
 *  Author: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
 */

21 22
#ifndef NOTIFY_H_
#define NOTIFY_H_
23

24
#include <gtk/gtk.h>
25
#include <string>
26 27

G_BEGIN_DECLS
28 29 30 31 32
#define NOTIFIER_TYPE            (notifier_get_type ())
#define NOTIFIER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOTIFIER_TYPE, Notifier))
#define NOTIFIER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), NOTIFIER_TYPE, NotifierClass))
#define IS_NOTIFIER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), NOTIFIER_TYPE))
#define IS_NOTIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NOTIFIER_TYPE))
33

34 35
typedef struct _Notifier      Notifier;
typedef struct _NotifierClass NotifierClass;
36 37 38 39 40 41 42 43

enum class NotificationType
{
    CALL,
    REQUEST,
    CHAT
};

44 45
GType      notifier_get_type             (void) G_GNUC_CONST;
GtkWidget* notifier_new                  (void);
46

47
gboolean    show_notification(Notifier* view,
48 49 50 51 52 53 54
                                   const std::string& icon,
                                   const std::string& uri,
                                   const std::string& name,
                                   const std::string& id,
                                   const std::string& title,
                                   const std::string& body,
                                   NotificationType type);
55
gboolean    hide_notification(Notifier* view, const std::string& id);
56 57 58

G_END_DECLS

59
#endif /* NOTIFY_H_ */