diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-09-13 02:43:04 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-09-13 02:43:04 +0800 |
commit | 1ed7208ad8a498d2c8a5014ec60c25c01a660e55 (patch) | |
tree | 298e3b446623441da888e9e558f08f40383c7c51 /camel/providers/local/camel-local-store.c | |
parent | d4690814e8ad33979e6c5a6a86eb42f5c83a29ba (diff) | |
download | gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar.gz gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar.bz2 gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar.lz gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar.xz gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.tar.zst gsoc2013-evolution-1ed7208ad8a498d2c8a5014ec60c25c01a660e55.zip |
Implements CamelLocalFolder::get_full_path() (publicly namespaced so that
2003-09-12 Jeffrey Stedfast <fejj@ximian.com>
* providers/local/camel-mbox-folder.c
(camel_mbox_folder_get_full_path): Implements
CamelLocalFolder::get_full_path() (publicly namespaced so that
CamelMboxStore can re-use them).
(camel_mbox_folder_get_meta_path): Same.
* providers/local/camel-mbox-store.c (get_folder): Changed the way
the path is constructed, since we now handle subdirectories and
stuff.
(delete_folder): Try deleting the Folder.sbd directory. We also
need to manage our own meta files since CamelLocalStore's impl
constructs paths differently than what we need.
(create_folder): Implemented.
(rename_folder): Implemented.
(scan_dir): Scan an mbox tree
(get_folder_info): Implemented using scan_dir().
* providers/local/camel-local-store.c (delete_folder): Set fi->url
to the correct value, meaning we need to prefix it with the
protocol and the folder_name is not actually part of the path, it
is a separate component to the url.
* providers/local/camel-local-folder.c
(camel_local_folder_construct): Use the new class virtual method
to construct the full folder path and all the meta files.
(local_get_full_path): Implemented default get_full_path method.
(local_get_meta_path): Implemented default get_meta_path method.
svn path=/trunk/; revision=22557
Diffstat (limited to 'camel/providers/local/camel-local-store.c')
-rw-r--r-- | camel/providers/local/camel-local-store.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c index 18226d968c..78a3bedcb0 100644 --- a/camel/providers/local/camel-local-store.c +++ b/camel/providers/local/camel-local-store.c @@ -50,7 +50,6 @@ static void construct (CamelService *service, CamelSession *session, CamelProvid static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex); static char *get_name(CamelService *service, gboolean brief); static CamelFolder *get_inbox (CamelStore *store, CamelException *ex); -static void rename_folder(CamelStore *store, const char *old_name, const char *new_name, CamelException *ex); static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex); static void delete_folder(CamelStore *store, const char *folder_name, CamelException *ex); static void rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex); @@ -207,7 +206,7 @@ get_folder_info (CamelStore *store, const char *top, * there before. */ - d(printf("-- LOCAL STRE -- get folder info: %s\n", top)); + d(printf("-- LOCAL STORE -- get folder info: %s\n", top)); return NULL; } @@ -407,12 +406,12 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex) fi = g_new0 (CamelFolderInfo, 1); fi->full_name = g_strdup (folder_name); fi->name = g_path_get_basename (folder_name); - fi->url = g_strdup_printf ("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); + fi->url = g_strdup_printf ("%s:%s#%s", ((CamelService *) store)->url->protocol, + CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); fi->unread_message_count = -1; camel_folder_info_build_path(fi, '/'); - - camel_object_trigger_event (CAMEL_OBJECT (store), - "folder_deleted", fi); + + camel_object_trigger_event (store, "folder_deleted", fi); camel_folder_info_free (fi); } |