mapidump.c File Reference

Functions for displaying various data structures, mainly for debugging. More...

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

Macros

#define OC_ASSERT(x)
 

Functions

_PUBLIC_ const char * get_importance (uint32_t importance)
 
_PUBLIC_ const char * get_task_status (uint32_t status)
 
_PUBLIC_ void mapidump_appointment (struct mapi_SPropValue_array *properties, const char *id)
 
_PUBLIC_ void mapidump_contact (struct mapi_SPropValue_array *properties, const char *id)
 
_PUBLIC_ void mapidump_date (struct mapi_SPropValue_array *properties, uint32_t mapitag, const char *label)
 
_PUBLIC_ void mapidump_date_SPropValue (struct SPropValue lpProp, const char *label, const char *sep)
 
_PUBLIC_ void mapidump_foldercopied (struct FolderMoveCopyNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_foldercreated (struct FolderCreatedNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_folderdeleted (struct FolderDeletedNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_foldermoved (struct FolderMoveCopyNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_freebusy_date (uint32_t t, const char *sep)
 
_PUBLIC_ void mapidump_freebusy_event (struct Binary_r *bin, uint32_t month, uint32_t year, const char *sep)
 
_PUBLIC_ const char * mapidump_freebusy_month (uint32_t month, uint32_t year)
 
_PUBLIC_ uint32_t mapidump_freebusy_year (uint32_t month, uint32_t year)
 
_PUBLIC_ void mapidump_languages_list (void)
 
_PUBLIC_ void mapidump_message (struct mapi_SPropValue_array *properties, const char *id, mapi_object_t *obj_msg)
 
_PUBLIC_ void mapidump_message_summary (mapi_object_t *obj_message)
 
_PUBLIC_ void mapidump_messagecopied (struct MessageMoveCopyNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_messagecreated (struct MessageCreatedNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_messagedeleted (struct MessageDeletedNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_messagemodified (struct MessageModifiedNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_messagemoved (struct MessageMoveCopyNotification *data, const char *sep)
 
_PUBLIC_ void mapidump_msgflags (uint32_t MsgFlags, const char *sep)
 
_PUBLIC_ void mapidump_newmail (struct NewMailNotification *newmail, const char *sep)
 
_PUBLIC_ void mapidump_note (struct mapi_SPropValue_array *properties, const char *id)
 
_PUBLIC_ void mapidump_PAB_entry (struct PropertyRow_r *aRow)
 Output a row of the public address book. More...
 
_PUBLIC_ void mapidump_Recipients (const char **usernames, struct SRowSet *rowset, struct PropertyTagArray_r *flaglist)
 
_PUBLIC_ void mapidump_SPropTagArray (struct SPropTagArray *SPropTagArray)
 
_PUBLIC_ void mapidump_SPropValue (struct SPropValue lpProp, const char *sep)
 Output one property tag and value. More...
 
_PUBLIC_ void mapidump_SRow (struct SRow *aRow, const char *sep)
 
_PUBLIC_ void mapidump_SRowSet (struct SRowSet *SRowSet, const char *sep)
 
_PUBLIC_ void mapidump_tags (enum MAPITAGS *Tags, uint16_t TagCount, const char *sep)
 
_PUBLIC_ void mapidump_task (struct mapi_SPropValue_array *properties, const char *id)
 

Detailed Description

Functions for displaying various data structures, mainly for debugging.

Macro Definition Documentation

#define OC_ASSERT (   x)

Referenced by mapidump_SPropValue().

Function Documentation

_PUBLIC_ const char* get_importance ( uint32_t  importance)
_PUBLIC_ const char* get_task_status ( uint32_t  status)
_PUBLIC_ void mapidump_appointment ( struct mapi_SPropValue_array *  properties,
const char *  id 
)

This function dumps the properties relating to an appointment to standard output

The expected way to obtain the properties array is to use OpenMessage() to obtain the appointment object, then to use GetPropsAll() to obtain all the properties.

Parameters
propertiesarray of appointment properties
ididentification to display for the appointment (can be NULL)
See Also
mapidump_message, mapidump_contact, mapidump_task, mapidump_note

References find_mapi_SPropValue_data(), get_task_status(), mapidump_date(), PidLidBusyStatus, PidLidContacts, PidLidLocation, PidLidPrivate, PidLidTimeZoneDescription, PR_CONVERSATION_TOPIC, PR_END_DATE, and PR_START_DATE.

_PUBLIC_ void mapidump_contact ( struct mapi_SPropValue_array *  properties,
const char *  id 
)

This function dumps the properties relating to a contact (address book entry) to standard output

The expected way to obtain the properties array is to use OpenMessage() to obtain the contact object, then to use GetPropsAll() to obtain all the properties.

Parameters
propertiesarray of contact properties
ididentification to display for the contact (can be NULL)
See Also
mapidump_message, mapidump_appointment, mapidump_task, mapidump_note

References find_mapi_SPropValue_data(), PidLidEmail1OriginalDisplayName, PidLidFileUnder, PR_BUSINESS_FAX_NUMBER, PR_BUSINESS_HOME_PAGE, PR_COMPANY_NAME, PR_CONVERSATION_TOPIC, PR_COUNTRY, PR_DEPARTMENT_NAME, PR_DISPLAY_NAME, PR_GIVEN_NAME, PR_HOME_TELEPHONE_NUMBER, PR_LOCALITY, PR_MOBILE_TELEPHONE_NUMBER, PR_OFFICE_TELEPHONE_NUMBER, PR_POSTAL_ADDRESS, PR_STATE_OR_PROVINCE, PR_STREET_ADDRESS, PR_SURNAME, and PR_TITLE.

_PUBLIC_ void mapidump_date ( struct mapi_SPropValue_array *  properties,
uint32_t  mapitag,
const char *  label 
)
_PUBLIC_ void mapidump_date_SPropValue ( struct SPropValue  lpProp,
const char *  label,
const char *  sep 
)

This function dumps a property containing a date / time to standard output

If the property does not contain a PT_SYSTIME type value, then no output will occur.

Parameters
lpPropthe property to dump
labelthe label to display prior to the time (e.g. the property tag)
sepa separator / spacer to insert in front of the label
Note
Prior to OpenChange 0.9, this function took 2 arguments, assuming a default separator of a tab. You can get the old behaviour by using "\t" for sep.

References get_SPropValue_data().

Referenced by mapidump_SPropValue().

_PUBLIC_ void mapidump_foldercopied ( struct FolderMoveCopyNotification *  data,
const char *  sep 
)
_PUBLIC_ void mapidump_foldercreated ( struct FolderCreatedNotification *  data,
const char *  sep 
)

References mapidump_tags().

_PUBLIC_ void mapidump_folderdeleted ( struct FolderDeletedNotification *  data,
const char *  sep 
)
_PUBLIC_ void mapidump_foldermoved ( struct FolderMoveCopyNotification *  data,
const char *  sep 
)

Referenced by mapidump_foldercopied().

_PUBLIC_ void mapidump_freebusy_date ( uint32_t  t,
const char *  sep 
)
_PUBLIC_ void mapidump_freebusy_event ( struct Binary_r *  bin,
uint32_t  month,
uint32_t  year,
const char *  sep 
)
_PUBLIC_ const char* mapidump_freebusy_month ( uint32_t  month,
uint32_t  year 
)

Referenced by mapidump_freebusy_event().

_PUBLIC_ uint32_t mapidump_freebusy_year ( uint32_t  month,
uint32_t  year 
)

Referenced by mapidump_freebusy_event().

_PUBLIC_ void mapidump_languages_list ( void  )

print the list of languages OpenChange supports

References mapi_get_language_list().

_PUBLIC_ void mapidump_message ( struct mapi_SPropValue_array *  properties,
const char *  id,
mapi_object_t obj_msg 
)

This function dumps the properties relating to an email message to standard output

The expected way to obtain the properties array is to use OpenMessage() to obtain the message object, then to use GetPropsAll() to obtain all the properties.

Parameters
propertiesarray of message properties
ididentification to display for the message (can be NULL)
obj_msgpointer to the message MAPI object (can be NULL)
See Also
mapidump_appointment, mapidump_contact, mapidump_task, mapidump_note

References find_mapi_SPropValue_data(), mapidump_message_summary(), PR_BODY, PR_BODY_UNICODE, PR_CONVERSATION_TOPIC, PR_CONVERSATION_TOPIC_UNICODE, PR_DISPLAY_BCC, PR_DISPLAY_BCC_UNICODE, PR_DISPLAY_CC, PR_DISPLAY_CC_UNICODE, PR_DISPLAY_TO, PR_DISPLAY_TO_UNICODE, PR_HASATTACH, PR_HTML, PR_INTERNET_MESSAGE_ID, PR_INTERNET_MESSAGE_ID_UNICODE, PR_MESSAGE_CODEPAGE, PR_SENT_REPRESENTING_NAME, and PR_SENT_REPRESENTING_NAME_UNICODE.

_PUBLIC_ void mapidump_message_summary ( mapi_object_t obj_message)

This function dumps message information retrieved from OpenMessage call. It provides a quick method to print message summaries with information such as subject and recipients.

Parameters
obj_messagepointer to the MAPI message object to use

References find_SPropValue_data(), mapi_obj_message::NormalizedSubject, PR_RECIPIENT_TYPE, PR_SMTP_ADDRESS, PR_SMTP_ADDRESS_UNICODE, mapi_object::private_data, mapi_obj_message::SRowSet, and mapi_obj_message::SubjectPrefix.

Referenced by mapidump_message().

_PUBLIC_ void mapidump_messagecopied ( struct MessageMoveCopyNotification *  data,
const char *  sep 
)
_PUBLIC_ void mapidump_messagecreated ( struct MessageCreatedNotification *  data,
const char *  sep 
)

References mapidump_tags().

Referenced by mapidump_messagemodified().

_PUBLIC_ void mapidump_messagedeleted ( struct MessageDeletedNotification *  data,
const char *  sep 
)
_PUBLIC_ void mapidump_messagemodified ( struct MessageModifiedNotification *  data,
const char *  sep 
)
_PUBLIC_ void mapidump_messagemoved ( struct MessageMoveCopyNotification *  data,
const char *  sep 
)

Referenced by mapidump_messagecopied().

_PUBLIC_ void mapidump_msgflags ( uint32_t  MsgFlags,
const char *  sep 
)

References mdump_msgflags::flag.

Referenced by mapidump_newmail().

_PUBLIC_ void mapidump_newmail ( struct NewMailNotification *  newmail,
const char *  sep 
)

References mapidump_msgflags().

_PUBLIC_ void mapidump_note ( struct mapi_SPropValue_array *  properties,
const char *  id 
)

This function dumps the properties relating to a note to standard output

The expected way to obtain the properties array is to use OpenMessage() to obtain the note object, then to use GetPropsAll() to obtain all the properties.

Parameters
propertiesarray of note properties
ididentification to display for the note (can be NULL)
See Also
mapidump_message, mapidump_appointment, mapidump_contact, mapidump_task

References find_mapi_SPropValue_data(), mapidump_date(), PR_BODY, PR_BODY_HTML, PR_CLIENT_SUBMIT_TIME, and PR_CONVERSATION_TOPIC.

_PUBLIC_ void mapidump_PAB_entry ( struct PropertyRow_r *  aRow)

Output a row of the public address book.

Parameters
aRowone row of the public address book (Global Address List)

This function is usually used with GetGALTable, which can obtain several rows at once - you'll need to iterate over the rows.

The SRow is assumed to contain entries for PR_ADDRTYPE_UNICODE, PR_DISPLAY_NAME_UNICODE, PR_EMAIL_ADDRESS_UNICODE and PR_ACCOUNT_UNICODE.

References find_PropertyValue_data(), PR_ACCOUNT_UNICODE, PR_ADDRTYPE_UNICODE, PR_DISPLAY_NAME_UNICODE, and PR_EMAIL_ADDRESS_UNICODE.

_PUBLIC_ void mapidump_Recipients ( const char **  usernames,
struct SRowSet *  rowset,
struct PropertyTagArray_r *  flaglist 
)
_PUBLIC_ void mapidump_SPropTagArray ( struct SPropTagArray *  SPropTagArray)

References get_proptag_name().

_PUBLIC_ void mapidump_SPropValue ( struct SPropValue  lpProp,
const char *  sep 
)

Output one property tag and value.

Parameters
lpPropthe property to print
sepa separator / spacer to insert in front of the label

References get_proptag_name(), get_SPropValue_data(), mapidump_date_SPropValue(), OC_ASSERT, PT_BINARY, PT_BOOLEAN, PT_CLSID, PT_DOUBLE, PT_ERROR, PT_I8, PT_LONG, PT_MV_BINARY, PT_MV_LONG, PT_MV_STRING8, PT_MV_UNICODE, PT_OBJECT, PT_SHORT, PT_STRING8, PT_SVREID, PT_SYSTIME, and PT_UNICODE.

Referenced by mapidump_SRow().

_PUBLIC_ void mapidump_SRow ( struct SRow *  aRow,
const char *  sep 
)
_PUBLIC_ void mapidump_SRowSet ( struct SRowSet *  SRowSet,
const char *  sep 
)

References mapidump_SRow().

_PUBLIC_ void mapidump_tags ( enum MAPITAGS *  Tags,
uint16_t  TagCount,
const char *  sep 
)
_PUBLIC_ void mapidump_task ( struct mapi_SPropValue_array *  properties,
const char *  id 
)

This function dumps the properties relating to a task (to-do list entry) to standard output

The expected way to obtain the properties array is to use OpenMessage() to obtain the task object, then to use GetPropsAll() to obtain all the properties.

Parameters
propertiesarray of task properties
ididentification to display for the task (can be NULL)
See Also
mapidump_message, mapidump_appointment, mapidump_contact, mapidump_note

References find_mapi_SPropValue_data(), get_importance(), get_task_status(), mapidump_date(), olTaskComplete, PidLidContacts, PidLidPercentComplete, PidLidPrivate, PidLidTaskDateCompleted, PidLidTaskDueDate, PidLidTaskStartDate, PidLidTaskStatus, PR_BODY, PR_CONVERSATION_TOPIC, and PR_IMPORTANCE.


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/