libmapi/property.c File Reference

Functions for manipulating MAPI properties. More...

#include <libmapi/libmapi.h>
#include "defs_private.h"

Functions

_PUBLIC_ struct SPropValue * add_SPropValue (TALLOC_CTX *mem_ctx, struct SPropValue *lpProps, uint32_t *cValues, uint32_t aulPropTag, const void *data)
_PUBLIC_ uint32_t cast_mapi_SPropValue (struct mapi_SPropValue *mapi_sprop, struct SPropValue *sprop)
_PUBLIC_ uint32_t cast_SPropValue (struct mapi_SPropValue *mapi_sprop, struct SPropValue *sprop)
_PUBLIC_ const void * find_mapi_SPropValue_data (struct mapi_SPropValue_array *properties, uint32_t mapitag)
_PUBLIC_ const void * find_SPropValue_data (struct SRow *aRow, uint32_t mapitag)
_PUBLIC_ struct
AppointmentRecurrencePattern * 
get_AppointmentRecurrencePattern (TALLOC_CTX *mem_ctx, struct Binary_r *bin)
_PUBLIC_ struct GlobalObjectId * get_GlobalObjectId (TALLOC_CTX *mem_ctx, struct Binary_r *bin)
_PUBLIC_ uint32_t get_mapi_property_size (struct mapi_SPropValue *lpProp)
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_array_date_timeval (struct timeval *t, struct mapi_SPropValue_array *properties, uint32_t mapitag)
_PUBLIC_ const void * get_mapi_SPropValue_data (struct mapi_SPropValue *lpProp)
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_date_timeval (struct timeval *t, struct SPropValue lpProp)
enum MAPITAGS * get_MAPITAGS_SRow (TALLOC_CTX *mem_ctx, struct SRow *aRow)
_PUBLIC_ struct RecurrencePattern * get_RecurrencePattern (TALLOC_CTX *mem_ctx, struct Binary_r *bin)
_PUBLIC_ const void * get_SPropValue (struct SPropValue *lpProps, uint32_t ulPropTag)
_PUBLIC_ const void * get_SPropValue_data (struct SPropValue *lpProps)
_PUBLIC_ struct SPropValue * get_SPropValue_SRow (struct SRow *aRow, uint32_t ulPropTag)
_PUBLIC_ const void * get_SPropValue_SRow_data (struct SRow *aRow, uint32_t ulPropTag)
_PUBLIC_ struct SPropValue * get_SPropValue_SRowSet (struct SRowSet *RowSet, uint32_t ulPropTag)
_PUBLIC_ const void * get_SPropValue_SRowSet_data (struct SRowSet *RowSet, uint32_t ulPropTag)
_PUBLIC_ struct TimeZoneStruct * get_TimeZoneStruct (TALLOC_CTX *mem_ctx, struct Binary_r *bin)
_PUBLIC_ void mapi_SPropValue_array_named (mapi_object_t *obj, struct mapi_SPropValue_array *props)
uint32_t MAPITAGS_delete_entries (enum MAPITAGS *mapitags, uint32_t final_count, uint32_t PropCount,...)
_PUBLIC_ enum MAPISTATUS set_default_error_SPropValue_SRow (struct SRow *aRow, uint32_t ulPropTag, void *data)
_PUBLIC_ struct SPropTagArray * set_SPropTagArray (TALLOC_CTX *mem_ctx, uint32_t PropCount,...)
_PUBLIC_ bool set_SPropValue (struct SPropValue *lpProps, const void *data)
_PUBLIC_ bool set_SPropValue_proptag (struct SPropValue *lpProps, uint32_t aulPropTag, const void *data)
_PUBLIC_ bool set_SPropValue_proptag_date_timeval (struct SPropValue *lpProps, uint32_t aulPropTag, const struct timeval *t)
_PUBLIC_ enum MAPISTATUS SPropTagArray_add (TALLOC_CTX *mem_ctx, struct SPropTagArray *SPropTagArray, uint32_t aulPropTag)
_PUBLIC_ enum MAPISTATUS SRow_addprop (struct SRow *aRow, struct SPropValue SPropValue)
_PUBLIC_ uint32_t SRowSet_propcpy (TALLOC_CTX *mem_ctx, struct SRowSet *SRowSet, struct SPropValue SPropValue)

