aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@inria.fr>1999-04-19 04:24:26 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-04-19 04:24:26 +0800
commitcaeedddbe6297eda63b386a8955546b41d6543bf (patch)
treeffe51d1cd4f469ef6bd707d1178a2de94bfb995c
parentb6df9d55cb6d3b348c831f4591398a0acc8247d9 (diff)
downloadgsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar.gz
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar.bz2
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar.lz
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar.xz
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.tar.zst
gsoc2013-evolution-caeedddbe6297eda63b386a8955546b41d6543bf.zip
started implementation typo uncommented the store related code.
1999-04-18 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-store.[ch]: started implementation * camel/camel-folder.c (camel_folder_get_type): typo uncommented the store related code. (camel_folder_create): enable som store relted code. Not finished. Have to define public methods first. * camel/camel-log.h: some explanation about the log system svn path=/trunk/; revision=854
-rw-r--r--ChangeLog11
-rw-r--r--camel/Makefile.am2
-rw-r--r--camel/camel-folder.c13
-rw-r--r--camel/camel-folder.h17
-rw-r--r--camel/camel-log.h8
5 files changed, 40 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 77121e659a..e8bb233bd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+1999-04-18 bertrand <Bertrand.Guiheneuf@inria.fr>
+
+ * camel/camel-store.[ch]: started implementation
+ * camel/camel-folder.c (camel_folder_get_type): typo
+ uncommented the store related code.
+ (camel_folder_create): enable som store relted code.
+ Not finished. Have to define public methods first.
+
+ * camel/camel-log.h: some explanation about the
+ log system
+
1999-04-18 bertrand <Bertrand.Guiheneuf@inria.fr>
* camel/camel-folder.c:
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, ... );