diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-08 01:01:52 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-08 01:01:52 +0800 |
commit | e7971bb4f5f1d262a3f3af99f81c221a724131da (patch) | |
tree | 9a27ea0d6eeda598771c40bea1b896a58d0bbe0f /shell/e-storage.h | |
parent | 6aac85ab5b50dc9e3cc454c37858755a564120c3 (diff) | |
download | gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar.gz gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar.bz2 gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar.lz gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar.xz gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.tar.zst gsoc2013-evolution-e7971bb4f5f1d262a3f3af99f81c221a724131da.zip |
Fixed a refcount leak and added interfaces to add/remove folders
from an EStorage (although they are not implemented yet).
svn path=/trunk/; revision=3460
Diffstat (limited to 'shell/e-storage.h')
-rw-r--r-- | shell/e-storage.h | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/shell/e-storage.h b/shell/e-storage.h index 478feef5a6..b144d0af5a 100644 --- a/shell/e-storage.h +++ b/shell/e-storage.h @@ -46,6 +46,18 @@ typedef struct _EStorage EStorage; typedef struct _EStoragePrivate EStoragePrivate; typedef struct _EStorageClass EStorageClass; +enum _EStorageResult { + E_STORAGE_OK, + E_STORAGE_NOTIMPLEMENTED, + E_STORAGE_NOTFOUND, + E_STORAGE_EXISTS, + E_STORAGE_IO, + E_STORAGE_UNSUPPORTEDTYPE +}; +typedef enum _EStorageResult EStorageResult; + +typedef void (* EStorageResultCallback) (EStorage *storage, EStorageResult result, void *data); + #include "e-folder.h" struct _EStorage { @@ -58,31 +70,51 @@ struct _EStorageClass { GtkObjectClass parent_class; /* Signals. */ + void * (* new_folder) (EStorage *storage, const char *path); void * (* removed_folder) (EStorage *storage, const char *path); /* Virtual methods. */ - GList * (* list_folders) (EStorage *storage, const char *path); - EFolder * (* get_folder) (EStorage *storage, const char *path); - const char * (* get_name) (EStorage *storage); -}; - -GtkType e_storage_get_type (void); -void e_storage_construct (EStorage *storage); -EStorage *e_storage_new (void); - -gboolean e_storage_path_is_relative (const char *path); -gboolean e_storage_path_is_absolute (const char *path); + GList * (* list_folders) (EStorage *storage, const char *path); + EFolder * (* get_folder) (EStorage *storage, const char *path); + const char * (* get_name) (EStorage *storage); -GList *e_storage_list_folders (EStorage *storage, const char *path); -EFolder *e_storage_get_folder (EStorage *storage, const char *path); + void (* create_folder) (EStorage *storage, const char *path, + const char *type, const char *description, + EStorageResultCallback callback, void *data); + void (* remove_folder) (EStorage *storage, const char *path, + EStorageResultCallback callback, void *data); +}; -const char *e_storage_get_name (EStorage *storage); + +GtkType e_storage_get_type (void); +void e_storage_construct (EStorage *storage); +EStorage *e_storage_new (void); +gboolean e_storage_path_is_relative (const char *path); +gboolean e_storage_path_is_absolute (const char *path); + +GList *e_storage_list_folders (EStorage *storage, const char *path); +EFolder *e_storage_get_folder (EStorage *storage, const char *path); + +const char *e_storage_get_name (EStorage *storage); + +/* Folder operations. */ + +void e_storage_create_folder (EStorage *storage, + const char *path, + const char *type, + const char *description, + EStorageResultCallback callback, + void *data); +void e_storage_remove_folder (EStorage *storage, + const char *path, + EStorageResultCallback callback, + void *data); /* Protected. C++ anyone? */ -gboolean e_storage_new_folder (EStorage *storage, const char *path, EFolder *folder); -gboolean e_storage_remove_folder (EStorage *storage, const char *path); +gboolean e_storage_new_folder (EStorage *storage, const char *path, EFolder *folder); +gboolean e_storage_removed_folder (EStorage *storage, const char *path); #ifdef __cplusplus } |