Detailed Description

Functions for manipulating MAPI properties.


Function Documentation

_PUBLIC_ struct SPropValue* add_SPropValue ( TALLOC_CTX *  mem_ctx,
struct SPropValue *  lpProps,
uint32_t *  cValues,
uint32_t  aulPropTag,
const void *  data 
) [read]
_PUBLIC_ uint32_t cast_mapi_SPropValue ( struct mapi_SPropValue *  mapi_sprop,
struct SPropValue *  sprop 
)
_PUBLIC_ uint32_t cast_SPropValue ( struct mapi_SPropValue *  mapi_sprop,
struct SPropValue *  sprop 
)
_PUBLIC_ const void* find_mapi_SPropValue_data ( struct mapi_SPropValue_array *  properties,
uint32_t  mapitag 
)
_PUBLIC_ const void* find_SPropValue_data ( struct SRow *  aRow,
uint32_t  mapitag 
)
_PUBLIC_ struct AppointmentRecurrencePattern* get_AppointmentRecurrencePattern ( TALLOC_CTX *  mem_ctx,
struct Binary_r *  bin 
) [read]
_PUBLIC_ struct GlobalObjectId* get_GlobalObjectId ( TALLOC_CTX *  mem_ctx,
struct Binary_r *  bin 
) [read]

Retrieve a GlobalObjectId structure from a binary blob

Parameters:
mem_ctx pointer to the memory context
bin pointer to the Binary_r structure with raw GlobalObjectId data
Returns:
Allocated GlobalObjectId structure on success, otherwise NULL
Note:
Developers must free the allocated GlobalObjectId when finished.
_PUBLIC_ uint32_t get_mapi_property_size ( struct mapi_SPropValue *  lpProp  ) 
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_array_date_timeval ( struct timeval *  t,
struct mapi_SPropValue_array *  properties,
uint32_t  mapitag 
)
_PUBLIC_ const void* get_mapi_SPropValue_data ( struct mapi_SPropValue *  lpProp  ) 
_PUBLIC_ enum MAPISTATUS get_mapi_SPropValue_date_timeval ( struct timeval *  t,
struct SPropValue  lpProp 
)

References get_SPropValue_data().

enum MAPITAGS* get_MAPITAGS_SRow ( TALLOC_CTX *  mem_ctx,
struct SRow *  aRow 
)

References PT_ERROR.

Referenced by ModifyRecipients().

_PUBLIC_ struct RecurrencePattern* get_RecurrencePattern ( TALLOC_CTX *  mem_ctx,
struct Binary_r *  bin 
) [read]

Retrieve a RecurrencePattern structure from a binary blob

Parameters:
mem_ctx pointer to the memory context
bin pointer to the Binary_r structure with non-mapped reccurrence data
Returns:
Allocated RecurrencePattern structure on success, otherwise NULL
Note:
Developers must free the allocated RecurrencePattern when finished.
_PUBLIC_ const void* get_SPropValue ( struct SPropValue *  lpProps,
uint32_t  ulPropTag 
)
_PUBLIC_ struct SPropValue* get_SPropValue_SRow ( struct SRow *  aRow,
uint32_t  ulPropTag 
) [read]
_PUBLIC_ const void* get_SPropValue_SRow_data ( struct SRow *  aRow,
uint32_t  ulPropTag 
)
_PUBLIC_ struct SPropValue* get_SPropValue_SRowSet ( struct SRowSet *  RowSet,
uint32_t  ulPropTag 
) [read]
_PUBLIC_ const void* get_SPropValue_SRowSet_data ( struct SRowSet *  RowSet,
uint32_t  ulPropTag 
)
_PUBLIC_ struct TimeZoneStruct* get_TimeZoneStruct ( TALLOC_CTX *  mem_ctx,
struct Binary_r *  bin 
) [read]

