ocpf_write.c File Reference

public OCPF write API More...

#include "libocpf/ocpf.h"

Functions

_PUBLIC_ int ocpf_write_auto (uint32_t context_id, mapi_object_t *obj_message, struct mapi_SPropValue_array *mapi_lpProps)
 
_PUBLIC_ int ocpf_write_commit (uint32_t context_id)
 
_PUBLIC_ int ocpf_write_init (uint32_t context_id, mapi_id_t folder_id)
 
char * ocpf_write_unescape_string (TALLOC_CTX *mem_ctx, const char *value)
 

Detailed Description

public OCPF write API

Function Documentation

◆ ocpf_write_auto()

_PUBLIC_ int ocpf_write_auto ( uint32_t context_id,
mapi_object_t * obj_message,
struct mapi_SPropValue_array * mapi_lpProps )

Create the OCPF structure required for the commit operation

This function process properties and named properties from the specified mapi_SPropValue_array and generates an OCPF structure with all the attributes required to create an OCPF file in the commit operation.

Parameters
context_idthe identifier representing the context
obj_messagethe message object
mapi_lpPropsthe array of mapi properties returned by GetPropsAll
Returns
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also
GetPropsAll, ocpf_write_commit

References kw_PROPERTY, ocpf, and ocpf_context_search_by_context_id().

◆ ocpf_write_commit()

_PUBLIC_ int ocpf_write_commit ( uint32_t context_id)

Write OCPF structure to OCPF file

This function dumps the OCPF structure content into the OCPF file defined in ocpf_write_init.

Parameters
context_idthe identifier representing the context
Returns
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also
ocpf_write_init, ocpf_write_auto

References ocpf, and ocpf_context_search_by_context_id().

◆ ocpf_write_init()

_PUBLIC_ int ocpf_write_init ( uint32_t context_id,
mapi_id_t folder_id )

Specify the OCPF file name to write

Specify the ocpf file to create

Parameters
context_idthe identifier representing the context
folder_idthe folder
Returns
OCPF_SUCCESS on success, otherwise OCPF_ERROR
See also
ocpf_init

References ocpf, and ocpf_context_search_by_context_id().

◆ ocpf_write_unescape_string()

char * ocpf_write_unescape_string ( TALLOC_CTX * mem_ctx,
const char * value )

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/