aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-10-01 02:41:05 +0800
committerDan Winship <danw@src.gnome.org>2002-10-01 02:41:05 +0800
commit45fd1767502d711d72087cae76c3d1acd7f46066 (patch)
tree78efae6fd605a5e867fe7b0f24ae8fb9dbce9443 /shell/e-storage.c
parentb887e5c2f6fdb8e7437093c3bc49fd439155e346 (diff)
downloadgsoc2013-evolution-45fd1767502d711d72087cae76c3d1acd7f46066.tar.gz
gsoc2013-evolution-45fd1767502d711d72087cae76c3d1acd7f46066.tar.zst
gsoc2013-evolution-45fd1767502d711d72087cae76c3d1acd7f46066.zip
Calls e_shell_command_remove_shared_folder. (file_verbs): Set up
* e-shell-view-menu.c (command_remove_other_users_folder): Calls e_shell_command_remove_shared_folder. (file_verbs): Set up command_remove_other_users_folder. * e-shell-folder-commands.c (e_shell_command_remove_shared_folder): New. Calls e_storage_set_async_remove_shared_folder with a callback to pop up an error dialog if it fails. * e-storage-set.c (e_storage_set_async_remove_shared_folder): Implement. Mostly like async_remove_folder. * e-storage.c (e_storage_supports_shared_folders, e_storage_async_discover_shared_folder, e_storage_async_remove_shared_folder): New methods. Default implementations return FALSE, NOTIMPLEMENTED, and NOTIMPLEMENTED. * e-corba-storage.c (supports_shared_folders, async_discover_shared_folder, async_remove_shared_folder): Implement using CORBA. * Evolution-Storage.idl: add Storage_asyncRemoveSharedFolder * e-shell-shared-folder-picker-dialog.c: Remove all the CORBA stuff from here and use the new EStorage methods. (setup_server_option_menu): Use e_storage_supports_shared_folders. (discover_folder): Use e_storage_async_discover_shared_folder. * evolution-storage.c (impl_Storage_asyncRemoveSharedFolder): Implement this by emitting a REMOVE_SHARED_FOLDER signal. (impl_Storage_asyncDiscoverSharedFolder): Make the DISCOVER_SHARED_FOLDER signal put the Bonobo_Listener first like all the other signals do. (class_init): Set up REMOVE_SHARED_FOLDER signal. svn path=/trunk/; revision=18265
Diffstat (limited to 'shell/e-storage.c')
-rw-r--r--shell/e-storage.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/shell/e-storage.c b/shell/e-storage.c
index df8a21faa1..6be864ffa9 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -231,6 +231,31 @@ impl_async_open_folder (EStorage *storage,
;
}
+static gboolean
+impl_supports_shared_folders (EStorage *storage)
+{
+ return FALSE;
+}
+
+static void
+impl_async_discover_shared_folder (EStorage *storage,
+ const char *owner,
+ const char *folder_name,
+ EStorageDiscoveryCallback callback,
+ void *data)
+{
+ (* callback) (storage, E_STORAGE_NOTIMPLEMENTED, NULL, data);
+}
+
+static void
+impl_async_remove_shared_folder (EStorage *storage,
+ const char *path,
+ EStorageResultCallback callback,
+ void *data)
+{
+ (* callback) (storage, E_STORAGE_NOTIMPLEMENTED, data);
+}
+
/* Initialization. */
@@ -252,6 +277,10 @@ class_init (EStorageClass *class)
class->async_xfer_folder = impl_async_xfer_folder;
class->async_open_folder = impl_async_open_folder;
+ class->supports_shared_folders = impl_supports_shared_folders;
+ class->async_discover_shared_folder = impl_async_discover_shared_folder;
+ class->async_remove_shared_folder = impl_async_remove_shared_folder;
+
signals[NEW_FOLDER] =
gtk_signal_new ("new_folder",
GTK_RUN_FIRST,
@@ -478,6 +507,47 @@ e_storage_async_open_folder (EStorage *storage,
}
+/* Shared folders. */
+
+gboolean
+e_storage_supports_shared_folders (EStorage *storage)
+{
+ g_return_val_if_fail (storage != NULL, FALSE);
+ g_return_val_if_fail (E_IS_STORAGE (storage), FALSE);
+
+ return (* ES_CLASS (storage)->supports_shared_folders) (storage);
+}
+
+void
+e_storage_async_discover_shared_folder (EStorage *storage,
+ const char *owner,
+ const char *folder_name,
+ EStorageDiscoveryCallback callback,
+ void *data)
+{
+ g_return_if_fail (storage != NULL);
+ g_return_if_fail (E_IS_STORAGE (storage));
+ g_return_if_fail (owner != NULL);
+ g_return_if_fail (folder_name != NULL);
+
+ (* ES_CLASS (storage)->async_discover_shared_folder) (storage, owner, folder_name, callback, data);
+}
+
+void
+e_storage_async_remove_shared_folder (EStorage *storage,
+ const char *path,
+ EStorageResultCallback callback,
+ void *data)
+{
+ g_return_if_fail (storage != NULL);
+ g_return_if_fail (E_IS_STORAGE (storage));
+ g_return_if_fail (path != NULL);
+ g_return_if_fail (g_path_is_absolute (path));
+
+ (* ES_CLASS (storage)->async_remove_shared_folder) (storage, path, callback, data);
+}
+
+
const char *
e_storage_result_to_string (EStorageResult result)
{