* src/modest-init.c:
[modest] / src / gnome / modest-platform.c
index 5e78371..03baeba 100644 (file)
 #include "gnome/modest-gnome-global-settings-dialog.h"
 
 gboolean
-modest_platform_init (void)
+modest_platform_init (int argc, char *argv[])
 {      
        return TRUE; /* nothing to do */
 }
 
 
+gboolean modest_platform_uninit (void)
+{
+       return TRUE; /*nothing to do */
+}
+
+
 TnyDevice*
 modest_platform_get_new_device (void)
 {
@@ -85,21 +91,21 @@ modest_platform_get_file_icon_name (const gchar* name, const gchar* mime_type,
 gboolean 
 modest_platform_activate_uri (const gchar *uri)
 {
-       modest_runtime_not_implemented (NULL);
+       g_message ("NOT IMPLEMENTED");;
        return FALSE;
 }
 
 gboolean 
-modest_platform_activate_file (const gchar *path)
+modest_platform_activate_file (const gchar *path, const gchar *mime_type)
 {
-       modest_runtime_not_implemented (NULL);
+       g_message ("NOT IMPLEMENTED");;
        return FALSE;
 }
 
 gboolean 
 modest_platform_show_uri_popup (const gchar *uri)
 {
-       modest_runtime_not_implemented (NULL);
+       g_message ("NOT IMPLEMENTED");;
        return FALSE;
 }
 
@@ -183,7 +189,14 @@ modest_platform_run_information_dialog (GtkWindow *parent_window,
        /* TODO: implement a information dialog */
 }
 
-gboolean modest_platform_connect_and_wait (GtkWindow *parent_window)
+gboolean modest_platform_connect_and_wait (GtkWindow *parent_window, TnyAccount *account)
+{
+       /* TODO: Do something with network-manager? 
+          Otherwise, maybe it is safe to assume that we would already be online if we could be. */
+       return TRUE;
+}
+
+gboolean modest_platform_connect_and_wait_if_network_account (GtkWindow *parent_window, TnyAccount *account)
 {
        /* TODO: Do something with network-manager? 
           Otherwise, maybe it is safe to assume that we would already be online if we could be. */
@@ -209,8 +222,9 @@ modest_platform_get_global_settings_dialog ()
        return modest_gnome_global_settings_dialog_new ();
 }
 
+
 void 
-modest_platform_on_new_msg (void)
+modest_platform_on_new_headers_received (TnyList *header_list)
 {
        /* TODO: implement this */
        g_print ("--------------- NEW MESSAGE ARRIVED ---------------\n");
@@ -218,8 +232,121 @@ modest_platform_on_new_msg (void)
 
 
 
+void
+modest_platform_show_help (GtkWindow *parent_window, const gchar *help_id)
+{
+       return; /* TODO */
+}
+
+void 
+modest_platform_information_banner (GtkWidget *widget,
+                                   const gchar *icon_name,
+                                   const gchar *text)
+{
+       g_message ("NOT IMPLEMENTED");;
+}
+
+GtkWidget *
+modest_platform_animation_banner (GtkWidget *widget,
+                                 const gchar *icon_name,
+                                 const gchar *text)
+{
+       g_message ("NOT IMPLEMENTED");
+       return NULL;
+}
+
+
+void
+modest_platform_show_search_messages (GtkWindow *parent_window)
+{
+       g_message ("NOT IMPLEMENTED");;
+}
+
+GtkWidget *
+modest_platform_create_folder_view (TnyFolderStoreQuery *query)
+{
+       GtkWidget *widget = modest_folder_view_new (query);
+
+       /* Show all accounts by default */
+       modest_folder_view_set_style (MODEST_FOLDER_VIEW (widget),
+                                     MODEST_FOLDER_VIEW_STYLE_SHOW_ALL);
+
+       return widget;
+}
+
 gboolean
-modest_platform_show_help (GtkWidget *widget, const gchar *help_id)
+modest_platform_run_alert_dialog (const gchar* prompt, 
+                                 gboolean is_question)
 {
-       return TRUE; /* TODO */
+       /* TODO */
+       return TRUE;
 }
+
+void 
+modest_platform_connect_and_perform (GtkWindow *parent_window, 
+                                    TnyAccount *account, 
+                                    ModestConnectedPerformer callback, 
+                                    gpointer user_data)
+{
+       if (callback)
+               callback (FALSE, NULL, parent_window, account, user_data);
+}
+
+void 
+modest_platform_connect_and_perform_if_network_account (GtkWindow *parent_window, 
+                                                       TnyAccount *account,
+                                                       ModestConnectedPerformer callback, 
+                                                       gpointer user_data)
+{
+       if (callback)
+               callback (FALSE, NULL, parent_window, account, user_data);
+}
+
+void
+modest_platform_connect_and_perform_if_network_folderstore (GtkWindow *parent_window, 
+                                                           TnyFolderStore *folder_store, 
+                                                           ModestConnectedPerformer callback, 
+                                                           gpointer user_data)
+{
+       if (callback)
+               callback (FALSE, NULL, parent_window, NULL, user_data);
+}
+
+
+void 
+modest_platform_remove_new_mail_notifications (void)
+{
+       g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+gboolean 
+modest_platform_check_and_wait_for_account_is_online(TnyAccount *account)
+{
+       g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+       return TRUE;
+}
+
+gboolean 
+modest_platform_run_certificate_confirmation_dialog (const gchar* server_name,
+                                                    const gchar *certificate)
+{
+       g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+       return TRUE;
+}
+
+gint
+modest_platform_run_rename_folder_dialog (GtkWindow *parent_window,
+                                          TnyFolderStore *parent_folder,
+                                          const gchar *suggested_name,
+                                          gchar **folder_name)
+{
+       g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+       return GTK_RESPONSE_CANCEL;
+}
+
+void 
+modest_platform_show_addressbook (GtkWindow *parent_window)
+{
+       g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+