Add store protocol to the data obtained in DBUS GetUnreadMessages
[modest] / libmodest-dbus-client / src / libmodest-dbus-client.h
index d196b17..5ffa393 100644 (file)
@@ -119,6 +119,18 @@ gboolean libmodest_dbus_client_send_and_receive_full (osso_context_t *osso_conte
                                                      const gchar *account,
                                                      gboolean manual);
 
+/**
+ * libmodest_dbus_client_update_folder_counts:
+ * @osso_context: a valid osso_context instance
+ * @account: the account name
+ *
+ * updates folder counts of @account.
+ *
+ * Returns: %TRUE upon success, %FALSE otherwise
+ */
+gboolean libmodest_dbus_client_update_folder_counts (osso_context_t *osso_context,
+                                                    const gchar *account);
+
 
 
 /**
@@ -192,6 +204,7 @@ typedef struct {
 } ModestSearchHit;
 
 
+void modest_account_hits_list_free (GList *account_hits);
 void modest_search_hit_list_free (GList *hits);
 
 
@@ -204,6 +217,25 @@ 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;
+       gchar *store_protocol;
+       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);