utils/mapitest/proto.h File Reference

Defines

#define __BEGIN_DECLS
#define __END_DECLS
#define _PRINTF_ATTRIBUTE(a1, a2)
#define _PRINTF_ATTRIBUTE(a1, a2)   PRINTF_ATTRIBUTE(a1, a2)

Functions

void mapitest_common_cleanup (struct mapitest *)
 Convenience function to clean up after logging into the server.
bool mapitest_common_create_filled_test_folder (struct mapitest *)
 Create a test folder, and fill with 10 sample messages.
bool mapitest_common_find_folder (struct mapitest *, mapi_object_t *obj_parent, mapi_object_t *obj_child, const char *)
 Find a folder within a container.
bool mapitest_common_folder_open (struct mapitest *, mapi_object_t *obj_parent, mapi_object_t *obj_child, uint32_t)
 Opens a default folder.
char * mapitest_common_genblob (TALLOC_CTX *, size_t)
 Generate a random blob of readable data.
bool mapitest_common_message_create (struct mapitest *, mapi_object_t *obj_folder, mapi_object_t *obj_message, const char *)
 Create a message ready to submit.
bool mapitest_common_message_delete_by_subject (struct mapitest *, mapi_object_t *obj_folder, const char *)
 This function deletes messages in a folder, based on matching the subject name.
bool mapitest_common_message_fill (struct mapitest *, mapi_object_t *obj_message, const char *)
 Create a message ready to submit.
bool mapitest_common_setup (struct mapitest *, mapi_object_t *, uint32_t *)
 Convenience function to login to the server.
void mapitest_deindent (void)
bool mapitest_errorchecks_simplemapi_c (struct mapitest *)
void mapitest_indent (void)
bool mapitest_lcid_langcode2langtag (struct mapitest *)
bool mapitest_mapidump_appointment (struct mapitest *)
bool mapitest_mapidump_contact (struct mapitest *)
bool mapitest_mapidump_foldercopied (struct mapitest *)
bool mapitest_mapidump_foldercreated (struct mapitest *)
bool mapitest_mapidump_folderdeleted (struct mapitest *)
bool mapitest_mapidump_foldermoved (struct mapitest *)
bool mapitest_mapidump_freebusy (struct mapitest *)
bool mapitest_mapidump_message (struct mapitest *)
bool mapitest_mapidump_messagecopied (struct mapitest *)
bool mapitest_mapidump_messagecreated (struct mapitest *)
bool mapitest_mapidump_messagedeleted (struct mapitest *)
bool mapitest_mapidump_messagemodified (struct mapitest *)
bool mapitest_mapidump_messagemoved (struct mapitest *)
bool mapitest_mapidump_newmail (struct mapitest *)
bool mapitest_mapidump_note (struct mapitest *)
bool mapitest_mapidump_pabentry (struct mapitest *)
bool mapitest_mapidump_recipients (struct mapitest *)
bool mapitest_mapidump_sproptagarray (struct mapitest *)
bool mapitest_mapidump_spropvalue (struct mapitest *)
bool mapitest_mapidump_srowset (struct mapitest *)
bool mapitest_mapidump_task (struct mapitest *)
bool mapitest_noserver_lzfu (struct mapitest *)
bool mapitest_noserver_mapi_properties (struct mapitest *)
bool mapitest_noserver_properties (struct mapitest *)
bool mapitest_noserver_proptagvalue (struct mapitest *)
bool mapitest_noserver_srowset (struct mapitest *)
bool mapitest_nspi_CompareMIds (struct mapitest *)
bool mapitest_nspi_DNToMId (struct mapitest *)
bool mapitest_nspi_GetIDsFromNames (struct mapitest *)
bool mapitest_nspi_GetMatches (struct mapitest *)
bool mapitest_nspi_GetNamesFromIDs (struct mapitest *)
bool mapitest_nspi_GetPropList (struct mapitest *)
bool mapitest_nspi_GetProps (struct mapitest *)
bool mapitest_nspi_GetSpecialTable (struct mapitest *)
bool mapitest_nspi_GetTemplateInfo (struct mapitest *)
bool mapitest_nspi_ModLinkAtt (struct mapitest *)
bool mapitest_nspi_ModProps (struct mapitest *)
bool mapitest_nspi_QueryColumns (struct mapitest *)
bool mapitest_nspi_QueryRows (struct mapitest *)
bool mapitest_nspi_ResolveNames (struct mapitest *)
bool mapitest_nspi_ResortRestriction (struct mapitest *)
bool mapitest_nspi_SeekEntries (struct mapitest *)
bool mapitest_nspi_UpdateStat (struct mapitest *)
bool mapitest_oxcfold_CopyFolder (struct mapitest *)
bool mapitest_oxcfold_CreateFolder (struct mapitest *)
bool mapitest_oxcfold_GetContentsTable (struct mapitest *)
bool mapitest_oxcfold_GetHierarchyTable (struct mapitest *)
bool mapitest_oxcfold_GetSearchCriteria (struct mapitest *)
bool mapitest_oxcfold_HardDeleteMessages (struct mapitest *)
bool mapitest_oxcfold_HardDeleteMessagesAndSubfolders (struct mapitest *)
bool mapitest_oxcfold_MoveCopyMessages (struct mapitest *)
bool mapitest_oxcfold_MoveFolder (struct mapitest *)
bool mapitest_oxcfold_OpenFolder (struct mapitest *)
bool mapitest_oxcfold_SetSearchCriteria (struct mapitest *)
bool mapitest_oxcfxics_GetLocalReplicaIds (struct mapitest *)
bool mapitest_oxcmsg_CreateMessage (struct mapitest *)
bool mapitest_oxcmsg_GetMessageStatus (struct mapitest *)
bool mapitest_oxcmsg_GetValidAttachments (struct mapitest *)
bool mapitest_oxcmsg_ModifyRecipients (struct mapitest *)
bool mapitest_oxcmsg_OpenEmbeddedMessage (struct mapitest *)
bool mapitest_oxcmsg_ReadRecipients (struct mapitest *)
bool mapitest_oxcmsg_ReloadCachedInformation (struct mapitest *)
bool mapitest_oxcmsg_RemoveAllRecipients (struct mapitest *)
bool mapitest_oxcmsg_SaveChangesMessage (struct mapitest *)
bool mapitest_oxcmsg_SetMessageReadFlag (struct mapitest *)
bool mapitest_oxcmsg_SetMessageStatus (struct mapitest *)
bool mapitest_oxcmsg_SetReadFlags (struct mapitest *)
bool mapitest_oxcnotif_RegisterNotification (struct mapitest *)
bool mapitest_oxcprpt_CopyProps (struct mapitest *)
bool mapitest_oxcprpt_CopyTo (struct mapitest *)
bool mapitest_oxcprpt_CopyToStream (struct mapitest *)
bool mapitest_oxcprpt_DeleteProps (struct mapitest *)
bool mapitest_oxcprpt_GetPropList (struct mapitest *)
bool mapitest_oxcprpt_GetProps (struct mapitest *)
bool mapitest_oxcprpt_GetPropsAll (struct mapitest *)
bool mapitest_oxcprpt_NameId (struct mapitest *)
bool mapitest_oxcprpt_NoReplicate (struct mapitest *)
bool mapitest_oxcprpt_SetProps (struct mapitest *)
bool mapitest_oxcprpt_Stream (struct mapitest *)
bool mapitest_oxcprpt_WriteAndCommitStream (struct mapitest *)
bool mapitest_oxcstor_GetOwningServers (struct mapitest *)
bool mapitest_oxcstor_GetReceiveFolder (struct mapitest *)
bool mapitest_oxcstor_GetReceiveFolderTable (struct mapitest *)
bool mapitest_oxcstor_GetStoreState (struct mapitest *)
bool mapitest_oxcstor_Logon (struct mapitest *)
bool mapitest_oxcstor_LongTermId (struct mapitest *)
bool mapitest_oxcstor_PublicFolderIsGhosted (struct mapitest *)
bool mapitest_oxcstor_SetReceiveFolder (struct mapitest *)
bool mapitest_oxctable_Category (struct mapitest *)
bool mapitest_oxctable_CreateBookmark (struct mapitest *)
bool mapitest_oxctable_GetStatus (struct mapitest *)
bool mapitest_oxctable_QueryColumns (struct mapitest *)
bool mapitest_oxctable_QueryRows (struct mapitest *)
bool mapitest_oxctable_Restrict (struct mapitest *)
bool mapitest_oxctable_SeekRow (struct mapitest *)
bool mapitest_oxctable_SeekRowApprox (struct mapitest *)
bool mapitest_oxctable_SeekRowBookmark (struct mapitest *)
bool mapitest_oxctable_SetColumns (struct mapitest *)
bool mapitest_oxomsg_AbortSubmit (struct mapitest *)
bool mapitest_oxomsg_AddressTypes (struct mapitest *)
bool mapitest_oxomsg_GetTransportFolder (struct mapitest *)
bool mapitest_oxomsg_SetSpooler (struct mapitest *)
bool mapitest_oxomsg_SpoolerLockMessage (struct mapitest *)
bool mapitest_oxomsg_SubmitMessage (struct mapitest *)
bool mapitest_oxomsg_TransportNewMail (struct mapitest *)
bool mapitest_oxomsg_TransportSend (struct mapitest *)
bool mapitest_oxorule_GetRulesTable (struct mapitest *)
void mapitest_print (struct mapitest *, const char *,...)
void mapitest_print_headers (struct mapitest *)
void mapitest_print_headers_info (struct mapitest *)
void mapitest_print_headers_server_info (struct mapitest *)
void mapitest_print_line (struct mapitest *, int, char)
void mapitest_print_module_title_end (struct mapitest *)
void mapitest_print_module_title_start (struct mapitest *, const char *)
void mapitest_print_newline (struct mapitest *, int)
void mapitest_print_retval (struct mapitest *, char *)
void mapitest_print_retval_fmt (struct mapitest *, char *, const char *,...)
void mapitest_print_retval_step (struct mapitest *, char *, char *)
void mapitest_print_retval_step_fmt (struct mapitest *, char *, char *, const char *,...)
void mapitest_print_tab (struct mapitest *)
void mapitest_print_test_result (struct mapitest *, char *, bool)
void mapitest_print_test_title_end (struct mapitest *)
void mapitest_print_test_title_start (struct mapitest *, const char *)
void mapitest_print_title (struct mapitest *, const char *, char)
uint32_t mapitest_register_modules (struct mapitest *)
bool mapitest_run_all (struct mapitest *)
bool mapitest_run_test (struct mapitest *, const char *)
uint32_t mapitest_stat_add_result (struct mapitest_suite *, const char *name, bool)
uint32_t mapitest_stat_add_skipped_test (struct mapitest_suite *, const char *name, enum TestApplicabilityFlags)
int32_t mapitest_stat_dump (struct mapitest *)
struct mapitest_statmapitest_stat_init (TALLOC_CTX *)
uint32_t mapitest_suite_add_test (struct mapitest_suite *, const char *name, const char *description, bool(*)(struct mapitest *))
uint32_t mapitest_suite_add_test_flagged (struct mapitest_suite *, const char *name, const char *description, bool(*run)(struct mapitest *test), enum TestApplicabilityFlags)
struct mapitest_suitemapitest_suite_find (struct mapitest *, const char *)
__BEGIN_DECLS struct
mapitest_suite
mapitest_suite_init (struct mapitest *, const char *name, const char *description, bool)
uint32_t mapitest_suite_register (struct mapitest *, struct mapitest_suite *)
bool mapitest_suite_run_test (struct mapitest *, struct mapitest_suite *suite, const char *)
void mapitest_underline (struct mapitest *, const char *, char)
uint32_t module_errorchecks_init (struct mapitest *)
uint32_t module_lcid_init (struct mapitest *)
uint32_t module_mapidump_init (struct mapitest *)
uint32_t module_noserver_init (struct mapitest *)
uint32_t module_nspi_init (struct mapitest *)
uint32_t module_oxcfold_init (struct mapitest *)
uint32_t module_oxcfxics_init (struct mapitest *)
uint32_t module_oxcmsg_init (struct mapitest *)
uint32_t module_oxcnotif_init (struct mapitest *)
uint32_t module_oxcprpt_init (struct mapitest *)
uint32_t module_oxcstor_init (struct mapitest *)
uint32_t module_oxctable_init (struct mapitest *)
uint32_t module_oxomsg_init (struct mapitest *)
uint32_t module_oxorule_init (struct mapitest *)

Define Documentation

#define __BEGIN_DECLS
#define __END_DECLS
#define _PRINTF_ATTRIBUTE (   a1,
  a2 
)
#define _PRINTF_ATTRIBUTE (   a1,
  a2 
)    PRINTF_ATTRIBUTE(a1, a2)

Function Documentation

bool mapitest_common_create_filled_test_folder ( struct mapitest mt  ) 

Create a test folder, and fill with 10 sample messages.

This function creates a test folder (name set by the MT_DIRNAME_TEST define), and fills it with 5 messages with the same subject and 5 messages with the same sender.

Parameters:
mt pointer to the mapitest context

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, MT_DIRNAME_TEST, MT_MAIL_SUBJECT, mt_common_tf_ctx::obj_test_folder, mt_common_tf_ctx::obj_test_msg, mt_common_tf_ctx::obj_top_folder, and mapitest::priv.

Referenced by mapitest_common_setup().

bool mapitest_common_find_folder ( struct mapitest ,
mapi_object_t *  obj_parent,
mapi_object_t *  obj_child,
const char *   
)

Find a folder within a container.

References mapitest::mem_ctx.

Referenced by mapitest_oxcfold_CopyFolder(), and mapitest_oxcfold_MoveFolder().

bool mapitest_common_folder_open ( struct mapitest mt,
mapi_object_t *  obj_parent,
mapi_object_t *  obj_child,
uint32_t  olNum 
)

Opens a default folder.

This function opens one of the default (standard) folders, returning the folder as obj_child. olNum may be one of:

  • olFolderTopInformationStore
  • olFolderDeletedItems
  • olFolderOutbox
  • olFolderSentMail
  • olFolderInbox
  • olFolderCalendar
  • olFolderContacts
  • olFolderJournal
  • olFolderNotes
  • olFolderTasks
  • olFolderDrafts
Parameters:
mt pointer to the top level mapitest structure
obj_parent parent folder (usually the message store, must be opened)
obj_child the folder that has been opened
olNum the folder identifier (see list above)
Returns:
true on success, false on failure

References mapitest_print().

Referenced by mapitest_common_setup(), mapitest_oxcfold_CopyFolder(), mapitest_oxcfold_MoveFolder(), mapitest_oxcmsg_CreateMessage(), mapitest_oxcmsg_GetValidAttachments(), mapitest_oxcmsg_OpenEmbeddedMessage(), mapitest_oxcmsg_SetMessageReadFlag(), mapitest_oxcnotif_RegisterNotification(), mapitest_oxomsg_SpoolerLockMessage(), mapitest_oxomsg_TransportSend(), and mapitest_oxorule_GetRulesTable().

char* mapitest_common_genblob ( TALLOC_CTX *  mem_ctx,
size_t  len 
)

Generate a random blob of readable data.

Parameters:
mem_ctx the talloc memory context to create the blob in
len the length of the blob to create
Returns:
random blob of readable data, of length len bytes, with a null terminator.
Note:
the data is from 0..len, and the null terminator is at position len+1. So the returned array is actually len+1 bytes in total.

Referenced by mapitest_oxcprpt_CopyToStream(), mapitest_oxcprpt_Stream(), and mapitest_oxcprpt_WriteAndCommitStream().

bool mapitest_common_message_delete_by_subject ( struct mapitest mt,
mapi_object_t *  obj_folder,
const char *  subject 
)

This function deletes messages in a folder, based on matching the subject name.

This is meant to clean up a folder after a test has been run.

Parameters:
mt pointer to the top level mapitest structure
obj_folder the folder to search through
subject the message subject to match

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

Referenced by mapitest_oxomsg_AbortSubmit(), mapitest_oxomsg_SubmitMessage(), and mapitest_oxomsg_TransportSend().

bool mapitest_common_message_fill ( struct mapitest ,
mapi_object_t *  obj_message,
const char *   
)

