aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-index.h
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-09-24 09:16:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-09-24 09:16:12 +0800
commita65c7bb4769b16dda87c1bdf2cb06784b4090d4a (patch)
tree8e77d9424cf98f558b57a1174c621bb014740ec8 /camel/camel-index.h
parent5ca425852cab78a782c1b354555f7c9c380d8e02 (diff)
downloadgsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.gz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.bz2
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.lz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.xz
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.tar.zst
gsoc2013-evolution-a65c7bb4769b16dda87c1bdf2cb06784b4090d4a.zip
If we have no data written to a key, dont add it, or its partition header.
2002-09-24 Not Zed <NotZed@Ximian.com> * camel-text-index.c (text_index_compress_nosync): If we have no data written to a key, dont add it, or its partition header. 2002-09-23 Not Zed <NotZed@Ximian.com> * camel-block-file.c (sync_nolock): Mark root block dirty if we're going to sync it. (camel_key_file_finalise): de-count the active list if we close it. * camel-text-index.c (text_index_delete): Implement. (text_index_compress_nosync): Use index_delete when we're finished with the old one, so it is properly deactivated. * camel-index.c (camel_index_delete): Remove api call. Mark index deleted in new state variable. (camel_index_*): Wrap all calls in check for deleted state. svn path=/trunk/; revision=18189
Diffstat (limited to 'camel/camel-index.h')
-rw-r--r--camel/camel-index.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/camel/camel-index.h b/camel/camel-index.h
index 81b84c3d38..0382dc1d0d 100644
--- a/camel/camel-index.h
+++ b/camel/camel-index.h
@@ -110,7 +110,8 @@ struct _CamelIndex {
char *path;
guint32 version;
- guint32 flags;
+ guint32 flags; /* open flags */
+ guint32 state;
CamelIndexNorm normalise;
void *normalise_data;
@@ -121,6 +122,7 @@ struct _CamelIndexClass {
int (*sync)(CamelIndex *idx);
int (*compress)(CamelIndex *idx);
+ int (*delete)(CamelIndex *idx);
int (*rename)(CamelIndex *idx, const char *path);
@@ -135,6 +137,9 @@ struct _CamelIndexClass {
CamelIndexCursor * (*names)(CamelIndex *idx);
};
+/* flags, stored in 'state', set with set_state */
+#define CAMEL_INDEX_DELETED (1<<0)
+
CamelType camel_index_get_type (void);
CamelIndex *camel_index_new(const char *path, int flags);
@@ -145,6 +150,7 @@ void camel_index_set_normalise(CamelIndex *idx, CamelIndexNorm fun
int camel_index_sync(CamelIndex *idx);
int camel_index_compress(CamelIndex *idx);
+int camel_index_delete(CamelIndex *idx);
int camel_index_has_name(CamelIndex *idx, const char *name);
CamelIndexName *camel_index_add_name(CamelIndex *idx, const char *name);