aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-storage.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-09 03:01:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-09 03:01:37 +0800
commita3a512a3e5756adb9b5ec097b4e97a7c373a90bd (patch)
tree3d840e91f54dcc2f62495ddedba352adaf1c913e /shell/evolution-storage.c
parent4700cd0784eb9eef49ada22323f6a2060aa63dd6 (diff)
downloadgsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.gz
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.bz2
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.lz
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.xz
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.zst
gsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.zip
New helper function. (e_folder_to_corba): Use it here.
* e-folder.c (safe_corba_string_dup): New helper function. (e_folder_to_corba): Use it here. * Makefile.am (libeshell_la_SOURCES): Move e-folder.c here, from evolution_SOURCES. (eshellinclude_HEADERS): Likewise, move e-folder.h here. * evolution-storage.c (impl_Storage_getFolderAtPath): New, implementation for Evoluiton::Storage::getFolderAtPath. (evolution_storage_get_epv): Install CORBA method here. * Evolution-Storage.idl (getFolderAtPath): New method in Evolution::Storage. svn path=/trunk/; revision=17383
Diffstat (limited to 'shell/evolution-storage.c')
-rw-r--r--shell/evolution-storage.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c
index 6648f61434..ebc514f774 100644
--- a/shell/evolution-storage.c
+++ b/shell/evolution-storage.c
@@ -33,6 +33,7 @@
#include "Evolution.h"
+#include "e-folder.h"
#include "e-folder-tree.h"
#include "evolution-storage.h"
@@ -271,6 +272,33 @@ impl_Storage__get_hasSharedFolders (PortableServer_Servant servant,
return priv->has_shared_folders;
}
+static GNOME_Evolution_Folder *
+impl_Storage_getFolderAtPath (PortableServer_Servant servant,
+ const CORBA_char *path,
+ CORBA_Environment *ev)
+{
+ BonoboObject *bonobo_object;
+ EvolutionStorage *storage;
+ EvolutionStoragePrivate *priv;
+ EFolder *folder;
+ GNOME_Evolution_Folder *corba_folder;
+
+ bonobo_object = bonobo_object_from_servant (servant);
+ storage = EVOLUTION_STORAGE (bonobo_object);
+ priv = storage->priv;
+
+ folder = e_folder_tree_get_folder (priv->folder_tree, path);
+ if (folder == NULL) {
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Storage_NotFound, NULL);
+ return NULL;
+ }
+
+ corba_folder = GNOME_Evolution_Folder__alloc ();
+ e_folder_to_corba (folder, "", corba_folder);
+
+ return corba_folder;
+}
+
static void
get_folder_list_foreach (EFolderTree *tree,
const char *path,
@@ -699,6 +727,7 @@ evolution_storage_get_epv (void)
epv = g_new0 (POA_GNOME_Evolution_Storage__epv, 1);
epv->_get_name = impl_Storage__get_name;
epv->_get_hasSharedFolders = impl_Storage__get_hasSharedFolders;
+ epv->getFolderAtPath = impl_Storage_getFolderAtPath;
epv->_get_folderList = impl_Storage__get_folderList;
epv->asyncCreateFolder = impl_Storage_asyncCreateFolder;
epv->asyncRemoveFolder = impl_Storage_asyncRemoveFolder;