Create a message ready to submit.

References mapitest::info, mapitest_print(), and mapitest::mem_ctx.

Referenced by mapitest_common_message_create(), and mapitest_oxcmsg_OpenEmbeddedMessage().

bool mapitest_common_setup ( struct mapitest mt,
mapi_object_t *  obj_htable,
uint32_t *  count 
)

Convenience function to login to the server.

This functions logs into the server, gets the top level store, and gets the hierarchy table for the top level store (which is returned as obj_htable). It also creates a test folder with 10 test messages.

Parameters:
mt pointer to the top-level mapitest structure
obj_htable the hierarchy table for the top level store
count the number of rows in the top level hierarchy table
Returns:
true on success, otherwise false

References mapitest_common_create_filled_test_folder(), mapitest_common_folder_open(), mapitest_print_retval(), mapitest::mem_ctx, mt_common_tf_ctx::obj_store, mt_common_tf_ctx::obj_top_folder, mapitest::priv, and mapitest::session.

Referenced by mapitest_oxcfold_HardDeleteMessagesAndSubfolders(), mapitest_oxcmsg_SetReadFlags(), mapitest_oxctable_Category(), mapitest_oxctable_CreateBookmark(), mapitest_oxctable_GetStatus(), mapitest_oxctable_QueryColumns(), mapitest_oxctable_QueryRows(), mapitest_oxctable_Restrict(), mapitest_oxctable_SeekRow(), mapitest_oxctable_SeekRowApprox(), mapitest_oxctable_SeekRowBookmark(), mapitest_oxctable_SetColumns(), and mapitest_oxomsg_TransportNewMail().

bool mapitest_errorchecks_simplemapi_c ( struct mapitest mt  ) 

Verify simplemapi.c functions

This function:

  1. Tests the sanity checks in GetDefaultPublicFolder
  2. Tests the sanity checks in GetDefaultFolder
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print().

Referenced by module_errorchecks_init().

bool mapitest_lcid_langcode2langtag ( struct mapitest mt  ) 

Verify libmapi/util/lcid.c functions

This function:

  1. exercises lcid_langcode2langtag()
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print().

Referenced by module_lcid_init().

bool mapitest_mapidump_appointment ( struct mapitest mt  ) 

Test message dump using mapidump_appointment

This function:

  1. Tests the mapidump_appointment() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_contact ( struct mapitest mt  ) 

Test dump using mapidump_contact

This function:

  1. Tests the mapidump_contact() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_foldercopied ( struct mapitest mt  ) 

Test dump of a folder copy notification

This function:

  1. Creates a FolderMoveCopyNotification structure
  2. Dumps that structure out using mapidump_foldercopy()
  3. Tests mapidump_foldercopy() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_foldercreated ( struct mapitest mt  ) 

Test dump of a Folder creation notification

This function:

  1. Creates a FolderCreatedNotification structure with a null tag set
  2. Dumps that structure out using mapidump_foldercreated()
  3. Adds a set of tags to the FolderCreatedNotification
  4. Dumps the modified FolderCreatedNotification structure using mapidump_foldercreated()
  5. Tests mapidump_foldercreated() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_folderdeleted ( struct mapitest mt  ) 

Test dump of a Folder deletion notification

This function:

  1. Creates a FolderDeletedNotification structure
  2. Dumps that structure out using mapidump_folderdeleted()
  3. Tests mapidump_folderdeleted() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_foldermoved ( struct mapitest mt  ) 

Test dump of a folder move notification

This function:

  1. Creates a FolderMoveCopyNotification structure
  2. Dumps that structure out using mapidump_foldermoved()
  3. Tests mapidump_foldermoved() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_freebusy ( struct mapitest mt  ) 

Test dump of a free/busy event

This function:

  1. builds a freebusy binary event
  2. tests dumping it using mapidump_freebusy_event()
  3. modifies the event, and dumps it again
  4. modifies the event, and dumps it again
  5. tests dumping a date using mapidump_freebusy_date()
  6. tests each months for mapidump_freebusy_month()
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest_print(), and mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_message ( struct mapitest mt  ) 

Test dump of an email message using mapidump_message

This function:

  1. Builds an indicative email using mapi_SPropValues (sets no codepage)
  2. Calls the mapidump_appointment() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_messagecopied ( struct mapitest mt  ) 

Test dump of a Message copied notification

This function:

  1. Creates a MessageCopiedNotification structure
  2. Dumps that structure out using mapidump_messagecopied()
  3. Tests mapidump_messagecopied() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_messagecreated ( struct mapitest mt  ) 

Test dump of a Message creation notification

This function:

  1. Creates a MessageCreatedNotification structure
  2. Dumps that structure out using mapidump_messagecreated()
  3. Adds tags to the MessageCreatedNotification structure
  4. Dumps the structure again.
  5. Tests mapidump_messagecreated() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_messagedeleted ( struct mapitest mt  ) 

Test dump of a Message deletion notification

This function:

  1. Creates a MessageDeletedNotification structure
  2. Dumps that structure out using mapidump_messagedeleted()
  3. Tests mapidump_messagedeleted() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_messagemodified ( struct mapitest mt  ) 

Test dump of a Message modification notification

This function:

  1. Creates a MessageModifiedNotification structure
  2. Dumps that structure out using mapidump_messagemodified()
  3. Adds tags to the MessageModifiedNotification structure
  4. Dumps the structure again.
  5. Tests mapidump_messagemodified() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_messagemoved ( struct mapitest mt  ) 

Test dump of a Message moved notification

This function:

  1. Creates a MessageMovedNotification structure
  2. Dumps that structure out using mapidump_messagemoved()
  3. Tests mapidump_messagemoved() with a null argument
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_newmail ( struct mapitest mt  ) 

Test dump of an new mail notification

This function:

  1. Tests the mapidump_msgflags function with no bits set
  2. Tests the mapidump_msgflags function with one bit set
  3. Tests the mapidump_msgflags function with all bits set
  4. Builds an indicative new mail notification
  5. Calls the mapidump_newmail function to test dumping of that new mail notification
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

Referenced by module_mapidump_init().

bool mapitest_mapidump_note ( struct mapitest mt  ) 

Test dump using mapidump_note

This function:

  1. Tests the mapidump_note() function on a plain text message
  2. Tests the mapidump_note() function on a HTML message
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_pabentry ( struct mapitest mt  ) 

Test dump using mapidump_pabentry

This function:

  1. Tests the mapidump_PAB_entry() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_recipients ( struct mapitest mt  ) 

Test dump of a set of recipients

This function:

  1. builds a recipient list
  2. dumps out the recipient list using mapidump_Recipients()
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_sproptagarray ( struct mapitest mt  ) 

Test dump using mapidump_SPropTagArray

This function:

  1. Tests the mapidump_SPropTagArray() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_spropvalue ( struct mapitest mt  ) 

Test dump using mapidump_SPropValue

This function:

  1. Tests the mapidump_SPropValue() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_srowset ( struct mapitest mt  ) 

Test dump using mapidump_SRowSet

This function:

  1. Tests the mapidump_SRowSet() function
  2. Indirectly tests the mapidump_SRow() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_mapidump_task ( struct mapitest mt  ) 

Test dump using mapidump_task

This function:

  1. Tests the mapidump_task() function
  2. modifies the task to be completed
  3. Tests the associated get_importance() function
  4. Tests the associated get_task_status() function
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false
Note:
This currently doesn't check the results are sane, so manual inspection is required

References mapitest_print(), and mapitest::mem_ctx.

Referenced by module_mapidump_init().

bool mapitest_noserver_lzfu ( struct mapitest mt  ) 

Test the Compressed RTF decompression routine.

This function:

  1. Loads some test data and checks it
  2. Decompresses the test data
  3. Checks that the decompressed data matches the expected result
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, RTF_COMPRESSED1_HEX, RTF_COMPRESSED2_HEX, RTF_UNCOMPRESSED1, and RTF_UNCOMPRESSED2.

Referenced by module_noserver_init().

bool mapitest_noserver_mapi_properties ( struct mapitest mt  ) 

Test the mapi_SPropValue_array handling

This function:

  1. Builds a mapi_SPropValue_array
  2. Checks that appropriate values can be retrieved
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), and mapitest::mem_ctx.

Referenced by module_noserver_init().

bool mapitest_noserver_properties ( struct mapitest mt  ) 

Test the property setter / getter code

This function:

  1. Checks setting / getting on an SPropValue
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

Referenced by module_noserver_init().

bool mapitest_noserver_proptagvalue ( struct mapitest mt  ) 

Test the get_proptag_value() function

This function:

  1. Checks the first value in the list
  2. Checks a random value from the list
  3. Checks the last value in the list
  4. Checks a value that doesn't exist
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print().

Referenced by module_noserver_init().

bool mapitest_noserver_srowset ( struct mapitest mt  ) 

Test the SRowSet parsing / assembly code

This function:

  1. Loads some test data and checks it
  2. Parses the test data
  3. Checks that the parsed data matches the expected result
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print().

Referenced by module_noserver_init().

bool mapitest_nspi_CompareMIds ( struct mapitest mt  ) 

Test the NspiCompareMIds RPC operation (0x0a)

Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_DNToMId ( struct mapitest mt  ) 

Test the NspiDNToMId RPC operation (0x7)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetIDsFromNames ( struct mapitest mt  ) 

Test the NspiGetIDsFromNames RPC operation (0x12)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetMatches ( struct mapitest mt  ) 

Test the NspiGetMatches RPC operation (0x5)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetNamesFromIDs ( struct mapitest mt  ) 

Test the NspiGetNamesFromIDs RPC operation (0x11)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetPropList ( struct mapitest mt  ) 

Test the NspiGetPropList RPC operation (0x08)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

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

Referenced by module_nspi_init().

bool mapitest_nspi_GetProps ( struct mapitest mt  ) 

Test the NspiGetProps RPC operation (0x09)

Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetSpecialTable ( struct mapitest mt  ) 

Test the NspiGetSpecialTable RPC operation (0x0c)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetTemplateInfo ( struct mapitest mt  ) 

Test the NspiGetTemplateInfo RPC operation (0x0d)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ModLinkAtt ( struct mapitest mt  ) 

Test the NspiModLinkAtt RPC operation (0x0e)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ModProps ( struct mapitest mt  ) 

Test the NspiModProps RPC operation (0xb)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_QueryColumns ( struct mapitest mt  ) 

Test the NspiQueryColumns RPC operation (0x10)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_QueryRows ( struct mapitest mt  ) 

Test the NspiQueryRows RPC operation (0x3)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ResolveNames ( struct mapitest mt  ) 

