MAPITests 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
module_oxcmsg.c File Reference

Message and Attachment Object Protocol test suite. More...

## Functions
bool | mapitest_oxcmsg_CreateMessage (struct mapitest *mt)
bool | mapitest_oxcmsg_GetMessageStatus (struct mapitest *mt)
bool | mapitest_oxcmsg_GetValidAttachments (struct mapitest *mt)
bool | mapitest_oxcmsg_ModifyRecipients (struct mapitest *mt)
bool | mapitest_oxcmsg_OpenEmbeddedMessage (struct mapitest *mt)
bool | mapitest_oxcmsg_ReadRecipients (struct mapitest *mt)
bool | mapitest_oxcmsg_ReloadCachedInformation (struct mapitest *mt)
bool | mapitest_oxcmsg_RemoveAllRecipients (struct mapitest *mt)
bool | mapitest_oxcmsg_SaveChangesMessage (struct mapitest *mt)
bool | mapitest_oxcmsg_SetMessageReadFlag (struct mapitest *mt)
bool | mapitest_oxcmsg_SetMessageStatus (struct mapitest *mt)
bool | mapitest_oxcmsg_SetReadFlags (struct mapitest *mt)

## Detailed Description

Message and Attachment Object Protocol test suite.

## Function Documentation

bool mapitest_oxcmsg_CreateMessage | ( | struct mapitest * | mt | ) |

Test the CreateMessage (0x6) operation

This function:

1. Log on the user private mailbox
2. Open the Outbox folder
3. Create the message
4. Delete the message

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_folder_open(), and mapitest_print_retval().

bool mapitest_oxcmsg_GetMessageStatus | ( | struct mapitest * | mt | ) |

Test the GetMessageStatus (0x1f) operation

This function:

1. Log on the user private mailbox
2. Open the outbox folder
3. Create the message
4. Save the message
5. Get outbox contents table
6. Get messages status
7. Delete the message

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_GetValidAttachments | ( | struct mapitest * | mt | ) |

Test the GetValidAttachments (0x52) and CreateAttach (0x23) operations

This function:

1. Logs on the user private mailbox
2. Open the Inbox folder
3. Create a test message
4. Check the number of valid attachments is zero
5. Create two attachments
6. Check the number of valid attachments is two (numbered 0 and 1)
7. Delete the first attachment
8. Check the number of valid attachments is one (numbered 1)
9. Delete the test message

Parameters

  mt | pointer to the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval_clean(), and mapitest_print_retval_fmt_clean().

bool mapitest_oxcmsg_ModifyRecipients | ( | struct mapitest * | mt | ) |

Test the ModifyRecipients (0xe) operation

This function:

1. Log on the user private mailbox
2. Open the Outbox folder
3. Create the message
4. Resolve recipients names
5. Call ModifyRecipients operation for MAPI_TO, MAPI_CC, MAPI_BCC
6. Delete the message

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_OpenEmbeddedMessage | ( | struct mapitest * | mt | ) |

Test the OpenEmbeddedMessage (0x46) and CreateAttach (0x23) operations

This function:

1. Logs on the user private mailbox
2. Open the Inbox folder
3. Create a test message
4. Embed a message in the test message
5. Delete the test message

Parameters

  mt | pointer to the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_common_message_fill(), mapitest_print(), and mapitest_print_SRowSet().

bool mapitest_oxcmsg_ReadRecipients | ( | struct mapitest * | mt | ) |

Test the ReadRecipients (0xf) operation

This function:

1. Log on the use private mailbox
2. Open the Outbox folder
3. Create the message, set recipients
4. Save the message
5. Read message recipients
6. Delete the message

Parameters

  mt | point on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_ReloadCachedInformation | ( | struct mapitest * | mt | ) |

Test the ReloadCachedInformation (0x10) operation

This function:

1. Logs on to the user private mailbox
2. Open the outbox folder
3. Create the message
4. Save the message
5. Reloads the cached message information
6. Delete the message

Parameters

  mt | pointer to the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print_retval().

bool mapitest_oxcmsg_RemoveAllRecipients | ( | struct mapitest * | mt | ) |

Test the RemoveAllRecipients (0xd) operation

This function:

1. Log on the use private mailbox
2. Open the Outbox folder
3. Create the message, set recipients
4. Save the message
5. Remove all recipients
6. Delete the message

Parameters

  mt | point on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_SaveChangesMessage | ( | struct mapitest * | mt | ) |

Test the SaveChangesMessage (0xc) operation

This function:

1. Log on the user private mailbox
2. Open the Outbox folder
3. Create the message
4. Save the message
5. Delete the message

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print_retval().

bool mapitest_oxcmsg_SetMessageReadFlag | ( | struct mapitest * | mt | ) |

Test the SetMessageReadFlag (0x11) operation

This function:

1. Log on the user private mailbox
2. Open the Inbox folder
3. Create a tmp message
4. Play with SetMessageReadFlag
5. Delete the message

Note: We can test either SetMessageReadFlag was effective by checking its old/new value with GetProps on PR_MESSAGE_FLAGS property.

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_SetMessageStatus | ( | struct mapitest * | mt | ) |

Test the GetMessageStatus (0x1f) operation

This function:

1. Log on the user private mailbox
2. Open the outbox folder
3. Create the message
4. Save the message
5. Get outbox contents table
6. Set different messages status, then get them and compare values
7. Delete the message

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), and mapitest::mem_ctx.

bool mapitest_oxcmsg_SetReadFlags | ( | struct mapitest * | mt | ) |

Test the SetReadFlags (0x66) operation

This function:

1. Opens the Inbox folder and creates some test content
2. Checks that the PR_MESSAGE_FLAGS property on each message is 0x0
3. Apply SetReadFlags() on every second messages
4. Check the results are as expected
5. Apply SetReadFlags() again
6. Check the results are as expected
7. Cleanup

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), and mapitest::mem_ctx.

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