add support for Ayatana indicator to Notification plugin
[claws.git] / src / plugins / notification / notification_core.h
blobd3efc16d552be34aee2c22cb535cae0b5297496e
1 /* Notification plugin for Claws Mail
2 * Copyright (C) 2005-2007 Holger Berndt
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef NOTIFICATION_CORE_H
19 #define NOTIFICATION_CORE_H NOTIFICATION_CORE_H
21 #include "mainwindow.h"
22 #include "folder.h"
23 #include "procmsg.h"
25 typedef struct {
26 gchar *from;
27 gchar *subject;
28 FolderItem *folder_item;
29 gchar *folderitem_name;
30 MsgInfo *msginfo;
31 } CollectedMsg;
33 typedef enum {
34 F_TYPE_MAIL=0,
35 F_TYPE_NEWS,
36 F_TYPE_CALENDAR,
37 F_TYPE_RSS,
38 F_TYPE_LAST
39 } NotificationFolderType;
41 typedef struct
43 guint new_msgs;
44 guint unread_msgs;
45 guint unreadmarked_msgs;
46 guint marked_msgs;
47 guint total_msgs;
48 } NotificationMsgCount;
50 /* Collect new and possibly unread messages in all folders */
51 GSList* notification_collect_msgs(gboolean, GSList*, gint);
52 void notification_collected_msgs_free(GSList*);
54 void notification_core_global_includes_changed(void);
55 void notification_core_free(void);
56 void notification_update_msg_counts(FolderItem*);
57 void notification_core_get_msg_count(GSList*,NotificationMsgCount*);
58 void notification_core_get_msg_count_of_foldername(gchar*, NotificationMsgCount*);
59 void notification_new_unnotified_msgs(FolderItemUpdateData*);
60 gboolean notification_notified_hash_msginfo_update(MsgInfoUpdate*);
61 void notification_notified_hash_startup_init(void);
63 void notification_show_mainwindow(MainWindow *mainwin);
64 /* folder type specific settings */
65 gboolean notify_include_folder_type(FolderType, gchar*);
67 void notification_toggle_hide_show_window(void);
69 #ifdef HAVE_LIBNOTIFY
70 /* Sanitize a string to use with libnotify. Returns a freshly
71 * allocated string that must be freed by the user. */
72 gchar* notification_libnotify_sanitize_str(gchar*);
73 /* Returns a freshly allocated copy of the input string, which
74 * is guaranteed to be valid UTF8. The returned string has to
75 * be freed. */
76 gchar* notification_validate_utf8_str(gchar*);
77 #endif
79 #endif /* NOTIFICATION_CORE_H */