コード例 #1
0
/**
   \details Test dump of a Message creation notification

   This function:
   -# Creates a MessageCreatedNotification structure
   -# Dumps that structure out using mapidump_messagecreated()
   -# Adds tags to the MessageCreatedNotification structure
   -# Dumps the structure again.
   -# Tests mapidump_messagecreated() with a null argument

   \param mt pointer to the top-level mapitest structure

   \return true on success, otherwise false
   
   \note This currently doesn't check the results are sane, so manual inspection is required
*/ 
_PUBLIC_ bool mapitest_mapidump_messagecreated(struct mapitest *mt)
{
	struct MessageCreatedNotification messagecreatednotification;

	messagecreatednotification.FID = 0x1234ABCDLL;
	messagecreatednotification.MID = 0x9876FEALL;
	messagecreatednotification.NotificationTags.Tags = 0;
	messagecreatednotification.TagCount = 0;
	mapidump_messagecreated(&messagecreatednotification, "[sep]");

	messagecreatednotification.TagCount = 3;
	messagecreatednotification.NotificationTags.Tags = talloc_array(mt->mem_ctx, enum MAPITAGS,
						       messagecreatednotification.TagCount);
	messagecreatednotification.NotificationTags.Tags[0] = PR_DISPLAY_NAME;
	messagecreatednotification.NotificationTags.Tags[1] = PR_DISPLAY_NAME_UNICODE;
	messagecreatednotification.NotificationTags.Tags[2] = PR_COMPANY_NAME;

	mapidump_messagecreated(0, "[sep]");

	return true;
}
コード例 #2
0
ファイル: mapidump.c プロジェクト: ThHirsch/openchange
_PUBLIC_ void mapidump_messagemodified(struct MessageModifiedNotification *data, const char *sep)
{
	mapidump_messagecreated((struct MessageCreatedNotification *)data, sep);
}