aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-folder.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/e-folder.c
parent4700cd0784eb9eef49ada22323f6a2060aa63dd6 (diff)
downloadgsoc2013-evolution-a3a512a3e5756adb9b5ec097b4e97a7c373a90bd.tar.gz
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/e-folder.c')
-rw-r--r--shell/e-folder.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/shell/e-folder.c b/shell/e-folder.c
index 3c2669f0bd..6f78e48db3 100644
--- a/shell/e-folder.c
+++ b/shell/e-folder.c
@@ -391,6 +391,15 @@ e_folder_get_can_sync_offline (EFolder *folder)
/* Gotta love CORBA. */
+static CORBA_char *
+safe_corba_string_dup (const char *s)
+{
+ if (s == NULL)
+ return CORBA_string_dup ("");
+
+ return CORBA_string_dup (s);
+}
+
void
e_folder_to_corba (EFolder *folder,
const char *evolution_uri,
@@ -399,11 +408,11 @@ e_folder_to_corba (EFolder *folder,
g_return_if_fail (E_IS_FOLDER (folder));
g_return_if_fail (folder_return != NULL);
- folder_return->type = e_safe_corba_string_dup (e_folder_get_type_string (folder));
- folder_return->description = e_safe_corba_string_dup (e_folder_get_description (folder));
- folder_return->displayName = e_safe_corba_string_dup (e_folder_get_name (folder));
- folder_return->physicalUri = e_safe_corba_string_dup (e_folder_get_physical_uri (folder));
- folder_return->evolutionUri = e_safe_corba_string_dup (evolution_uri);
+ folder_return->type = safe_corba_string_dup (e_folder_get_type_string (folder));
+ folder_return->description = safe_corba_string_dup (e_folder_get_description (folder));
+ folder_return->displayName = safe_corba_string_dup (e_folder_get_name (folder));
+ folder_return->physicalUri = safe_corba_string_dup (e_folder_get_physical_uri (folder));
+ folder_return->evolutionUri = safe_corba_string_dup (evolution_uri);
folder_return->unreadCount = e_folder_get_unread_count (folder);
folder_return->canSyncOffline = e_folder_get_can_sync_offline (folder);
}