Storage routines for the cache module. More...
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/libmapiproxy/libmapiproxy.h"
#include "mapiproxy/modules/mpm_cache.h"
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include <util/debug.h>
Functions | |
NTSTATUS | mpm_cache_stream_close (struct mpm_stream *stream) |
stat h types h NTSTATUS | mpm_cache_stream_open (struct mpm_cache *mpm, struct mpm_stream *stream) |
NTSTATUS | mpm_cache_stream_read (struct mpm_stream *stream, size_t input_size, size_t *length, uint8_t **data) |
NTSTATUS | mpm_cache_stream_reset (struct mpm_stream *stream) |
NTSTATUS | mpm_cache_stream_write (struct mpm_stream *stream, uint16_t length, uint8_t *data) |
Storage routines for the cache module.
NTSTATUS mpm_cache_stream_close | ( | struct mpm_stream * | stream) |
Close the filesystem stream
stream | pointer to the mpm_stream entry |
References mpm_stream::fp.
Referenced by cache_exec_sync_cmd(), cache_pull_Release(), and cache_unbind().
stat h types h NTSTATUS mpm_cache_stream_open | ( | struct mpm_cache * | mpm, |
struct mpm_stream * | stream | ||
) |
Create a file: message or attachment in the cache
If the stream is attached to an attachment: FolderID/MessageID/AttachmentID.stream If the stream is attached to a message: FolderID/MessageID.stream
mpm | pointer to the cache module general structure |
stream | pointer to the mpm_stream entry |
References mpm_stream::attachment, mpm_attachment::AttachmentID, mpm_cache::dbpath, mpm_stream::filename, mpm_message::FolderId, mpm_stream::fp, mpm_attachment::message, mpm_stream::message, mpm_message::MessageId, MPM_LOCATION, and mpm_stream::offset.
Referenced by cache_exec_sync_cmd(), and mpm_cache_ldb_add_stream().
NTSTATUS mpm_cache_stream_read | ( | struct mpm_stream * | stream, |
size_t | input_size, | ||
size_t * | length, | ||
uint8_t ** | data | ||
) |
Read input_size bytes from a local binary stream
stream | pointer to the mpm_stream entry |
input_size | the number of bytes to read |
length | output pointer to the length effectively read from the stream |
data | output pointer to the binary data read from the stream |
References mpm_stream::fp, MPM_LOCATION, and mpm_stream::offset.
Referenced by cache_dispatch().
NTSTATUS mpm_cache_stream_reset | ( | struct mpm_stream * | stream) |
Rewind a stream to the beginning
stream | pointer to the mpm_stream entry |
References mpm_stream::fp, and mpm_stream::offset.
Referenced by cache_dispatch().
NTSTATUS mpm_cache_stream_write | ( | struct mpm_stream * | stream, |
uint16_t | length, | ||
uint8_t * | data | ||
) |
Write length bytes to a local stream
stream | pointer to the mpm_stream entry |
length | the data length to write to the stream |
data | pointer to the data to write to the stream |
References mpm_stream::fp, MPM_LOCATION, and mpm_stream::offset.
Referenced by cache_dispatch(), and cache_push_ReadStream().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |