New method to fetch unread messages with dbus
[modest] / libmodest-dbus-client / src / libmodest-dbus-client.h
index 33c7c56..145924e 100644 (file)
@@ -204,6 +204,7 @@ typedef struct {
 } ModestSearchHit;
 
 
+void modest_account_hits_list_free (GList *account_hits);
 void modest_search_hit_list_free (GList *hits);
 
 
@@ -216,6 +217,24 @@ gboolean libmodest_dbus_client_search            (osso_context_t          *osso_
                                                  ModestDBusSearchFlags    flags,
                                                  GList                  **hits);
 
+typedef struct {
+       gchar *subject;
+       time_t timestamp;
+} ModestGetUnreadMessagesHit;
+
+typedef struct {
+       gchar *account_id;
+       gchar *account_name;
+       GList *hits;
+} ModestAccountHits;
+
+/**
+ * this method returns in account_hit_list a list of #ModestAccountHits.
+ */
+gboolean libmodest_dbus_client_get_unread_messages (osso_context_t *osso_ctx,
+                                                   gint msgs_per_account,
+                                                   GList **account_hits_list);
+
 gboolean libmodest_dbus_client_delete_message   (osso_context_t   *osso_ctx,
                                                 const char       *msg_uri);