proto.h File Reference

Macros

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

Functions

void mapitest_common_cleanup (struct mapitest *)
 Convenience function to clean up after logging into the server. More...
 
bool mapitest_common_create_filled_test_folder (struct mapitest *)
 Create a test folder, and fill with 10 sample messages. More...
 
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. More...
 
bool mapitest_common_folder_open (struct mapitest *, mapi_object_t *obj_parent, mapi_object_t *obj_child, uint32_t)
 Opens a default folder. More...
 
char * mapitest_common_genblob (TALLOC_CTX *, size_t)
 Generate a random blob of readable data. More...
 
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. More...
 
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. More...
 
bool mapitest_common_message_fill (struct mapitest *, mapi_object_t *obj_message, const char *)
 Create a message ready to submit. More...
 
bool mapitest_common_setup (struct mapitest *, mapi_object_t *, uint32_t *)
 Convenience function to login to the server. More...
 
void mapitest_deindent (void)
 
bool mapitest_errorchecks_simplemapi_c (struct mapitest *)
 
void mapitest_indent (void)
 
bool mapitest_lcid_langcode2langtag (struct mapitest *)
 
bool mapitest_lzxpress_validate_test_001 (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_rtfcp (struct mapitest *)
 
bool mapitest_noserver_rtfcp_large (struct mapitest *)
 
bool mapitest_noserver_srowset (struct mapitest *)
 
bool mapitest_nspi_CompareMIds (struct mapitest *)
 
bool mapitest_nspi_DNToMId (struct mapitest *)
 
bool mapitest_nspi_GetGALTable (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_CreateDeleteFolder (struct mapitest *)
 
bool mapitest_oxcfold_CreateFolder (struct mapitest *)
 
bool mapitest_oxcfold_CreateFolderVariants (struct mapitest *)
 
bool mapitest_oxcfold_DeleteMessages (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_CopyFolder (struct mapitest *)
 
bool mapitest_oxcfxics_CopyMessages (struct mapitest *)
 
bool mapitest_oxcfxics_CopyProperties (struct mapitest *)
 
bool mapitest_oxcfxics_CopyTo (struct mapitest *)
 
bool mapitest_oxcfxics_DestConfigure (struct mapitest *)
 
bool mapitest_oxcfxics_GetLocalReplicaIds (struct mapitest *)
 
bool mapitest_oxcfxics_SetLocalReplicaMidsetDeleted (struct mapitest *)
 
bool mapitest_oxcfxics_SyncConfigure (struct mapitest *)
 
bool mapitest_oxcfxics_SyncOpenCollector (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_oxcnotif_SyncOpenAdvisor (struct mapitest *)
 
bool mapitest_oxcperm_GetPermissionsTable (struct mapitest *)
 
bool mapitest_oxcperm_ModifyPermissions (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_NameId_PSMAPI (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_IsMailboxFolder (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_PAB_entry (struct mapitest *, struct PropertyRow_r *)
 Output a row of the public address book. More...
 
void mapitest_print_retval (struct mapitest *, char *)
 
void mapitest_print_retval_clean (struct mapitest *, char *, enum MAPISTATUS)
 
void mapitest_print_retval_fmt (struct mapitest *, char *, const char *,...)
 
void mapitest_print_retval_fmt_clean (struct mapitest *, char *, enum MAPISTATUS, const char *,...)
 
void mapitest_print_retval_step (struct mapitest *, char *, char *, enum MAPISTATUS)
 
void mapitest_print_retval_step_fmt (struct mapitest *, char *, char *, const char *,...)
 
void mapitest_print_SPropValue (struct mapitest *, struct SPropValue, const char *)
 Output a row of the public address book. More...
 
void mapitest_print_SRowSet (struct mapitest *, struct SRowSet *, const char *)
 Output a set of rows from a table. More...
 
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 *)
 
void 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, enum TestResult)
 
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_lzxpress_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_oxcperm_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 *)
 

Macro Definition Documentation

#define __BEGIN_DECLS
#define __END_DECLS
#define _PRINTF_ATTRIBUTE (   a1,
  a2 
)    PRINTF_ATTRIBUTE(a1, a2)
#define _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
mtpointer to the mapitest context

References mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, 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
mtpointer to the top level mapitest structure
obj_parentparent folder (usually the message store, must be opened)
obj_childthe folder that has been opened
olNumthe 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_ctxthe talloc memory context to create the blob in
lenthe 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
mtpointer to the top level mapitest structure
obj_folderthe folder to search through
subjectthe 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 *   
)
bool mapitest_common_setup ( struct mapitest mt,
mapi_object_t *  obj_htable,
uint32_t *  count 
)
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
mtpointer 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print().

Referenced by module_lcid_init().

bool mapitest_lzxpress_validate_test_001 ( struct mapitest )
bool mapitest_mapidump_appointment ( struct mapitest mt)

Test message dump using mapidump_appointment

This function:

  1. Tests the mapidump_appointment() function
Parameters
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print().

Referenced by module_noserver_init().

bool mapitest_noserver_rtfcp ( struct mapitest mt)

Test the Compressed RTF compression routine.

This function:

  1. Loads some test data and checks it
  2. Compresses the test data
  3. Checks that the compressed data matches the expected result
Parameters
mtpointer to 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_rtfcp_large ( struct mapitest mt)

Test the Compressed RTF compression / decompression routines on a larger file

Parameters
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

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

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
mtpointer 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

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

Referenced by module_nspi_init().

bool mapitest_nspi_DNToMId ( struct mapitest mt)

Test the NspiDNToMId RPC operation (0x7)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetGALTable ( struct mapitest mt)

Test the GetGALTable function

Parameters
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_PAB_entry(), mapitest_print_retval_clean(), mapitest::mem_ctx, and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetIDsFromNames ( struct mapitest mt)

Test the NspiGetIDsFromNames RPC operation (0x12)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetMatches ( struct mapitest mt)

Test the NspiGetMatches RPC operation (0x5)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetNamesFromIDs ( struct mapitest mt)

Test the NspiGetNamesFromIDs RPC operation (0x11)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetPropList ( struct mapitest mt)

Test the NspiGetPropList RPC operation (0x08)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_print_retval(), mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_GetSpecialTable ( struct mapitest mt)

Test the NspiGetSpecialTable RPC operation (0x0c)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ModLinkAtt ( struct mapitest mt)

Test the NspiModLinkAtt RPC operation (0x0e)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_print(), mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_QueryColumns ( struct mapitest mt)

Test the NspiQueryColumns RPC operation (0x10)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

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

Referenced by module_nspi_init().

bool mapitest_nspi_QueryRows ( struct mapitest mt)

Test the NspiQueryRows RPC operation (0x3)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_print_retval_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::info, mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, mapitest::profile, and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_ResortRestriction ( struct mapitest mt)

Test the NspiResortRestriction RPC operation (0x6)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_SeekEntries ( struct mapitest mt)

Test the NspiSeekEntries RPC operation (0x04)

Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_nspi_init().

bool mapitest_nspi_UpdateStat ( struct mapitest mt)

Test the NspiUpdateStat RPC operation (0x02)

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

Referenced by module_oxcfold_init().

bool mapitest_oxcfold_CreateDeleteFolder ( struct mapitest mt)

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

This is a simpler version of the CreateFolder test below.

This function:

  1. Log on the user private mailbox
  2. Open the top information folder
  3. Create a test directory
  4. Delete the folder
Parameters
mtthe top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), 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
mtthe 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_CreateFolderVariants ( struct mapitest mt)

Test the CreateFolder (0x1c) operations

This tests different combinations of folder creation.

This function:

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

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

Referenced by module_oxcfold_init().

bool mapitest_oxcfold_DeleteMessages ( struct mapitest mt)

Test the DeleteMessages (0x1e) operation

This function:

  1. Log on the user private mailbox
  2. Open the top of information store
  3. Create a test folder
  4. Create and save three messages
  5. Save the messages
  6. Delete the messages
  7. Delete the test folder
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_clean(), mt_common_tf_ctx::obj_store, 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
mtpointer 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
mtpointer 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, 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
mtpointer 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::mapi_ctx, mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, 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
mtpointer 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(), 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
mtthe 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

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

Referenced by module_oxcfold_init().

bool mapitest_oxcfxics_CopyFolder ( struct mapitest mt)

Test the FastTransferCopyFolder (0x4C), FastTransferGetBuffer (0x4E) and TellVersion (0x86) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Setup source
  4. Sends the "server version"

References mapitest::info, mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_CopyMessages ( struct mapitest mt)

Test the FastTransferCopyMessages (0x4B) and FastTransferGetBuffer (0x4E) operations

This function:

  1. Log on private message store
  2. Cremapidump_fx_bufferates a test folder
  3. Setup source
  4. Get data

References mapitest::mapi_ctx, mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, mt_common_tf_ctx::obj_test_msg, and mapitest::priv.

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_CopyProperties ( struct mapitest mt)

Test the FastTransferCopyProperties (0x69) and FastTransferSourceGetBuffer (0x4e) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Setup source
  4. Get data

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

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_CopyTo ( struct mapitest mt)

Test the FastTransferCopyTo (0x4D) and FastTransferGetBuffer (0x4E) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Setup source
  4. Get data

References mapitest::mapi_ctx, mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, mt_common_tf_ctx::obj_test_msg, and mapitest::priv.

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_DestConfigure ( struct mapitest mt)

Test the FastTransferDestinationConfigure (0x53), TellVersion (0x86) and FastTransferDestinationPutBuffer (0x54) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Setup destination
  4. Sends the "server version"

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

Referenced by module_oxcfxics_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_oxcfxics_SetLocalReplicaMidsetDeleted ( struct mapitest mt)

Test the GetLocalReplicaId (0x7f) and SetLocalReplicaMidsetDeleted (0x93) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Gets a local replica ID range
  4. Sets the local replica ID range as deleted (on the test folder)
  5. cleans up

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, mt_common_tf_ctx::obj_store, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_SyncConfigure ( struct mapitest mt)

Test the RopSynchronizationConfigure (0x70), RopSynchronizationUploadStateStreamBegin (0x75), RopSynchronizationUploadStateStreamContinue (0x76), RopSynchronizationUploadStateStreamEnd (0x77) and RopSynchronizationGetTransferState (0x82) operations

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Sets up sync configure context
  4. Uploads an empty ICS state
  5. cleans up.

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval_clean(), mapitest::mem_ctx, mt_common_tf_ctx::obj_test_folder, and mapitest::priv.

Referenced by module_oxcfxics_init().

bool mapitest_oxcfxics_SyncOpenCollector ( struct mapitest mt)

Test the RopSynchronizationOpenCollector (0x7e), operation.

This function:

  1. Log on private message store
  2. Creates a test folder
  3. Opens a sync collector context for content
  4. Opens a sync collector context for hierachy
  5. cleans up.

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

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
mtpointer 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_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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval_clean(), mapitest_print_retval_fmt_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

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

Referenced by module_oxcmsg_init().

bool mapitest_oxcmsg_OpenEmbeddedMessage ( struct mapitest mt)

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

This function:

  1. Logs on the user private mailbox
  2. Open the Inbox folder
  3. Create a test message
  4. Embed a message in the test message
  5. Delete the test message
Parameters
mtpointer 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(), mapitest_print_SRowSet(), 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
mtpoint on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), mapitest_print_retval_fmt(), mapitest::mem_ctx, mapitest::profile, 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
mtpointer 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
mtpoint on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), mapitest_print_retval_fmt(), mapitest::mem_ctx, mapitest::profile, 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
mtpointer 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
mtpointer 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, mt_common_tf_ctx::obj_store, 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest_print_retval_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print(), mapitest_print_retval_clean(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

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

bool mapitest_oxcnotif_SyncOpenAdvisor ( struct mapitest mt)

Test the SyncOpenAdvisor (0x83) and SetSyncNotificationGuid (0x88) operations

This function:

  1. logs on
  2. creates a notification advisor
  3. sets a GUID on the advisor
  4. cleans up
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval_clean(), and mapitest::session.

Referenced by module_oxcnotif_init().

bool mapitest_oxcperm_GetPermissionsTable ( struct mapitest mt)

Test the GetPermissionsTable (0x3e) operation

This function:

  1. Log on private message store
  2. Open the top store folder
  3. Gets the permissions table handle
  4. Fetches properties from the permissions table

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

Referenced by module_oxcperm_init().

bool mapitest_oxcperm_ModifyPermissions ( struct mapitest mt)

Test the ModifyPermissions (0x40) operation

This function:

  1. Log on private message store
  2. Open the top store folder
  3. Creates a temporary folder
  4. Adds permissions for the admin user, and checks them
  5. Modifies permissions for the admin user, and checks them
  6. Removes permissions for the admin user, and checks them
  7. Deletes the folder

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

Referenced by module_oxcperm_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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest::info, mapitest_common_message_create(), mapitest_print(), mapitest_print_retval_step(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, 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
mtpointer 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_clean(), mapitest_print_retval_fmt(), mapitest::mem_ctx, 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
mtpointer 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, 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
mtpointer 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, 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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, NAMEDPROP_IDNUM, NAMEDPROP_NAME, and mapitest::session.

Referenced by module_oxcprpt_init().

bool mapitest_oxcprpt_NameId_PSMAPI ( struct mapitest mt)

Test the GetPropertyIdsFromNames (0x56) and GetNamesFromPropertyIds (0x55) operations for the special case of the PS_MAPI namespace

This function:

  1. Logs into the server
  2. Gets a property ID for a known property name
  3. Gets a property name for a known property ID
  4. Cleans up

Refer to MS-OXPROPS for the list of properties

Parameters
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_clean(), mapitest::mem_ctx, 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
mtpointer 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, 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_step_fmt(), mapitest::mem_ctx, 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
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise -1

References mapitest::info, mapitest_common_genblob(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), mapitest::mem_ctx, 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
mtpointer 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_clean(), mapitest_print_retval_fmt_clean(), mapitest::mem_ctx, 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
mtthe 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
  3. Call the GetReceiveFolder with different explicit message class values
Parameters
mtthe top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_clean(), 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
mtthe top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print_retval(), mapitest_print_SRowSet(), 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
mtpointer 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_IsMailboxFolder ( struct mapitest mt)

Test the IsMailboxFolder convenience function

This function:

  1. Logs into the user private mailbox
Parameters
mtpointer 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_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
mtpointer 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
mtpointer 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
mtthe 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 operations
  3. Clean up
Parameters
mtthe 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
mtpointer 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval_fmt_clean(), 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

Calls the QueryColumn operation

  1. Calls SetColumns on the test folder
  2. Checks that QueryColumns on the test folder is correct
  3. Cleans up
Parameters
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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
mtpointer 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_clean(), 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
mtpointer 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
mtpointer 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(), and mapitest::session.

Referenced by module_oxomsg_init().

bool mapitest_oxomsg_AddressTypes ( struct mapitest mt)

Test the AddressTypes (0x49) and OptionsData (0x6f) operations

This function:

  1. Log on the user private mailbox
  2. Call the AddressTypes operation
  3. Call the OptionsData operation on each address type
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), 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
mtpointer 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
mtpointer 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_common_folder_open(), mapitest_common_message_create(), mapitest_print(), mapitest_print_retval(), mapitest_print_retval_fmt(), and mapitest::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
mtpointer 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(), 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
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_common_cleanup(), mapitest_common_setup(), mapitest_print_retval_clean(), mt_common_tf_ctx::obj_store, 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
mtpointer 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(), mapitest_print_SPropValue(), mapitest::mem_ctx, 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
mtpointer 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
mtpointer to the top-level mapitest structure
formatthe format string
...the format string parameters

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

Referenced by mapitest_common_cleanup(), mapitest_common_create_filled_test_folder(), mapitest_common_folder_open(), mapitest_common_message_delete_by_subject(), mapitest_errorchecks_simplemapi_c(), mapitest_lcid_langcode2langtag(), mapitest_lzxpress_validate_test_001(), mapitest_mapidump_freebusy(), mapitest_mapidump_task(), mapitest_noserver_lzfu(), mapitest_noserver_mapi_properties(), mapitest_noserver_proptagvalue(), mapitest_noserver_rtfcp(), mapitest_noserver_rtfcp_large(), mapitest_noserver_srowset(), mapitest_nspi_CompareMIds(), mapitest_nspi_GetPropList(), mapitest_nspi_ModProps(), mapitest_nspi_QueryColumns(), mapitest_nspi_ResolveNames(), mapitest_nspi_UpdateStat(), mapitest_oxcfold_CopyFolder(), mapitest_oxcfold_CreateDeleteFolder(), mapitest_oxcfold_CreateFolder(), mapitest_oxcfold_CreateFolderVariants(), mapitest_oxcfold_DeleteMessages(), mapitest_oxcfold_HardDeleteMessages(), mapitest_oxcfold_HardDeleteMessagesAndSubfolders(), mapitest_oxcfold_MoveCopyMessages(), mapitest_oxcfold_MoveFolder(), mapitest_oxcfold_OpenFolder(), mapitest_oxcfxics_CopyFolder(), mapitest_oxcfxics_CopyMessages(), mapitest_oxcfxics_CopyProperties(), mapitest_oxcfxics_CopyTo(), mapitest_oxcfxics_DestConfigure(), mapitest_oxcfxics_GetLocalReplicaIds(), mapitest_oxcfxics_SetLocalReplicaMidsetDeleted(), mapitest_oxcmsg_GetValidAttachments(), mapitest_oxcmsg_ModifyRecipients(), mapitest_oxcmsg_OpenEmbeddedMessage(), mapitest_oxcmsg_ReadRecipients(), mapitest_oxcmsg_RemoveAllRecipients(), 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_NameId_PSMAPI(), mapitest_oxcprpt_NoReplicate(), mapitest_oxcprpt_SetProps(), mapitest_oxcprpt_Stream(), mapitest_oxcprpt_WriteAndCommitStream(), mapitest_oxcstor_GetOwningServers(), mapitest_oxcstor_GetReceiveFolder(), mapitest_oxcstor_IsMailboxFolder(), 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_clean(), mapitest_print_retval_fmt(), mapitest_print_retval_fmt_clean(), 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
mtpointer to the top-level mapitest structure

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

Referenced by main().

void mapitest_print_headers_info ( struct mapitest mt)

Print mapitest report headers information

Parameters
mtpointer to the top-level mapitest structure

References mapitest::confidential, mapitest_deindent(), mapitest_indent(), mapitest_print(), and mapitest_print_newline().

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
mtpointer to the top-level mapitest structure

References mapitest::confidential, mapitest::info, mapitest_deindent(), mapitest_indent(), mapitest_print(), mapitest_print_newline(), 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
mtpointer to the top-level mapitest structure
lenthe length of the line to print
delimthe line delimiter

References mapitest_print_newline(), mapitest::stream, and mapitest::subunit_output.

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
mtpointer to the top-level mapitest structure

References mapitest_deindent(), mapitest_print_line(), mapitest_print_newline(), and mapitest_print_tab().

Referenced by mapitest_run_all().

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

Print the module title

Parameters
mtpointer to the top-level mapitest structure
strthe module title string

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

Referenced by mapitest_run_all().

void mapitest_print_newline ( struct mapitest mt,
int  count 
)

Print newline characters

Parameters
mtpointer to the top-level mapitest structure
countnumber of newline characters to print

References mapitest::stream, and mapitest::subunit_output.

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_PAB_entry ( struct mapitest mt,
struct PropertyRow_r *  aRow 
)

Output a row of the public address book.

Parameters
mtpointer to the top-level mapitest structure
aRowone row of the public address book (Global Address List)

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

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

Note
this is a simple wrapper for mapidump_PAB_entry(), only for use in mapitest.

References mapitest::subunit_output.

Referenced by mapitest_nspi_GetGALTable().

void mapitest_print_retval ( struct mapitest mt,
char *  name 
)

Print mapitest return value

Parameters
mtpointer to the top-level mapitest structure
namethe test name
See Also
mapitest_print_retval_fmt for a version providing an additional format string
mapitest_print_retval_clean for a version that doesn't rely on GetLastError()

References mapitest::color, mapitest_print(), and mapitest::subunit_output.

Referenced by mapitest_common_create_filled_test_folder(), mapitest_common_message_create(), mapitest_common_message_delete_by_subject(), mapitest_common_message_fill(), mapitest_common_setup(), mapitest_noserver_lzfu(), mapitest_noserver_rtfcp(), mapitest_nspi_GetPropList(), mapitest_nspi_GetProps(), mapitest_nspi_UpdateStat(), mapitest_oxcfold_CopyFolder(), mapitest_oxcfold_CreateDeleteFolder(), 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_ModifyRecipients(), mapitest_oxcmsg_ReadRecipients(), mapitest_oxcmsg_ReloadCachedInformation(), mapitest_oxcmsg_RemoveAllRecipients(), mapitest_oxcmsg_SaveChangesMessage(), mapitest_oxcmsg_SetMessageReadFlag(), mapitest_oxcmsg_SetMessageStatus(), mapitest_oxcnotif_RegisterNotification(), mapitest_oxcperm_GetPermissionsTable(), mapitest_oxcperm_ModifyPermissions(), 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_GetReceiveFolderTable(), mapitest_oxcstor_GetStoreState(), mapitest_oxcstor_IsMailboxFolder(), 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_AddressTypes(), mapitest_oxomsg_SetSpooler(), mapitest_oxomsg_SpoolerLockMessage(), mapitest_oxomsg_SubmitMessage(), mapitest_oxomsg_TransportSend(), and mapitest_oxorule_GetRulesTable().

void mapitest_print_retval_clean ( struct mapitest mt,
char *  name,
enum MAPISTATUS  retval 
)

Print mapitest return value

This version takes an explicit return status value

Parameters
mtpointer to the top-level mapitest structure
namethe test name
retvalthe return value to output
See Also
mapitest_print_retval_fmt_clean for a version providing an additional format string

References mapitest::color, mapitest_print(), and mapitest::subunit_output.

Referenced by mapitest_noserver_rtfcp_large(), mapitest_nspi_CompareMIds(), mapitest_nspi_DNToMId(), mapitest_nspi_GetGALTable(), mapitest_nspi_GetIDsFromNames(), mapitest_nspi_GetMatches(), mapitest_nspi_GetNamesFromIDs(), 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_oxcfold_CreateFolderVariants(), mapitest_oxcfold_DeleteMessages(), mapitest_oxcfxics_CopyFolder(), mapitest_oxcfxics_CopyMessages(), mapitest_oxcfxics_CopyProperties(), mapitest_oxcfxics_CopyTo(), mapitest_oxcfxics_DestConfigure(), mapitest_oxcfxics_SetLocalReplicaMidsetDeleted(), mapitest_oxcfxics_SyncConfigure(), mapitest_oxcfxics_SyncOpenCollector(), mapitest_oxcmsg_GetMessageStatus(), mapitest_oxcmsg_GetValidAttachments(), mapitest_oxcmsg_ModifyRecipients(), mapitest_oxcmsg_ReadRecipients(), mapitest_oxcmsg_RemoveAllRecipients(), mapitest_oxcmsg_SetMessageStatus(), mapitest_oxcmsg_SetReadFlags(), mapitest_oxcnotif_SyncOpenAdvisor(), mapitest_oxcprpt_CopyTo(), mapitest_oxcprpt_NameId_PSMAPI(), mapitest_oxcprpt_WriteAndCommitStream(), mapitest_oxcstor_GetReceiveFolder(), and mapitest_oxomsg_TransportNewMail().

void mapitest_print_retval_fmt_clean ( struct mapitest mt,
char *  name,
enum MAPISTATUS  retval,
const char *  format,
  ... 
)

Print mapitest return value with additional format string

Parameters
mtpointer to the top-level mapitest structure
namethe test name
retvalthe return value to output
formatthe format string
...the format string parameters

References mapitest::color, and mapitest_print().

Referenced by mapitest_oxcmsg_GetValidAttachments(), mapitest_oxcprpt_WriteAndCommitStream(), mapitest_oxctable_CreateBookmark(), and mapitest_oxctable_SeekRowBookmark().

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

Print mapitest return value for a given step

Parameters
mtpointer to the top-level mapitest structure
stepthe test step
namethe test name
retvalthe return value
See Also
mapitest_print_retval_step_fmt for a version providing an additional format string

References mapitest::color, and mapitest_print().

Referenced by mapitest_lzxpress_validate_test_001(), 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
mtpointer to the top-level mapitest structure
stepthe test step
namethe test name
formatthe format string
...the format string parameters

References mapitest::color, and mapitest_print().

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

void mapitest_print_SPropValue ( struct mapitest mt,
struct SPropValue  lpProp,
const char *  sep 
)

Output a row of the public address book.

Parameters
mtpointer to the top-level mapitest structure
lpPropthe property to print
sepa separator / spacer to insert in front of the label
Note
this is a simple wrapper for mapidump_SPropValue(), only for use in mapitest.

References mapitest::subunit_output.

Referenced by mapitest_oxomsg_TransportSend().

void mapitest_print_SRowSet ( struct mapitest mt,
struct SRowSet *  rowset,
const char *  sep 
)

Output a set of rows from a table.

Parameters
mtpointer to the top-level mapitest structure
rowsetthe rows to output
sepa separator / spacer to insert in front of the label
Note
this is a simple wrapper for mapidump_SRowSet(), only for use in mapitest.

References mapitest::subunit_output.

Referenced by mapitest_oxcmsg_OpenEmbeddedMessage(), and mapitest_oxcstor_GetReceiveFolderTable().

void mapitest_print_tab ( struct mapitest mt)

Print tabulations given the internal counter

Parameters
mtpointer to the top-level mapitest structure

References 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
mtpointer to the top-level mapitest structure
namethe test name
retboolean value with the test result

References mapitest_print(), mapitest_print_line(), mapitest_print_newline(), mapitest_print_tab(), and mapitest::subunit_output.

void mapitest_print_test_title_end ( struct mapitest mt)

Write the content at the end of a test

Parameters
mtpointer to the top-level mapitest structure

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

Referenced by mapitest_stat_dump().

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

print the test title

Parameters
mtpointer to the top-level mapitest structure
strthe test title

References mapitest_indent(), mapitest_print(), mapitest_print_line(), mapitest_print_tab(), mapitest::mem_ctx, and mapitest::subunit_output.

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
mtpointer to the top-level mapitest structure
strthe title
delimthe underline delimiter

References mapitest_indent(), mapitest_underline(), and mapitest::subunit_output.

Referenced by mapitest_stat_dump().

void mapitest_run_all ( struct mapitest mt)

all tests from all suites

Parameters
mtthe top-level mapitest structure
Returns
true on success, otherwise -1

References mapitest::mapi_suite, mapitest_print_module_title_end(), mapitest_print_module_title_start(), mapitest_suite::name, mapitest_suite::next, mapitest_suite::online, mapitest::online, and mapitest::session.

Referenced by main().

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

run a specific test from a particular suite

Parameters
mtthe top-level mapitest structure
namethe 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, mapitest::session, and mapitest_suite::tests.

Referenced by main().

uint32_t mapitest_stat_add_result ( struct mapitest_suite suite,
const char *  name,
enum TestResult  testresult 
)

Add test result to the suite statistic parameter

Parameters
suitethe suite container
namethe test name
testresultthe test result
Returns
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_stat::enabled, ExpectedFailure, Fail, mapitest_stat::failure, mapitest_stat::failure_info, mapitest_unit::name, Pass, mapitest_unit::reason, mapitest_suite::stat, mapitest_stat::success, UnexpectedPass, and mapitest_stat::x_fail.

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
suitethe suite container
namethe test name
flagsflags 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.

int32_t mapitest_stat_dump ( struct mapitest mt)
struct mapitest_stat* mapitest_stat_init ( TALLOC_CTX *  mem_ctx)

Initialize the mapitest statistic structure

Parameters
mem_ctxmemory 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, mapitest_stat::success, and mapitest_stat::x_fail.

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
suitepointer to the parent test suite
namethe test name
descriptionthe test description
runthe test function
applicabilitya 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_suite::name, mapitest_test::next, and mapitest_suite::tests.

Referenced by mapitest_suite_add_test(), module_lzxpress_init(), module_oxcmsg_init(), module_oxcnotif_init(), module_oxcprpt_init(), module_oxcstor_init(), and module_oxctable_init().

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

Find a suite given its name

Parameters
mttop-level mapitest structure
namethe 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 
)
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
mtpointer on the top-level mapitest structure
suitepointer on the mapitest suite
namethe name of the test to be run
Returns
true on success, otherwise false

References 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
mtpointer to the top-level mapitest structure
strstring to underline
delimthe 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
mtpointer 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
mtpointer 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_lzxpress_init ( struct mapitest mt)

Initialise the language code / ID test suite

Parameters
mtpointer to the top-level mapitest structure
Returns
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References ExpectedFail, mapitest_lzxpress_validate_test_001(), mapitest_suite_add_test_flagged(), 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
mtpointer 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_rtfcp(), mapitest_noserver_rtfcp_large(), mapitest_noserver_srowset(), 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
mtpointer on the top-level mapitest structure
Returns
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_oxcnotif_SyncOpenAdvisor(), mapitest_suite_add_test_flagged(), mapitest_suite_init(), mapitest_suite_register(), and NotInExchange2010.

Referenced by mapitest_register_modules().

uint32_t module_oxcperm_init ( struct mapitest mt)

Register the Permissions Protocol test suite

Parameters
mtpointer to the top-level mapitest structure
Returns
MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_oxcperm_GetPermissionsTable(), mapitest_oxcperm_ModifyPermissions(), mapitest_suite_add_test(), mapitest_suite_init(), and mapitest_suite_register().

Referenced by mapitest_register_modules().

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
mtpointer 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/