libocpf/ocpf_public.c File Reference

public OCPF API More...

#include "libocpf/ocpf_private.h"
#include <libocpf/ocpf.h>

Defines

#define MAX_READ_SIZE   0x1000

Functions

_PUBLIC_ struct SPropValue * ocpf_get_SPropValue (uint32_t *cValues)
_PUBLIC_ int ocpf_init (void)
_PUBLIC_ enum MAPISTATUS ocpf_OpenFolder (mapi_object_t *obj_store, mapi_object_t *obj_folder)
_PUBLIC_ int ocpf_parse (const char *filename)
_PUBLIC_ int ocpf_release (void)
_PUBLIC_ enum MAPISTATUS ocpf_set_Recipients (TALLOC_CTX *mem_ctx, mapi_object_t *obj_message)
_PUBLIC_ enum MAPISTATUS ocpf_set_SPropValue (TALLOC_CTX *mem_ctx, mapi_object_t *obj_folder, mapi_object_t *obj_message)
stat h int ocpf_yyparse (void)

Variables

int error_flag
struct ocpfocpf
FILE * yyin

Detailed Description

public OCPF API


Define Documentation

#define MAX_READ_SIZE   0x1000

Referenced by ocpf_set_SPropValue().


Function Documentation

_PUBLIC_ struct SPropValue* ocpf_get_SPropValue ( uint32_t *  cValues  )  [read]

Get the OCPF SPropValue array

This function is an accessor designed to return the SPropValue structure created with ocpf_set_SPropValue.

Parameters:
cValues pointer on the number of SPropValue entries
Returns:
NULL on error, otherwise returns an allocated lpProps pointer
See also:
ocpf_set_SPropValue

References ocpf.

_PUBLIC_ int ocpf_init ( void   ) 

Initialize OCPF context

Initialize ocpf context and allocate memory for internal structures

Returns:
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also:
ocpf_release, ocpf_parse

References ocpf, OCPF_ERROR, and OCPF_SUCCESS.

_PUBLIC_ enum MAPISTATUS ocpf_OpenFolder ( mapi_object_t *  obj_store,
mapi_object_t *  obj_folder 
)

Open OCPF folder

This function opens the folder associated with the ocpf folder global context value.

Parameters:
obj_store the store object
obj_folder the folder to open
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND.
Note:
Developers should call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized.
  • MAPI_E_INVALID_PARAMETER: obj_store is undefined
  • MAPI_E_NOT_FOUND: The specified folder could not be found or is not yet supported.
See also:
ocpf_init, ocpf_parse

References ocpf.

_PUBLIC_ int ocpf_parse ( const char *  filename  ) 

Parse OCPF file

Parse and process the given ocpf file.

Parameters:
filename the file to parse
Returns:
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also:
ocpf_init

References lineno, ocpf, OCPF_ERROR, ocpf_yyparse(), and yyin.

_PUBLIC_ int ocpf_release ( void   ) 

Uninitialize OCPF context

Uninitialize the global OCPF context and release memory.

Returns:
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also:
ocpf_init

References ocpf, OCPF_ERROR, and OCPF_SUCCESS.

_PUBLIC_ enum MAPISTATUS ocpf_set_Recipients ( TALLOC_CTX *  mem_ctx,
mapi_object_t *  obj_message 
)

Set the message recipients from ocpf context

This function sets the recipient (To, Cc, Bcc) from the ocpf context and information stored.

Parameters:
mem_ctx the memory context to use for memory allocation
obj_message pointer to the message object we use for internal MAPI operations
Returns:
OCPF_SUCCESS on success, otherwise OCPF_ERROR.
See also:
ocpf

References ocpf.

_PUBLIC_ enum MAPISTATUS ocpf_set_SPropValue ( TALLOC_CTX *  mem_ctx,
mapi_object_t *  obj_folder,
mapi_object_t *  obj_message 
)

Build a SPropValue array from ocpf context

This function builds a SPropValue array from the ocpf context and information stored.

Parameters:
mem_ctx the memory context to use for memory allocation
obj_folder pointer the folder object we use for internal MAPI operations
obj_message pointer to the message object we use for internal MAPI operations
Returns:
MAPI_E_SUCCESS on success, otherwise -1.
Note:
Developers should call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
See also:
ocpf_get_SPropValue

References MAX_READ_SIZE, and ocpf.

stat h int ocpf_yyparse ( void   ) 

Referenced by ocpf_parse().


Variable Documentation

FILE* yyin

Referenced by ocpf_parse().


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/