aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream-mem.h')
-rw-r--r--camel/camel-stream-mem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/camel/camel-stream-mem.h b/camel/camel-stream-mem.h
index af51c36ff7..ba01e950ad 100644
--- a/camel/camel-stream-mem.h
+++ b/camel/camel-stream-mem.h
@@ -45,7 +45,8 @@ typedef struct _CamelStreamMemClass CamelStreamMemClass;
struct _CamelStreamMem {
CamelSeekableStream parent_object;
- gboolean owner; /* do we own the buffer? */
+ unsigned int owner:1; /* do we own the buffer? */
+ unsigned int secure:1; /* do we clear the buffer on finalise (if we own it) */
GByteArray *buffer;
};
@@ -63,6 +64,9 @@ CamelStream *camel_stream_mem_new(void);
CamelStream *camel_stream_mem_new_with_byte_array(GByteArray *buffer);
CamelStream *camel_stream_mem_new_with_buffer(const char *buffer, size_t len);
+/* 'secure' data, currently just clears memory on finalise */
+void camel_stream_mem_set_secure(CamelStreamMem *);
+
/* these are really only here for implementing classes */
void camel_stream_mem_set_byte_array(CamelStreamMem *, GByteArray *buffer);
void camel_stream_mem_set_buffer(CamelStreamMem *, const char *buffer, size_t len);