diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-03-22 20:47:16 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-03-22 20:47:16 +0800 |
commit | 03765ef0bb21fb7d98af1dd8d72a76e683a26a2f (patch) | |
tree | d78acece44e41498a8cb63c42bb5b483e87d67eb /shell | |
parent | 2282cef752462976015bffebcce0640457431309 (diff) | |
download | gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar.gz gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar.bz2 gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar.lz gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar.xz gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.tar.zst gsoc2013-evolution-03765ef0bb21fb7d98af1dd8d72a76e683a26a2f.zip |
Added an xfer method to `EStorage' and `GNOME::Evolution::Storage'.
svn path=/trunk/; revision=8894
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 16 | ||||
-rw-r--r-- | shell/Evolution-Storage.idl | 5 | ||||
-rw-r--r-- | shell/e-storage.c | 30 | ||||
-rw-r--r-- | shell/e-storage.h | 53 | ||||
-rw-r--r-- | shell/evolution-storage.c | 12 |
5 files changed, 99 insertions, 17 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index aa64a3df09..978a6c211e 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,21 @@ 2001-03-22 Ettore Perazzoli <ettore@ximian.com> + * e-storage.c (e_storage_async_xfer_folder): New. + (impl_async_xfer_folder): New, default implementation for the + `async_xfer_folder' method. + (class_init): Install it. + + * e-storage.h: New virtual method `async_xfer_folder'. + + * evolution-storage.c (impl_Storage_async_xfer_folder): New. Just + a stub for now. + (evolution_storage_get_epv): Install it as the implementation for + the `asyncXferFolder' method. + + * Evolution-Storage.idl: New method `asyncXferFolder'. + +2001-03-22 Ettore Perazzoli <ettore@ximian.com> + * e-storage-set-view.c: Removed `source_drag_types', `num_source_drag_types', `destination_drag_types', `num_destination_drag_types', `target_list'. diff --git a/shell/Evolution-Storage.idl b/shell/Evolution-Storage.idl index c0216e3ddd..9681d32be1 100644 --- a/shell/Evolution-Storage.idl +++ b/shell/Evolution-Storage.idl @@ -57,6 +57,11 @@ module Evolution { in string physical_uri, in Bonobo::Listener listener); + void asyncXferFolder (in string source_path, + in string destination_path, + in boolean remove_source, + in Bonobo::Listener listener); + void addListener (in StorageListener listener) raises (AlreadyListening); diff --git a/shell/e-storage.c b/shell/e-storage.c index e38c5e3fbf..f3c48fa97a 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -198,6 +198,17 @@ impl_async_remove_folder (EStorage *storage, (* callback) (storage, E_STORAGE_NOTIMPLEMENTED, data); } +static void +impl_async_xfer_folder (EStorage *storage, + const char *source_path, + const char *destination_path, + gboolean remove_source, + EStorageResultCallback callback, + void *data) +{ + (* callback) (storage, E_STORAGE_NOTIMPLEMENTED, data); +} + /* Initialization. */ @@ -216,6 +227,7 @@ class_init (EStorageClass *class) class->get_name = impl_get_name; class->async_create_folder = impl_async_create_folder; class->async_remove_folder = impl_async_remove_folder; + class->async_xfer_folder = impl_async_xfer_folder; signals[NEW_FOLDER] = gtk_signal_new ("new_folder", @@ -420,6 +432,24 @@ e_storage_async_remove_folder (EStorage *storage, (* ES_CLASS (storage)->async_remove_folder) (storage, path, callback, data); } +void +e_storage_async_xfer_folder (EStorage *storage, + const char *source_path, + const char *destination_path, + const gboolean remove_source, + EStorageResultCallback callback, + void *data) +{ + g_return_if_fail (storage != NULL); + g_return_if_fail (E_IS_STORAGE (storage)); + g_return_if_fail (source_path != NULL); + g_return_if_fail (g_path_is_absolute (source_path)); + g_return_if_fail (destination_path != NULL); + g_return_if_fail (g_path_is_absolute (destination_path)); + + (* ES_CLASS (storage)->async_xfer_folder) (storage, source_path, destination_path, remove_source, callback, data); +} + const char * e_storage_result_to_string (EStorageResult result) diff --git a/shell/e-storage.h b/shell/e-storage.h index a6716d7262..5a986a5b1a 100644 --- a/shell/e-storage.h +++ b/shell/e-storage.h @@ -84,11 +84,24 @@ struct _EStorageClass { EFolder * (* get_folder) (EStorage *storage, const char *path); const char * (* get_name) (EStorage *storage); - void (* async_create_folder) (EStorage *storage, const char *path, - const char *type, const char *description, - EStorageResultCallback callback, void *data); - void (* async_remove_folder) (EStorage *storage, const char *path, - EStorageResultCallback callback, void *data); + void (* async_create_folder) (EStorage *storage, + const char *path, + const char *type, + const char *description, + EStorageResultCallback callback, + void *data); + + void (* async_remove_folder) (EStorage *storage, + const char *path, + EStorageResultCallback callback, + void *data); + + void (* async_xfer_folder) (EStorage *storage, + const char *source_path, + const char *destination_path, + const gboolean remove_source, + EStorageResultCallback callback, + void *data); }; @@ -113,18 +126,24 @@ const char *e_storage_get_toplevel_node_type (EStorage *storage); /* Folder operations. */ -void e_storage_async_create_folder (EStorage *storage, - const char *path, - const char *type, - const char *description, - EStorageResultCallback callback, - void *data); -void e_storage_async_remove_folder (EStorage *storage, - const char *path, - EStorageResultCallback callback, - void *data); - -const char *e_storage_result_to_string (EStorageResult result); +void e_storage_async_create_folder (EStorage *storage, + const char *path, + const char *type, + const char *description, + EStorageResultCallback callback, + void *data); +void e_storage_async_remove_folder (EStorage *storage, + const char *path, + EStorageResultCallback callback, + void *data); +void e_storage_async_xfer_folder (EStorage *storage, + const char *source_path, + const char *destination_path, + const gboolean remove_source, + EStorageResultCallback callback, + void *data); + +const char *e_storage_result_to_string (EStorageResult result); /* Utility functions. */ diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index c3ffad319c..fd9bbc11d0 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -323,6 +323,17 @@ impl_Storage_async_remove_folder (PortableServer_Servant servant, } static void +impl_Storage_async_xfer_folder (PortableServer_Servant servant, + const CORBA_char *source_path, + const CORBA_char *destination_path, + const CORBA_boolean remove_source, + const Bonobo_Listener listener, + CORBA_Environment *ev) +{ + g_print ("FIXME: impl_Storage_async_xfer_folder -- implement me!\n"); +} + +static void impl_Storage_add_listener (PortableServer_Servant servant, const GNOME_Evolution_StorageListener listener, CORBA_Environment *ev) @@ -510,6 +521,7 @@ evolution_storage_get_epv (void) epv->_get_name = impl_Storage__get_name; epv->asyncCreateFolder = impl_Storage_async_create_folder; epv->asyncRemoveFolder = impl_Storage_async_remove_folder; + epv->asyncXferFolder = impl_Storage_async_xfer_folder; epv->addListener = impl_Storage_add_listener; epv->removeListener = impl_Storage_remove_listener; |