diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/Makefile.am | 2 | ||||
-rw-r--r-- | camel/camel-folder.c | 13 | ||||
-rw-r--r-- | camel/camel-folder.h | 17 | ||||
-rw-r--r-- | camel/camel-log.h | 8 |
4 files changed, 29 insertions, 11 deletions
diff --git a/camel/Makefile.am b/camel/Makefile.am index 2e8d987404..4c21006c82 100644 --- a/camel/Makefile.am +++ b/camel/Makefile.am @@ -14,11 +14,13 @@ INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \ libcamel_la_SOURCES = \ camel-log.c \ camel-folder.c \ + camel-store.c \ gstring-util.c libcamelinclude_HEADERS = \ camel-log.h \ camel-folder.h \ + camel-store.h \ gstring-util.h diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 93b91f94b0..8e0660c160 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -66,7 +66,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) GtkType -gnome_camel_get_type (void) +camel_folder_get_type (void) { static GtkType camel_folder_type = 0; @@ -278,13 +278,12 @@ camel_folder_create(CamelFolder *folder) CamelFolder *parent; gchar sep; -#warning Finish it when CamelStore is done - /*g_assert(folder->parent_store);*/ + g_assert(folder->parent_store); g_assert(folder->name); if ( CF_CLASS(folder)->exists(folder) ) return; - /* sep = camel_store_get_separator(folder->parent_store); */ + sep = camel_store_get_separator(folder->parent_store); if (folder->parent_folder) camel_folder_create(folder->parent_folder); else { if (folder->full_name) { @@ -293,9 +292,11 @@ camel_folder_create(CamelFolder *folder) g_warning("I have to handle the case where the path is not OK\n"); return; } else { +#warning Public method not implemented yet !!! + parent = camel_store_get_folder(folder->parent_store, prefix); + camel_folder_create(parent); +#warning Finish it when CamelStore is done /* - parent = camel_store_get_folder(folder->parentStore,prefix); - camel_folder_create(parent); [parent free]; */ } diff --git a/camel/camel-folder.h b/camel/camel-folder.h index 12855a054c..b97bf970d9 100644 --- a/camel/camel-folder.h +++ b/camel/camel-folder.h @@ -32,7 +32,7 @@ extern "C" { #endif /* __cplusplus }*/ #include <gtk/gtk.h> - +#include "camel-store.h" #define CAMEL_FOLDER_TYPE (camel_folder_get_type ()) #define CAMEL_FOLDER(obj) (GTK_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder)) @@ -50,8 +50,18 @@ typedef enum { FOLDER_OPEN_READ_WRITE /* folder is read/write */ } CamelFolderOpenMode; - +#ifndef CAMEL_FOLDER_DEF +#define CAMEL_FOLDER_DEF 1 typedef struct _CamelFolder CamelFolder; +#endif /* CAMEL_FOLDER_DEF */ + +#ifndef CAMEL_STORE_DEF +#define CAMEL_STORE_DEF 1 +typedef struct _CamelStore CamelStore; +#endif /* CAMEL_STORE_DEF */ + + + struct _CamelFolder { @@ -65,8 +75,7 @@ struct _CamelFolder CamelFolderState open_state; GString *name; GString *full_name; -#warning uncomment when CamelStore is done - /*CamelStore *parent_store;*/ + CamelStore *parent_store; CamelFolder *parent_folder; diff --git a/camel/camel-log.h b/camel/camel-log.h index fd96461258..2e68fdc770 100644 --- a/camel/camel-log.h +++ b/camel/camel-log.h @@ -35,7 +35,13 @@ typedef enum { NO_LOG = 0, FULL_DEBUG = 10 } CamelLogLevel; - + +/* the goal here is to be able to have a hard maximum log +level, given at compilation time, and a soft one, given at +runtime (with camel_debug_level). For the moment, only +soft level is implmented, but one day, when performance +become important, I will set the hard one too */ + #define CAMEL_LOG(level, args...) camel_log(level,##args) extern void camel_log(CamelLogLevel level, const gchar *format, ... ); |