MAPIProxy 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
mpm_cache_stream.c File Reference

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)

## Detailed Description

Storage routines for the cache module.

## Function Documentation

NTSTATUS mpm_cache_stream_close | ( | struct mpm_stream * | stream | ) |

Close the filesystem stream

Parameters

  stream | pointer to the mpm_stream entry

Returns
  NT_STATUS_OK on success, otherwise NT_STATUS_NOT_FOUND

Referenced by cache_exec_sync_cmd(), and cache_pull_Release().

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

Parameters

  mpm | pointer to the cache module general structure
  stream | pointer to the mpm_stream entry

Returns
  Return a FILE pointer otherwise NULL

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

Parameters

  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

Returns
  NT_STATUS_OK

Referenced by cache_dispatch().

NTSTATUS mpm_cache_stream_reset | ( | struct mpm_stream * | stream | ) |

Rewind a stream to the beginning

Parameters

  stream | pointer to the mpm_stream entry

Returns
  NT_STATUS_OK on success

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

Parameters

  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

Returns
  NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL

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/