MAPITests 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
module_oxcfold.c File Reference

Folder Object Protocol test suite. More...

## Functions
bool | mapitest_oxcfold_CopyFolder (struct mapitest *mt)
bool | mapitest_oxcfold_CreateDeleteFolder (struct mapitest *mt)
bool | mapitest_oxcfold_CreateFolder (struct mapitest *mt)
bool | mapitest_oxcfold_CreateFolderVariants (struct mapitest *mt)
bool | mapitest_oxcfold_DeleteMessages (struct mapitest *mt)
bool | mapitest_oxcfold_GetContentsTable (struct mapitest *mt)
bool | mapitest_oxcfold_GetHierarchyTable (struct mapitest *mt)
bool | mapitest_oxcfold_GetSearchCriteria (struct mapitest *mt)
bool | mapitest_oxcfold_HardDeleteMessages (struct mapitest *mt)
bool | mapitest_oxcfold_HardDeleteMessagesAndSubfolders (struct mapitest *mt)
bool | mapitest_oxcfold_MoveCopyMessages (struct mapitest *mt)
bool | mapitest_oxcfold_MoveFolder (struct mapitest *mt)
bool | mapitest_oxcfold_OpenFolder (struct mapitest *mt)
bool | mapitest_oxcfold_SetSearchCriteria (struct mapitest *mt)

## Detailed Description

Folder Object Protocol test suite.

## Function Documentation

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

Test the CopyFolder (0x36) operation.

This function:

1. Log on the user private mailbox
2. Open the Inbox folder (source)
3. Create a temporary folder
4. Create a subdirectory
5. Open the Deleted Items folder (destination)
6. Copy the temporary folder from Inbox to DeletedItems
7. Empty and delete the original and copied folder

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_find_folder(), mapitest_common_folder_open(), mapitest_print(), and mapitest_print_retval().

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

Test the CreateFolder (0x1c) and DeleteFolder (0x1d) operations

This is a simpler version of the CreateFolder test below.

This function:

1. Log on the user private mailbox
2. Open the top information folder
3. Create a test directory
4. Delete the folder

Parameters

  mt | the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), and mapitest_print_retval().

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

Test the CreateFolder (0x1c) operation

This function:

1. Log on the user private mailbox
2. Open the top information folder
3. Create a test directory
4. Create sub directories with different container classes
5. Empty the folder
6. Delete the folder

Parameters

  mt | the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_deindent(), mapitest_indent(), mapitest_print(), mapitest_print_retval(), and mapitest_print_retval_fmt().

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

Test the CreateFolder (0x1c) operations

This tests different combinations of folder creation.

This function:

1. Log on the user private mailbox
2. Open the top information folder
3. Create a test directory (or open the directory if it already exists)
4. Delete the test directory
5. Create the test directory again (it should not exist)
6. Try to create another directory with the same name (should error out)
7. Try to create another directory with the same name, but use open if exists
8. Create a generic subfolder
9. Try to create another generic subfolder with the same name (should error out)
10. Try to create another generic subfolder with the same name, but use open if exists
11. Delete the generic subfolder
12. Delete the test directory
    Parameters

      mt | the top-level mapitest structure

    Returns
      true on success, otherwise false

References mapitest_print(), and mapitest_print_retval_clean().

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

Test the DeleteMessages (0x1e) operation

This function:

1. Log on the user private mailbox
2. Open the top of information store
3. Create a test folder
4. Create and save three messages
5. Save the messages
6. Delete the messages
7. Delete the test folder

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print(), and mapitest_print_retval_clean().

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

Test the GetContentsTable (0x5) operation

This function:

1. Log on the user private mailbox
2. Open the top information folder
3. Call the GetContentsTable operation

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print_retval(), and mapitest_print_retval_fmt().

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

Test the GetHierarchyTable (0x4) operation

This function:

1. Log on the user private mailbox
2. Open the top information folder
3. Call the GetHierarchyTable operation

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_print_retval(), and mapitest_print_retval_fmt().

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

Test the GetSearchCriteria (0x31) operation

This function:

1. Log on the user private mailbox
2. Retrieve the inbox folder ID
3. Open the default search folder
4. Create a search folder within this folder
5. Set the message class property on this container
6. Set a restriction criteria
7. Call SetSearchCriteria
8. Call GetSearchCriteria
9. Delete the test search folder

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest::mapi_ctx, and mapitest_print_retval().

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

Test the HardDeleteMessages (0x91) operation.

This function:

1. Log on the user private mailbox
2. Open the Inbox folder (source)
3. Creates 3 sample messages
4. Hard delete the sample messages

Parameters

  mt | pointer to the top-level mapitest structure

Returns
  true on success, otherwise false

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

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

Test the HardDeleteMessagesAndSubfolder (0x92) operation.

This function:

1. Creates a filled test folder
2. Creates 2 subdirectories in the test folder
3. Hard deletes the sample messages and subdirectories

Parameters

  mt | pointer to the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), and mapitest_print_retval().

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

Test the MoveCopyMessages (0x33) operation.

This function:

1. Log on the user private mailbox
2. Open the Inbox folder (source)
3. Open the Deleted Items folder (destination)
4. Creates 3 sample messages
5. Move messages from source to destination

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

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

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

Test the MoveFolder (0x35) operation.

This function:

1. Log on the user private mailbox
2. Open the Inbox folder (source)
3. Create a temporary folder
4. Create 1 message in this new folder
5. Open the Deleted Items folder (destination)
6. Move the temporary folder from Inbox to DeletedItems
7. Empty and delete the moved temporary folder

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_common_find_folder(), mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_print(), and mapitest_print_retval().

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

Test the OpenFolder (0x2) operation

This function:

1. Log on the user private mailbox
2. Open folders located within the top information store folder
3. Open folders located within the Inbox folder

Parameters

  mt | the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest_deindent(), mapitest_indent(), mapitest_print(), mapitest_print_retval(), and mapitest_print_retval_fmt().

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

Test the SetSearchCriteria (0x30) operation

This function:

1. Log on the user private mailbox
2. Retrieve the inbox folder ID
3. Open the default search folder
4. Create a search folder within this folder
5. Set the message class property on this container
6. Set a restriction criteria
7. Call SetSearchCriteria
8. Delete the test search folder

Parameters

  mt | pointer on the top-level mapitest structure

Returns
  true on success, otherwise false

References mapitest::mapi_ctx, and mapitest_print_retval().

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