Test the NspiResolveNames and NspiResolveNamesW RPC operations (0x13 and 0x14)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest::info, mapitest_print_retval(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ResortRestriction ( struct mapitest mt  ) 

Test the NspiResortRestriction RPC operation (0x6)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_SeekEntries ( struct mapitest mt  ) 

Test the NspiSeekEntries RPC operation (0x04)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_UpdateStat ( struct mapitest mt  ) 

Test the NspiUpdateStat RPC operation (0x02)

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_nspi_init().

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(), mapitest_print_retval(), MT_DIRNAME_NOTE, MT_DIRNAME_TOP, and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval_fmt(), MT_DIRNAME_TOP, and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval_fmt(), and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval_fmt(), and mapitest::session.

Referenced by module_oxcfold_init().

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_print_retval(), and mapitest::session.

Referenced by module_oxcfold_init().

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_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval(), mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxcfold_init().

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_common_message_create(), mapitest_print_retval(), mapitest::mem_ctx, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval(), MT_DIRNAME_TOP, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcfold_init().

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(), mapitest_print_retval_fmt(), and mapitest::session.

Referenced by module_oxcfold_init().

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_print_retval(), and mapitest::session.

Referenced by module_oxcfold_init().

bool mapitest_oxcfxics_GetLocalReplicaIds ( struct mapitest mt  ) 

Test the GetLocalReplicaIds (0x7f) operation

This function:

  1. Log on private message store
  2. Reserve a range of Ids

References mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, mt_common_tf_ctx::obj_store, and mapitest::session.

Referenced by module_oxcfxics_init().

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(), mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcmsg_init().

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(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcmsg_init().

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(), OXCMSG_SETREADFLAGS, and mapitest::session.

Referenced by module_oxcmsg_init().

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::info, mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcmsg_init().

bool mapitest_oxcmsg_OpenEmbeddedMessage ( struct mapitest mt  ) 

Test the OpenEmbeddedMessage (0x46) and CreateAttach 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(), mt_common_tf_ctx::obj_store, OXCMSG_SETREADFLAGS, and mapitest::session.

Referenced by module_oxcmsg_init().

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::info, mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcmsg_init().

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(), and mapitest::session.

Referenced by module_oxcmsg_init().

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::info, mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcmsg_init().

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(), and mapitest::session.

Referenced by module_oxcmsg_init().

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(), mapitest::mem_ctx, OXCMSG_SETREADFLAGS, and mapitest::session.

Referenced by module_oxcmsg_init().

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::mem_ctx, and mapitest::session.

Referenced by module_oxcmsg_init().

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(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxcmsg_init().

bool mapitest_oxcnotif_RegisterNotification ( struct mapitest mt  ) 

Test the RegisterNotification (0x29) operation

This function:

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References cb(), mapitest_common_folder_open(), mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcnotif_init().

bool mapitest_oxcprpt_CopyProps ( struct mapitest mt  ) 

Test the CopyProps (0x67) operation

This function:

  1. Opens the mailbox
  2. Creates a test folder
  3. Creates a reference email, and sets some properties on it
  4. Checks those properties are set correctly
  5. Creates a second email, and sets some (different) properties on it
  6. Checks those properties on the second folder are set correctly
  7. Copies properties from the reference email to the second email (no overwrite)
  8. Checks that properties on both emails are correct
  9. Copies properties again, but with overwrite
  10. Checks that properties on both emails are correct
  11. Moves properties from the original email to the second email (no overwrite)
  12. Checks that properties on both emails are correct
  13. Deletes both emails and the test folder
Todo:
It would be useful to test the problem return values
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, MT_DIRNAME_TOP, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_CopyTo ( struct mapitest mt  ) 

Test the CopyTo (0x39) operation

This function:

  1. Opens the mailbox
  2. Creates a test folder
  3. Creates a reference email, and sets some properties on it
  4. Checks those properties are set correctly
  5. Creates a second email, and sets some (different) properties on it
  6. Checks those properties on the second folder are set correctly
  7. Copies properties from the reference email to the second email (no overwrite)
  8. Checks that properties on both emails are correct
  9. Copies properties again, but with overwrite
  10. Checks that properties on both emails are correct
  11. Moves properties from the original email to the second email (no overwrite)
  12. Checks that properties on both emails are correct
  13. Creates an attachment (with properties) on the reference email
  14. Creates an attachment (with different properties) on the target email
  15. Copies the properties on the reference email to the target
  16. Checks the properties on both attachments are correct
  17. Creates another folder
  18. Copies properties from the test folder to the new folder
  19. Checks that the properties on both folders are correct
  20. Deletes both emails and the test folders
Todo:
It would be useful to test the problem return values
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, MT_DIRNAME_TOP, MT_MAIL_ATTACH, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_CopyToStream ( struct mapitest mt  ) 

Test the CopyToStream (0x3a) operation

This function:

  1. Logon the mailbox
  2. Open the inbox folder
  3. Create a sample messages with an attachment
  4. Create 2 streams
  5. Fill the first stream with random data
  6. Seek stream positions to the beginning
  7. CopyToStream data from first stream to the second stream
  8. Read dst stream and compare with src stream
  9. Delete the message
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_genblob(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, MT_MAIL_SUBJECT, MT_STREAM_MAX_SIZE, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_DeleteProps ( struct mapitest mt  ) 

Test the DeleteProps (0xb) operation)

This function:

  1. Opens the mailbox
  2. Create a test folder
  3. Creates a reference email, and sets some properties on it
  4. Delete properties from this message
  5. Checks that properties got deleted
  6. Deletes both email and the test folder
Todo:
It would be useful to test the problem return values
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, MT_DIRNAME_TOP, MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_GetPropList ( struct mapitest mt  ) 

Test the GetPropList (0x9) operation

This function:

  1. Log on the user private mailbox
  2. Retrieve the list of properties associated to the store object object
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_GetProps ( struct mapitest mt  ) 

Test the GetProps (0x7) operation

This function:

  1. Log on the user private mailbox
  2. Retrieve the properties list using GetPropList
  3. Retrieve their associated values using the GetProps operation
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_GetPropsAll ( struct mapitest mt  ) 

Test the GetPropsAll (0x8) operation

This function:

  1. Log on the user private mailbox
  2. Retrieve the whole set of properties and values associated to the store object
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_NameId ( struct mapitest mt  ) 

Test the GetPropertyIdsFromNames (0x56), GetNamesFromPropertyIds (0x55) and QueryNamesFromIDs (0x5f) operations

This function:

  1. Logs into the server
  2. Create a test folder and test message
  3. Creates one MNID_ID property
  4. Creates one MNID_STRING property
  5. Builds a table of Name, ID pairs using QueryNamesFromIDs()
  6. Iterates over names, and calls GetIDsFromNames() on each name
  7. Iterates over IDs, and calls GetNamesFromIDs() on each ID
  8. Cleans up
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, MT_DIRNAME_TOP, MT_MAIL_SUBJECT, NAMEDPROP_IDNUM, NAMEDPROP_NAME, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_NoReplicate ( struct mapitest mt  ) 

Test the SetPropertiesNoReplicate (0x79) and DeletePropertiesNoReplicate (0x7a) operations

This function:

  1. Opens the mailbox
  2. Create a test folder
  3. Sets some properties on the test folder
  4. Delete properties from the test folder
  5. Deletes the test folder
Todo:
It would be useful to test the problem return values
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, MT_DIRNAME_TOP, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_SetProps ( struct mapitest mt  ) 

Test the SetProps (0xa) operation

This function:

  1. Logon Private mailbox
  2. Use GetProps to retrieve the mailbox name
  3. Change it using SetProps
  4. Reset the mailbox name to its original value
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, MT_ERROR, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_Stream ( struct mapitest mt  ) 

Test Stream operations. This test uses related stream operations: OpenStream (0x2b), SetStreamSize (0x2f), WriteStream (0x2d), CommitStream (0x5d), ReadStream (0x2c), SeekStream (0x2e), LockRegionStream (0x5b), UnlockRegionStream (0x5c), CloneStream (0x3b)

This function:

  1. Logon
  2. Open Outbox folder
  3. Create message
  4. Create attachment and set properties
  5. Open the stream
  6. Set the stream size
  7. Write into the stream
  8. Commit the stream
  9. Save the message
  10. Get stream size and compare values
  11. Open the stream again with different permissions
  12. Read the stream and compare buffers
  13. SeekStream at 0x1000 from the end of the stream
  14. Read the 0x1000 last bytes and check if it matches
  15. Lock a range of the stream
  16. TODO: test if the locking works
  17. Unlock a range of the stream
  18. Clone the stream
  19. Delete the message;
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise -1

References mapitest_common_genblob(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, MT_MAIL_SUBJECT, MT_STREAM_MAX_SIZE, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_WriteAndCommitStream ( struct mapitest mt  ) 

Test WriteAndCommitStream (0x90) operation.

This function:

  1. Logs in
  2. Opens the Outbox folder
  3. Creates a test message
  4. Creates an attachment on the test messages and set properties on the attachment
  5. Opens a stream on the attachment
  6. Sets the stream size
  7. Write and commits into the stream
  8. Saves the message
  9. Gets stream size and compare values
  10. Opens the stream again with different permissions
  11. Reads the stream and compares buffers
  12. Deletes the test message
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise -1

References mapitest_common_genblob(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, MT_MAIL_SUBJECT, MT_STREAM_MAX_SIZE, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcstor_GetOwningServers ( struct mapitest mt  ) 

Test the GetOwningServers (0x42) operation

This function:

  1. Log on the public folders store
  2. Open a public folder
  3. Call the GetOwningServers operation
Parameters:
mt the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_GetReceiveFolder ( struct mapitest mt  ) 

Test the GetReceiveFolder (0x27) operation

This function:

  1. Log on the user private mailbox
  2. Call the GetReceiveFolder operation
Parameters:
mt the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_GetReceiveFolderTable ( struct mapitest mt  ) 

Test the GetReceiveFolderTable (0x68) operation

This function:

  1. Log on the user private mailbox
  2. Call the GetReceiveFolderTable operation
Parameters:
mt the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_GetStoreState ( struct mapitest mt  ) 

Test the GetStoreState (0x7b) operation

This function:

  1. Logs into the user private mailbox
  2. Retrieve the store state
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_Logon ( struct mapitest mt  ) 

Test the Logon (0xFE) operation

This function:

  1. Log on the user private mailbox
  2. Log on the public folder store
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_LongTermId ( struct mapitest mt  ) 

Test the LongTermIdFromId (0x43) and IdFromLongTermId (0x44) operations

This function:

  1. Logs into the user private mailbox
  2. Open the Receive Folder
  3. Looks up the long term id for the receive folder FID
  4. Looks up the short term id for the long term id
  5. Checks the id matches the original FID
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_PublicFolderIsGhosted ( struct mapitest mt  ) 

Test the PublicFolderIsGhosted (0x45) operation

This function:

  1. Log on the public folders store
  2. Open a public folder
  3. Call the PublicFolderIsGhosted operation
Parameters:
mt the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxcstor_SetReceiveFolder ( struct mapitest mt  ) 

Test the SetReceiveFolder (0x26) operation

This function:

  1. Log on the user private mailbox
  2. Call the SetReceiveFolder operation
Parameters:
mt the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), and mapitest::session.

Referenced by module_oxcstor_init().

bool mapitest_oxctable_Category ( struct mapitest mt  ) 

Test the SortTable (0x13), ExpandRow (0x59), CollapseRow(0x5a), GetCollapseState(0x6b) and SetCollapseState (0x6c) operations

This function:

  1. Opens the Inbox folder and creates some test content
  2. Checks that the content is OK
  3. Applies a sort and categorisation
  4. Checks the results are as expected.
  5. Save away the Row ID and Insatnce Number for the first header
  6. Collapse the first category
  7. Checks the results are as expected.
  8. Save the "collapse state"
  9. Expand the first category again
  10. Checks the results are as expected
  11. Restore the saved "collapse state"
  12. Checks the results are as expected
  13. Cleans up
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(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxctable_init().

bool mapitest_oxctable_CreateBookmark ( struct mapitest mt  ) 

Test the CreateBookmark (0x1b) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. Customize the MAPI table view
  3. CreateBookmark for each table's row
  4. Free Bookmark for each created bookmark
  5. Cleans up
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

Referenced by module_oxctable_init().

bool mapitest_oxctable_GetStatus ( struct mapitest mt  ) 

Test the GetStatus (0x16) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. Call GetStatus
  3. Cleans up

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

Referenced by module_oxctable_init().

bool mapitest_oxctable_QueryColumns ( struct mapitest mt  ) 

Test the QueryColumns (0x37) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. Calls the QueryColumn operation
  3. Calls SetColumns on the test folder
  4. Checks that QueryColumns on the test folder is correct
  5. Cleans up
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval(), mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxctable_init().

bool mapitest_oxctable_QueryRows ( struct mapitest mt  ) 

Test the QueryRows (0x15) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. Set the required columns
  3. Calls QueryRows until the end of the table
  4. Open the test folder, and get its contents
  5. Calls QueryRows until the end of the test folder
  6. Checks the results are as expected.
  7. Cleans up
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(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxctable_init().

bool mapitest_oxctable_Restrict ( struct mapitest mt  ) 

Test the Restrict (0x14) operation

This function:

  1. Opens the Inbox folder and creates some test content
  2. Checks that the content is OK
  3. Applies a filter
  4. Checks the results are as expected.
  5. Resets the table
  6. Checks the results are as expected.
  7. Cleans up
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(), mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxctable_init().

bool mapitest_oxctable_SeekRow ( struct mapitest mt  ) 

Test the SeekRow (0x18) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. SeekRow with BOOKMARK_BEGINNING
  3. SeekRow with BOOKMARK_END
  4. SeekRow with BOOKMARK_CURRENT
  5. Cleans up
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), and mapitest_print_retval_fmt().

Referenced by module_oxctable_init().

bool mapitest_oxctable_SeekRowApprox ( struct mapitest mt  ) 

Test the SeekRowApprox (0x1a) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. SeekRowApprox with 0/1, 1/1 and 1/2 fractional values
  3. Cleans up
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), and mapitest_print_retval_fmt().

Referenced by module_oxctable_init().

bool mapitest_oxctable_SeekRowBookmark ( struct mapitest mt  ) 

Test the SeekRowBookmark (0x19) operation

This function:

  1. Open the Inbox folder and retrieve the hierarchy table
  2. Customize the MAPI table view
  3. SeekBookmark for each table's row
  4. Free Bookmark for each created bookmark
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval(), mapitest_print_retval_fmt(), and mapitest::mem_ctx.

Referenced by module_oxctable_init().

bool mapitest_oxctable_SetColumns ( struct mapitest mt  ) 

Test the SetColumns (0x12) operation

This function:

  1. Opens the Inbox folder and gets the hierarchy table
  2. Calls the SetColumns operation
  3. Cleans up
Parameters:
mt pointer to the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval(), and mapitest::mem_ctx.

Referenced by module_oxctable_init().

bool mapitest_oxomsg_AbortSubmit ( struct mapitest mt  ) 

Test the AbortSubmit (0x34) operation

This function:

  1. Log on the user private mailbox
  2. Open the Outbox folder
  3. Create a sample message
  4. Submit the message
  5. Abort the submit operation
  6. Delete the message
  7. Clean up folders

Note: This operation may fail since it depends on how busy the server is when we submit the message. It is possible the message gets already processed before we have time to abort the message.

From preliminary tests, AbortSubmit returns MAPI_E_SUCCESS when we call SubmitMessage with SubmitFlags set to 0x2.

Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_common_message_delete_by_subject(), mapitest_print_retval(), MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_AddressTypes ( struct mapitest mt  ) 

Test the AddressTypes (0x49) operation

This function:

  1. Log on the user private mailbox
  2. Call the AddressTypes operation
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print(), and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_GetTransportFolder ( struct mapitest mt  ) 

Test the GetTransportFolder (0x6d) operation

This function:

  1. Log on the user private mailbox
  2. Retrieves the folder ID of temporary transport folder
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval_fmt(), mt_common_tf_ctx::obj_store, and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_SetSpooler ( struct mapitest mt  ) 

Test the SetSpooler (0x47) operation

This function:

  1. Log on the user private mailbox
  2. Informs the server it will acts as an email spooler
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_print_retval(), and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_SpoolerLockMessage ( struct mapitest mt  ) 

Test the SpoolerLockMessage (0x48) operation

This function:

  1. Log on the user private mailbox
  2. Informs the server it will acts as an email spooler
  3. Create a message in the outbox folder
  4. Save message changes and Submit the message
  5. Lock the message
  6. Unlock-Finish the message
  7. Deletes the message
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(), MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_SubmitMessage ( struct mapitest mt  ) 

Test the SubmitMessage (0x32) operation

This function:

  1. Log on the user private mailbox
  2. Open the Outbox folder
  3. Create a sample message
  4. Submit the message
  5. Delete the message
  6. Clean up folders
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_message_create(), mapitest_common_message_delete_by_subject(), mapitest_print_retval(), MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_TransportNewMail ( struct mapitest mt  ) 

Test the TransportNewMail (0x51) operation

This function:

  1. Logs on to the user private mailbox
  2. Create a filled test folder, and open it.
  3. Perform the TransportNewMail operation
  4. Clean up test environment
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval(), mt_common_tf_ctx::obj_test_folder, mt_common_tf_ctx::obj_test_msg, and mapitest::priv.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_TransportSend ( struct mapitest mt  ) 

Test the TransportSend (0x4a) operation

This function:

  1. Logs on to the user private mailbox
  2. Opens the outbox folder
  3. Create the test message
  4. Save changes to the message
  5. Perform the TransportSend operation
  6. Dump the properties
  7. Clean up folders
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_common_message_delete_by_subject(), mapitest_print(), mapitest_print_retval(), MT_MAIL_SUBJECT, and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxorule_GetRulesTable ( struct mapitest mt  ) 

Test the GetRulesTable (0x3f) operation

This function:

  1. Log on the user private mailbox
  2. Open the inbox folder
  3. Retrieve the rules table
Parameters:
mt pointer on the top-level mapitest structure
Returns:
true on success, otherwise false

References mapitest_common_folder_open(), mapitest_print_retval(), mt_common_tf_ctx::obj_store, and mapitest::session.

Referenced by module_oxorule_init().

void mapitest_print ( struct mapitest mt,
const char *  format,
  ... 
)

Print a string in the stream

Parameters:
mt pointer to the top-level mapitest structure
format the format string
... the format string parameters

References mapitest_print_tab(), and mapitest::stream.

Referenced by mapitest_common_cleanup(), mapitest_common_create_filled_test_folder(), mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_common_message_delete_by_subject(), mapitest_common_message_fill(), mapitest_errorchecks_simplemapi_c(), mapitest_lcid_langcode2langtag(), mapitest_mapidump_freebusy(), mapitest_mapidump_task(), mapitest_noserver_lzfu(), mapitest_noserver_mapi_properties(), mapitest_noserver_proptagvalue(), mapitest_noserver_srowset(), mapitest_nspi_CompareMIds(), mapitest_nspi_GetPropList(), mapitest_nspi_QueryColumns(), mapitest_nspi_UpdateStat(), mapitest_oxcfold_CopyFolder(), mapitest_oxcfold_CreateFolder(), mapitest_oxcfold_HardDeleteMessages(), mapitest_oxcfold_HardDeleteMessagesAndSubfolders(), mapitest_oxcfold_MoveFolder(), mapitest_oxcfold_OpenFolder(), mapitest_oxcfxics_GetLocalReplicaIds(), mapitest_oxcmsg_GetValidAttachments(), mapitest_oxcmsg_OpenEmbeddedMessage(), mapitest_oxcmsg_SetMessageReadFlag(), mapitest_oxcmsg_SetMessageStatus(), mapitest_oxcmsg_SetReadFlags(), mapitest_oxcprpt_CopyProps(), mapitest_oxcprpt_CopyTo(), mapitest_oxcprpt_CopyToStream(), mapitest_oxcprpt_DeleteProps(), mapitest_oxcprpt_NameId(), mapitest_oxcprpt_NoReplicate(), mapitest_oxcprpt_SetProps(), mapitest_oxcprpt_Stream(), mapitest_oxcprpt_WriteAndCommitStream(), mapitest_oxcstor_GetOwningServers(), mapitest_oxcstor_LongTermId(), mapitest_oxcstor_PublicFolderIsGhosted(), mapitest_oxctable_Category(), mapitest_oxctable_GetStatus(), mapitest_oxctable_QueryColumns(), mapitest_oxctable_QueryRows(), mapitest_oxctable_Restrict(), mapitest_oxomsg_AddressTypes(), mapitest_oxomsg_SpoolerLockMessage(), mapitest_oxomsg_TransportSend(), mapitest_print_headers_info(), mapitest_print_headers_server_info(), mapitest_print_module_title_start(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), mapitest_print_test_result(), mapitest_print_test_title_start(), and mapitest_stat_dump().

void mapitest_print_headers ( struct mapitest mt  ) 

Print mapitest report headers

Parameters:
mt pointer to the top-level mapitest structure

References mapitest_deindent(), mapitest_indent(), mapitest_print_headers_info(), mapitest_print_headers_server_info(), mapitest_print_newline(), and mapitest::no_server.

Referenced by main().

void mapitest_print_headers_info ( struct mapitest mt  ) 

Print mapitest report headers information

Parameters:
mt pointer to the top-level mapitest structure

References mapitest::confidential, mapitest_deindent(), mapitest_indent(), mapitest_print(), mapitest_print_newline(), MT_HDR_FMT, MT_HDR_FMT_DATE, MT_HDR_FMT_SECTION, MT_HDR_FMT_SUBSECTION, MT_NO, and MT_YES.

Referenced by mapitest_print_headers().

void mapitest_print_headers_server_info ( struct mapitest mt  ) 

Print a report of the Exchange server and account information

Parameters:
mt pointer to the top-level mapitest structure

References mapitest::confidential, mapitest::info, mapitest_deindent(), mapitest_indent(), mapitest_print(), mapitest_print_newline(), MT_CONFIDENTIAL, MT_HDR_FMT_SECTION, MT_HDR_FMT_SUBSECTION, mapitest::online, mapitest::org, and mapitest::org_unit.

Referenced by mapitest_print_headers().

void mapitest_print_line ( struct mapitest mt,
int  len,
char  delim 
)

Print a line using a delimiter

Parameters:
mt pointer to the top-level mapitest structure
len the length of the line to print
delim the line delimiter

References mapitest_print_newline(), and mapitest::stream.

Referenced by mapitest_print_module_title_end(), mapitest_print_module_title_start(), mapitest_print_test_result(), mapitest_print_test_title_end(), mapitest_print_test_title_start(), and mapitest_underline().

void mapitest_print_module_title_end ( struct mapitest mt  ) 

Print the content at the end of the module

Parameters:
mt pointer to the top-level mapitest structure

References mapitest_deindent(), mapitest_print_line(), mapitest_print_newline(), mapitest_print_tab(), MODULE_TITLE_DELIM, MODULE_TITLE_LINELEN, and MODULE_TITLE_NEWLINE.

Referenced by mapitest_run_all().

void mapitest_print_module_title_start ( struct mapitest mt,
const char *  str 
)

Print the module title

Parameters:
mt pointer to the top-level mapitest structure
str the module title string

References mapitest_indent(), mapitest_print(), mapitest_print_line(), mapitest_print_tab(), mapitest::mem_ctx, MODULE_TITLE, MODULE_TITLE_DELIM, and MODULE_TITLE_LINELEN.

Referenced by mapitest_run_all().

void mapitest_print_newline ( struct mapitest mt,
int  count 
)

Print newline characters

Parameters:
mt pointer to the top-level mapitest structure
count number of newline characters to print

References mapitest::stream.

Referenced by mapitest_print_headers(), mapitest_print_headers_info(), mapitest_print_headers_server_info(), mapitest_print_line(), mapitest_print_module_title_end(), and mapitest_print_test_result().

void mapitest_print_retval ( struct mapitest mt,
char *  name 
)

Print mapitest return value

Parameters:
mt pointer to the top-level mapitest structure
name the test name
See also:
mapitest_print_retval_fmt for a version providing an additional format string

References mapitest::color, mapitest_print(), MT_GREEN, MT_RED, and MT_WHITE.

Referenced by mapitest_common_create_filled_test_folder(), mapitest_common_message_delete_by_subject(), mapitest_common_setup(), mapitest_noserver_lzfu(), mapitest_nspi_CompareMIds(), mapitest_nspi_DNToMId(), mapitest_nspi_GetIDsFromNames(), mapitest_nspi_GetMatches(), mapitest_nspi_GetNamesFromIDs(), mapitest_nspi_GetPropList(), mapitest_nspi_GetProps(), mapitest_nspi_GetSpecialTable(), mapitest_nspi_GetTemplateInfo(), mapitest_nspi_ModLinkAtt(), mapitest_nspi_ModProps(), mapitest_nspi_QueryColumns(), mapitest_nspi_QueryRows(), mapitest_nspi_ResolveNames(), mapitest_nspi_ResortRestriction(), mapitest_nspi_SeekEntries(), mapitest_nspi_UpdateStat(), mapitest_oxcfold_CopyFolder(), mapitest_oxcfold_CreateFolder(), mapitest_oxcfold_GetContentsTable(), mapitest_oxcfold_GetHierarchyTable(), mapitest_oxcfold_GetSearchCriteria(), mapitest_oxcfold_HardDeleteMessages(), mapitest_oxcfold_HardDeleteMessagesAndSubfolders(), mapitest_oxcfold_MoveCopyMessages(), mapitest_oxcfold_MoveFolder(), mapitest_oxcfold_OpenFolder(), mapitest_oxcfold_SetSearchCriteria(), mapitest_oxcfxics_GetLocalReplicaIds(), mapitest_oxcmsg_CreateMessage(), mapitest_oxcmsg_GetMessageStatus(), mapitest_oxcmsg_ModifyRecipients(), mapitest_oxcmsg_ReadRecipients(), mapitest_oxcmsg_ReloadCachedInformation(), mapitest_oxcmsg_RemoveAllRecipients(), mapitest_oxcmsg_SaveChangesMessage(), mapitest_oxcmsg_SetMessageReadFlag(), mapitest_oxcmsg_SetMessageStatus(), mapitest_oxcmsg_SetReadFlags(), mapitest_oxcnotif_RegisterNotification(), mapitest_oxcprpt_CopyTo(), mapitest_oxcprpt_CopyToStream(), mapitest_oxcprpt_GetPropList(), mapitest_oxcprpt_GetProps(), mapitest_oxcprpt_GetPropsAll(), mapitest_oxcprpt_NameId(), mapitest_oxcprpt_Stream(), mapitest_oxcprpt_WriteAndCommitStream(), mapitest_oxcstor_GetOwningServers(), mapitest_oxcstor_GetReceiveFolder(), mapitest_oxcstor_GetReceiveFolderTable(), mapitest_oxcstor_GetStoreState(), mapitest_oxcstor_Logon(), mapitest_oxcstor_LongTermId(), mapitest_oxcstor_PublicFolderIsGhosted(), mapitest_oxctable_Category(), mapitest_oxctable_GetStatus(), mapitest_oxctable_QueryColumns(), mapitest_oxctable_QueryRows(), mapitest_oxctable_Restrict(), mapitest_oxctable_SeekRowBookmark(), mapitest_oxctable_SetColumns(), mapitest_oxomsg_AbortSubmit(), mapitest_oxomsg_SetSpooler(), mapitest_oxomsg_SpoolerLockMessage(), mapitest_oxomsg_SubmitMessage(), mapitest_oxomsg_TransportNewMail(), mapitest_oxomsg_TransportSend(), and mapitest_oxorule_GetRulesTable().

void mapitest_print_retval_step ( struct mapitest mt,
char *  step,
char *  name 
)

Print mapitest return value for a given step

Parameters:
mt pointer tp the top-level mapitest structure
step the test step
name the test name
See also:
mapitest_print_retval_step_fmt for a version providing an additional format string

References mapitest::color, mapitest_print(), MT_GREEN, MT_RED, and MT_WHITE.

Referenced by mapitest_oxcprpt_CopyProps(), mapitest_oxcprpt_DeleteProps(), mapitest_oxcprpt_NoReplicate(), and mapitest_oxcstor_SetReceiveFolder().

void mapitest_print_retval_step_fmt ( struct mapitest mt,
char *  step,
char *  name,
const char *  format,
  ... 
)

Print mapitest return value for a given step with additional format string

Parameters:
mt pointer to the top-level mapitest structure
step the test step
name the test name
format the format string
... the format string parameters

References mapitest::color, mapitest_print(), MT_GREEN, MT_RED, and MT_WHITE.

Referenced by mapitest_oxcprpt_CopyProps(), mapitest_oxcprpt_DeleteProps(), mapitest_oxcprpt_NoReplicate(), mapitest_oxcprpt_SetProps(), and mapitest_oxcstor_SetReceiveFolder().

void mapitest_print_tab ( struct mapitest mt  ) 

Print tabulations given the internal counter

Parameters:
mt pointer to the top-level mapitest structure

References CNT_PRINT, and mapitest::stream.

Referenced by mapitest_print(), mapitest_print_module_title_end(), mapitest_print_module_title_start(), mapitest_print_test_result(), mapitest_print_test_title_end(), mapitest_print_test_title_start(), and mapitest_underline().

void mapitest_print_test_result ( struct mapitest mt,
char *  name,
bool  ret 
)

Print mapitest test result

Parameters:
mt pointer to the top-level mapitest structure
name the test name
ret boolean value with the test result

References mapitest_print(), mapitest_print_line(), mapitest_print_newline(), mapitest_print_tab(), MODULE_TEST_DELIM2, MODULE_TEST_FAILURE, MODULE_TEST_LINELEN, MODULE_TEST_NEWLINE, MODULE_TEST_RESULT, and MODULE_TEST_SUCCESS.

Referenced by mapitest_run_all(), and mapitest_suite_run_test().

void mapitest_print_test_title_end ( struct mapitest mt  ) 

Write the content at the end of a test

Parameters:
mt pointer to the top-level mapitest structure

References mapitest_deindent(), mapitest_print_line(), mapitest_print_tab(), MODULE_TEST_DELIM, and MODULE_TEST_LINELEN.

Referenced by mapitest_run_all(), mapitest_stat_dump(), and mapitest_suite_run_test().

void mapitest_print_test_title_start ( struct mapitest mt,
const char *  str 
)

print the test tile

Parameters:
mt pointer to the top-level mapitest structure
str the test title

References mapitest_indent(), mapitest_print(), mapitest_print_line(), mapitest_print_tab(), mapitest::mem_ctx, MODULE_TEST_DELIM, MODULE_TEST_LINELEN, and MODULE_TEST_TITLE.

Referenced by mapitest_run_all(), and mapitest_suite_run_test().

void mapitest_print_title ( struct mapitest mt,
const char *  str,
char  delim 
)

Private general routine used to print a title

Avoid code redundancy over the API

Parameters:
mt pointer to the top-level mapitest structure
str the title
delim the underline delimiter

References mapitest_indent(), and mapitest_underline().

Referenced by mapitest_stat_dump().

bool mapitest_run_test ( struct mapitest mt,
const char *  name 
)

run a specific test from a particular suite

Parameters:
mt the top-level mapitest structure
name the mapitest test name
Returns:
true on success, otherwise -1

References mapitest::mapi_suite, mapitest_suite_run_test(), mapitest_test::name, mapitest_test::next, mapitest_suite::next, mapitest_suite::online, mapitest::online, and mapitest_suite::tests.

Referenced by main().

uint32_t mapitest_stat_add_result ( struct mapitest_suite suite,
const char *  name,
bool  result 
)

Add test result to the suite statistic parameter

Parameters:
suite the suite container
name the test name
result the test result
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_stat::enabled, mapitest_stat::failure, mapitest_stat::failure_info, mapitest_unit::name, mapitest_suite::stat, and mapitest_stat::success.

Referenced by mapitest_run_all(), and mapitest_suite_run_test().

uint32_t mapitest_stat_add_skipped_test ( struct mapitest_suite suite,
const char *  name,
enum TestApplicabilityFlags  flags 
)

Add a skipped test to the suite statistic parameters

Parameters:
suite the suite container
name the test name
flags flags to indicate the reason why the test was skipped
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_stat::enabled, mapitest_unit::name, mapitest_stat::skip_info, mapitest_stat::skipped, and mapitest_suite::stat.

Referenced by mapitest_run_all(), and mapitest_suite_run_test().

struct mapitest_stat* mapitest_stat_init ( TALLOC_CTX *  mem_ctx  )  [read]

Initialize the mapitest statistic structure

Parameters:
mem_ctx memory allocation context
Returns:
Allocated stat structure on success, otherwise NULL

References mapitest_stat::enabled, mapitest_stat::failure, mapitest_stat::failure_info, mapitest_stat::skip_info, mapitest_stat::skipped, and mapitest_stat::success.

Referenced by mapitest_suite_init().

uint32_t mapitest_suite_add_test ( struct mapitest_suite ,
const char *  name,
const char *  description,
bool(*)(struct mapitest *)   
)
uint32_t mapitest_suite_add_test_flagged ( struct mapitest_suite suite,
const char *  name,
const char *  description,
bool(*)(struct mapitest *test)  run,
enum TestApplicabilityFlags  applicability 
)

add a test to the mapitest suite with description and flags

This is very similar to mapitest_suite_add_test(), except it allows a test to have special applicability (e.g. to only run when a particular server configuration is available).

Parameters:
suite pointer to the parent test suite
name the test name
description the test description
run the test function
applicability a set of applicability flags
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR
See also:
mapitest_suite_init, mapitest_suite_register, mapitest_suite_add_test

References mapitest_test::description, mapitest_test::flags, mapitest_test::fn, mapitest_test::name, mapitest_test::next, and mapitest_suite::tests.

Referenced by mapitest_suite_add_test(), and module_oxcstor_init().

struct mapitest_suite* mapitest_suite_find ( struct mapitest mt,
const char *  name 
) [read]

Find a suite given its name

Parameters:
mt top-level mapitest structure
name the suite name to be searched
Returns:
Pointer on a suite on success, otherwise NULL

References mapitest::mapi_suite, mapitest_suite::name, and mapitest_suite::next.

__BEGIN_DECLS struct mapitest_suite* mapitest_suite_init ( struct mapitest mt,
const char *  name,
const char *  description,
bool  online 
) [read]

Initialize a mapitest suite

Parameters:
mt the top-level mapitest structure
name the suite name
description the suite description
online whether this suite requires online (server) access
Returns:
An allocated mapitest_suite pointer, otherwise NULL.

References mapitest_stat_init(), mapitest::mem_ctx, mapitest_suite::stat, and mapitest_suite::tests.

Referenced by module_errorchecks_init(), module_lcid_init(), module_mapidump_init(), module_noserver_init(), module_nspi_init(), module_oxcfold_init(), module_oxcfxics_init(), module_oxcmsg_init(), module_oxcnotif_init(), module_oxcprpt_init(), module_oxcstor_init(), module_oxctable_init(), module_oxomsg_init(), and module_oxorule_init().

uint32_t mapitest_suite_register ( struct mapitest mt,
struct mapitest_suite suite 
)
bool mapitest_suite_run_test ( struct mapitest mt,
struct mapitest_suite suite,
const char *  name 
)

run a test from a suite given its name

Parameters:
mt pointer on the top-level mapitest structure
suite pointer on the mapitest suite
name the name of the test to be run
Returns:
true on success, otherwise false

References mapitest_test::flags, mapitest_test::fn, mapitest_print_test_result(), mapitest_print_test_title_end(), mapitest_print_test_title_start(), mapitest_stat_add_result(), mapitest_stat_add_skipped_test(), mapitest_test::name, mapitest_test::next, and mapitest_suite::tests.

Referenced by mapitest_run_test().

void mapitest_underline ( struct mapitest mt,
const char *  str,
char  delim 
)

Underline a string

Parameters:
mt pointer to the top-level mapitest structure
str string to underline
delim the line delimiter

References mapitest_print_line(), mapitest_print_tab(), and mapitest::stream.

Referenced by mapitest_print_title().

uint32_t module_errorchecks_init ( struct mapitest mt  ) 

Initialise the error / sanity-check test suite

Parameters:
mt pointer to the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_errorchecks_simplemapi_c(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

uint32_t module_lcid_init ( struct mapitest mt  ) 

Initialise the language code / ID test suite

Parameters:
mt pointer to the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_lcid_langcode2langtag(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

uint32_t module_noserver_init ( struct mapitest mt  ) 

Return the no server test suite

Parameters:
mt pointer on the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_noserver_lzfu(), mapitest_noserver_mapi_properties(), mapitest_noserver_properties(), mapitest_noserver_proptagvalue(), mapitest_noserver_srowset(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

uint32_t module_oxcfxics_init ( struct mapitest mt  ) 

Register the Bulk Data Transfer Protocol test suite

Parameters:
mt pointer on the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_oxcfxics_GetLocalReplicaIds(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

uint32_t module_oxcnotif_init ( struct mapitest mt  ) 

Register the Core Notification Protocol test suite

Parameters:
mt pointer on the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_oxcnotif_RegisterNotification(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

uint32_t module_oxctable_init ( struct mapitest mt  ) 
uint32_t module_oxomsg_init ( struct mapitest mt  ) 
uint32_t module_oxorule_init ( struct mapitest mt  ) 

Register the E-Mail Rules Protocol test suite

Parameters:
mt pointer on the top-level mapitest structure
Returns:
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_oxorule_GetRulesTable(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().


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/