mpm_cache.h

Langue: en

Version: 382373 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

mapiproxy/modules/mpm_cache.h -

SYNOPSIS


#include <stdio.h>

Data Structures


struct mpm_attachment

struct mpm_cache

struct mpm_message

struct mpm_stream
A stream can either be for a message or attachment.

Defines


#define __BEGIN_DECLS

#define __END_DECLS

#define MPM_DB 'mpm_cache.ldb'

#define MPM_DB_STORAGE 'data'

#define MPM_ERROR '[ERROR] mpm_cache:'

#define MPM_LOCATION __FUNCTION__, __LINE__

#define MPM_NAME 'mpm_cache'

#define MPM_SESSION(x) x->session->server_id.id, x->session->server_id.id2, x->session->server_id.node, x->session->context_id

Functions


NTSTATUS mpm_cache_ldb_add_attachment (TALLOC_CTX *, struct ldb_context *, struct mpm_attachment *)

NTSTATUS mpm_cache_ldb_add_message (TALLOC_CTX *, struct ldb_context *, struct mpm_message *)

NTSTATUS mpm_cache_ldb_add_stream (struct mpm_cache *, struct ldb_context *, struct mpm_stream *)

NTSTATUS mpm_cache_ldb_createdb (struct dcesrv_context *, const char *, struct ldb_context **)

NTSTATUS mpm_cache_stream_close (struct mpm_stream *)

NTSTATUS mpm_cache_stream_open (struct mpm_cache *, struct mpm_stream *)

NTSTATUS mpm_cache_stream_read (struct mpm_stream *, size_t, size_t *, uint8_t **)

NTSTATUS mpm_cache_stream_reset (struct mpm_stream *)

NTSTATUS mpm_cache_stream_write (struct mpm_stream *, uint16_t, uint8_t *)

__BEGIN_DECLS NTSTATUS samba_init_module (void)

Define Documentation

#define __BEGIN_DECLS

#define __END_DECLS

#define MPM_DB 'mpm_cache.ldb'

Referenced by cache_init().

#define MPM_DB_STORAGE 'data'

#define MPM_ERROR '[ERROR] mpm_cache:'

Referenced by cache_init().

#define MPM_LOCATION __FUNCTION__, __LINE__

Referenced by cache_dispatch(), cache_pull_OpenAttach(), cache_pull_OpenStream(), cache_pull_Release(), cache_push_OpenAttach(), cache_push_OpenMessage(), cache_push_OpenStream(), cache_push_ReadStream(), cache_unbind(), mpm_cache_ldb_add_attachment(), mpm_cache_ldb_add_folder(), mpm_cache_ldb_add_message(), mpm_cache_ldb_add_stream(), mpm_cache_stream_open(), mpm_cache_stream_read(), and mpm_cache_stream_write().

#define MPM_NAME 'mpm_cache'

Referenced by cache_init().

#define MPM_SESSION(x) x->session->server_id.id, x->session->server_id.id2, x->session->server_id.node, x->session->context_id

Referenced by cache_pull_OpenAttach(), cache_pull_OpenStream(), cache_pull_Release(), cache_push_OpenAttach(), cache_push_OpenMessage(), cache_push_OpenStream(), cache_push_ReadStream(), and cache_unbind().

Function Documentation

NTSTATUS mpm_cache_ldb_add_attachment (TALLOC_CTX * mem_ctx, struct ldb_context * ldb_ctx, struct mpm_attachment * attach)Add an attachment record to the TDB store

Parameters:

mem_ctx pointer to the memory context
ldb_ctx pointer to the LDB context
attach pointer to the mpm_attachment entry

Returns:

NT_STATUS_OK on success, otherwise a NT error

References mpm_attachment::AttachmentID, mpm_message::FolderId, mpm_attachment::message, mpm_message::MessageId, and MPM_LOCATION.

Referenced by cache_push_OpenAttach().

NTSTATUS mpm_cache_ldb_add_message (TALLOC_CTX * mem_ctx, struct ldb_context * ldb_ctx, struct mpm_message * message)Add a message record to the TDB store

Parameters:

mem_ctx pointer to the memory context
ldb_ctx pointer to the LDB context
message pointer to the mpm_message entry with the folder and message ID

Returns:

NT_STATUS_OK on success, otherwise a NT error

References mpm_message::FolderId, mpm_message::MessageId, mpm_cache_ldb_add_folder(), and MPM_LOCATION.

Referenced by cache_push_OpenMessage().

NTSTATUS mpm_cache_ldb_add_stream (struct mpm_cache * mpm, struct ldb_context * ldb_ctx, struct mpm_stream * stream)Add stream references to a message or attachment in the TDB store

Parameters:

mpm pointer to the cache module general structure
ldb_ctx pointer to the LDB context
stream pointer to the mpm_stream entry

Returns:

NT_STATUS_OK on success, otherwise NT error

References mpm_stream::ahead, mpm_stream::attachment, mpm_attachment::AttachmentID, mpm_stream::cached, mpm_stream::filename, mpm_message::FolderId, mpm_stream::message, mpm_attachment::message, mpm_message::MessageId, mpm_cache_stream_open(), MPM_LOCATION, mpm_stream::PropertyTag, and mpm_stream::StreamSize.

Referenced by cache_push_OpenStream().

NTSTATUS mpm_cache_ldb_createdb (struct dcesrv_context * dce_ctx, const char * database, struct ldb_context ** ldb_ctx)Create the cache database

Parameters:

dce_ctx pointer to the session context
database the complete path to the tdb store
ldb_ctx pointer to pointer on the the LDB context

Returns:

NT_STATUS_OK on success, otherwise NT_ERROR: NT_STATUS_NO_MEMORY, NT_STATUS_NOT_FOUND.

Referenced by cache_init().

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

References mpm_stream::fp.

Referenced by cache_exec_sync_cmd(), cache_pull_Release(), and cache_unbind().

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

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

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

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

Parameters:

stream pointer to the mpm_stream entry

Returns:

NT_STATUS_OK on success

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

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

References mpm_stream::fp, MPM_LOCATION, and mpm_stream::offset.

Referenced by cache_dispatch(), and cache_push_ReadStream().

__BEGIN_DECLS NTSTATUS samba_init_module (void)Register mapiproxy dynamic shared object modules

This function registers mapiproxy modules located

Entry point of mapiproxy dynamic shared object.

This function first registers exchange endpoints and ndr tables, then attempts to register the mapiproxy interface.

Returns:

NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL;

Entry point for the pack mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Entry point for the cache mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Entry point for the downgrade mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Register mapiproxy dynamic shared object modules

This function registers mapiproxy modules located

Entry point of mapiproxy dynamic shared object.

This function first registers exchange endpoints and ndr tables, then attempts to register the mapiproxy interface.

Returns:

NT_STATUS_OK on success, otherwise NT_STATUS_UNSUCCESSFUL;

Entry point for the pack mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Entry point for the cache mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Entry point for the downgrade mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

Entry point for the pack mapiproxy module

Returns:

NT_STATUS_OK on success, otherwise NTSTATUS error

References dcerpc_server_exchange_ds_rfr_init(), dcerpc_server_exchange_emsmdb_init(), dcerpc_server_exchange_nsp_init(), dcerpc_server_mapiproxy_init(), and ndr_table_register().

Author

Generated automatically by Doxygen for MAPIProxy from the source code.