libmapi/mapi_id_array.c File Reference

mapi_id_array support functions More...

#include <libmapi/libmapi.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 (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:
id pointer to a mapi_id_array structure
fid the 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 DLIST_ADD, global_mapi_ctx, 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:
id pointer to a mapi_id_array structure
obj pointer 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 DLIST_ADD, global_mapi_ctx, 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:
id pointer to a mapi_id_array structure
fid the 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, DLIST_REMOVE, global_mapi_ctx, 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:
id pointer to a mapi_id_array structure
obj pointer 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, DLIST_REMOVE, global_mapi_ctx, 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_ctx allocated talloc pointer
id pointer to a mapi_id_array structure
ContainerList pointer 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, global_mapi_ctx, mapi_container_list::id, mapi_id_array::lpContainerList, mapi_container_list::next, and OPENCHANGE_RETVAL_IF.

Referenced by MoveCopyMessages(), and SetSearchCriteria().

_PUBLIC_ enum MAPISTATUS mapi_id_array_init ( mapi_id_array_t id  ) 

Initialize a mapi_id_array structure

Parameters:
id pointer 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 global_mapi_ctx, mapi_ctx::mem_ctx, and OPENCHANGE_RETVAL_IF.

_PUBLIC_ enum MAPISTATUS mapi_id_array_release ( mapi_id_array_t id  ) 

Uninitialize a mapi_id_array structure

Parameters:
id pointer 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 global_mapi_ctx, 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/