Fix typo, thanks wwp!
[claws.git] / src / plugins / notification / notification_core.h
1 /* Notification plugin for Claws-Mail
2  * Copyright (C) 2005-2007 Holger Berndt
3  *
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.
8  *
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.
13  *
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/>.
16  */
17
18 #ifndef NOTIFICATION_CORE_H
19 #define NOTIFICATION_CORE_H NOTIFICATION_CORE_H
20
21 #include "mainwindow.h"
22 #include "folder.h"
23 #include "procmsg.h"
24
25 typedef struct {
26   gchar *from;
27   gchar *subject;
28   FolderItem *folder_item;
29   gchar *folderitem_name;
30         MsgInfo *msginfo;
31 } CollectedMsg;
32
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;
40
41 typedef struct 
42 {
43   guint new_msgs;
44   guint unread_msgs;
45   guint unreadmarked_msgs;
46   guint marked_msgs;
47   guint total_msgs;
48 } NotificationMsgCount;
49
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*);
53
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);
62
63 void     notification_show_mainwindow(MainWindow *mainwin);
64 /* folder type specific settings */
65 gboolean notify_include_folder_type(FolderType, gchar*);
66
67 void notification_toggle_hide_show_window(void);
68
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
78
79 #endif /* NOTIFICATION_CORE_H */