OpenChange Property Files 2.0 API Documentation

- Main Page
- Files
- Examples

- File List
- Globals

Functions
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)

## Detailed Description

public OCPF write API

## Function Documentation

_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_id | the identifier representing the context
  obj_message | the message object
  mapi_lpProps | the array of mapi properties returned by GetPropsAll

Returns
  OCPF_SUCCESS on success, otherwise OCPF_ERROR

See Also
  GetPropsAll, ocpf_write_commit

References ocpf_context_search_by_context_id().

_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_id | the identifier representing the context

Returns
  OCPF_SUCCESS on success, otherwise OCPF_ERROR

See Also
  ocpf_write_init, ocpf_write_auto

References ocpf_context_search_by_context_id().

_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_id | the identifier representing the context
  folder_id | the folder

Returns
  OCPF_SUCCESS on success, otherwise OCPF_ERROR

See Also
  ocpf_init

References ocpf_context_search_by_context_id().

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