mapi_id_array.c File Reference

mapi_id_array support functions More...

#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"

Functions

_PUBLIC_ enum MAPISTATUS mapi_id_array_add_id (mapi_id_array_t *id, mapi_id_t fid)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_add_obj (mapi_id_array_t *id, mapi_object_t *obj)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_del_id (mapi_id_array_t *id, mapi_id_t fid)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_del_obj (mapi_id_array_t *id, mapi_object_t *obj)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_get (TALLOC_CTX *mem_ctx, mapi_id_array_t *id, mapi_id_t **ContainerList)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_init (TALLOC_CTX *mem_ctx, mapi_id_array_t *id)
 
_PUBLIC_ enum MAPISTATUS mapi_id_array_release (mapi_id_array_t *id)
 

Detailed Description

mapi_id_array support functions

Function Documentation

_PUBLIC_ enum MAPISTATUS mapi_id_array_add_id ( mapi_id_array_t id,
mapi_id_t  fid 
)

Add a container ID to the list given its container ID

Parameters
idpointer to a mapi_id_array structure
fidthe container ID
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_add_obj

References mapi_container_list::id, mapi_id_array::lpContainerList, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_add_obj ( mapi_id_array_t id,
mapi_object_t obj 
)

Add a container ID to the list given its mapi_object_t

Parameters
idpointer to a mapi_id_array structure
objpointer on the mapi object we retrieve the container ID from
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_add_id

References mapi_container_list::id, mapi_id_array::lpContainerList, mapi_object_get_id(), and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_del_id ( mapi_id_array_t id,
mapi_id_t  fid 
)

Delete a container ID from the list given its container ID

Parameters
idpointer to a mapi_id_array structure
fidthe container ID
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_add_id

References mapi_id_array::count, mapi_container_list::id, mapi_id_array::lpContainerList, mapi_container_list::next, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_del_obj ( mapi_id_array_t id,
mapi_object_t obj 
)

Delete a container ID from the list given its mapi_object_t

Parameters
idpointer to a mapi_id_array structure
objpointer on the mapi object we retrieve the container ID from
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_add_id

References mapi_id_array::count, mapi_container_list::id, mapi_id_array::lpContainerList, mapi_object_get_id(), mapi_container_list::next, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_get ( TALLOC_CTX *  mem_ctx,
mapi_id_array_t id,
mapi_id_t **  ContainerList 
)

Retrieve the ContainerList and store it within a uint64_t array.

Parameters
mem_ctxallocated talloc pointer
idpointer to a mapi_id_array structure
ContainerListpointer on a pointer of uint64_t values
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
GetSearchCriteria

References mapi_id_array::count, mapi_container_list::id, mapi_id_array::lpContainerList, mapi_container_list::next, and OPENCHANGE_RETVAL_IF.

Referenced by FXCopyMessages(), MoveCopyMessages(), and SetSearchCriteria().

_PUBLIC_ enum MAPISTATUS mapi_id_array_init ( TALLOC_CTX *  mem_ctx,
mapi_id_array_t id 
)

Initialize a mapi_id_array structure

Parameters
mem_ctxpointer to the talloc context
idpointer to a mapi_id_array structure
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_release

References OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_release ( mapi_id_array_t id)

Uninitialize a mapi_id_array structure

Parameters
idpointer to a mapi_id_array structure
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also 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: The mapi_id_array_t is uninitialized
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
mapi_id_array_init

References mapi_id_array::lpContainerList, and OPENCHANGE_RETVAL_IF.


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/