Retrieve a TimeZoneStruct structure from a binary blob

Parameters:
mem_ctx pointer to the memory context
bin pointer to the Binary_r structure with raw TimeZoneStruct data
Returns:
Allocated TimeZoneStruct structure on success, otherwise NULL
Note:
Developers must free the allocated TimeZoneStruct when finished.
_PUBLIC_ void mapi_SPropValue_array_named ( mapi_object_t obj,
struct mapi_SPropValue_array *  props 
)

References GetNamesFromIDs(), and PT_NULL.

uint32_t MAPITAGS_delete_entries ( enum MAPITAGS *  mapitags,
uint32_t  final_count,
uint32_t  PropCount,
  ... 
)

Referenced by ModifyRecipients().

_PUBLIC_ enum MAPISTATUS set_default_error_SPropValue_SRow ( struct SRow *  aRow,
uint32_t  ulPropTag,
void *  data 
)
_PUBLIC_ struct SPropTagArray* set_SPropTagArray ( TALLOC_CTX *  mem_ctx,
uint32_t  PropCount,
  ... 
) [read]

Create a property tag array

Parameters:
mem_ctx talloc memory context to use for allocation
PropCount the number of properties in the array

The varargs (the third and subsequent arguments) are the property tags to make up the array. So the normal way to use this to create an array of two tags is like:

  struct SPropTagArray *array
  array = set_SPropTagArray(mem_ctx, 2, PR_ENTRYID, PR_DISPLAY_NAME);
Examples:
fetchappointment.c, and fetchmail.c.

Referenced by AddUserPermission(), GetABRecipientInfo(), GetBestBody(), GetFolderItemsCount(), GetUserFreeBusyData(), ModifyUserPermission(), ProcessNetworkProfile(), and RemoveUserPermission().

_PUBLIC_ bool set_SPropValue_proptag ( struct SPropValue *  lpProps,
uint32_t  aulPropTag,
const void *  data 
)
_PUBLIC_ bool set_SPropValue_proptag_date_timeval ( struct SPropValue *  lpProps,
uint32_t  aulPropTag,
const struct timeval *  t 
)
_PUBLIC_ enum MAPISTATUS SPropTagArray_add ( TALLOC_CTX *  mem_ctx,
struct SPropTagArray *  SPropTagArray,
uint32_t  aulPropTag 
)

Add a property tag to an existing properties array

Parameters:
mem_ctx talloc memory context to use for allocation
SPropTagArray existing properties array to add to
aulPropTag the property tag to add
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note:
Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: SPropTagArray parameter is not correctly set

References OPENCHANGE_RETVAL_IF.

Referenced by OpenEmbeddedMessage(), OpenMessage(), and ReloadCachedInformation().

_PUBLIC_ enum MAPISTATUS SRow_addprop ( struct SRow *  aRow,
struct SPropValue SPropValue   
)

add a SPropValue structure to a SRow array

Parameters:
aRow pointer to the SRow array where SPropBalue should be appended
SPropValue reference to the SPropValue structure to add to aRow
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER.

References get_SPropValue_data(), OPENCHANGE_RETVAL_IF, and set_SPropValue().

Referenced by OpenEmbeddedMessage(), OpenMessage(), ReloadCachedInformation(), and SetRecipientType().

_PUBLIC_ uint32_t SRowSet_propcpy ( TALLOC_CTX *  mem_ctx,
struct SRowSet *  SRowSet,
struct SPropValue SPropValue   
)

Append a SPropValue structure to given SRowSet

Parameters:
mem_ctx pointer to the memory context
SRowSet pointer to the SRowSet array to update
SPropValue the SPropValue to append within SRowSet
Returns:
0 on success, otherwise 1

References set_SPropValue().


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/