Esempio n. 1
0
TInt CIacSettingsParser::CompleteMessage()
	{
	TMsvEntry entry = iEntry.Entry();
	entry.SetMtmData3(KBIO_MSG_ENTRY_PROCESSED);
	TRAPD(error, iEntry.ChangeL(entry));
	return error;
	}
// methods from CSendAsEditUtils
void CSendAsTestEditUtils::LaunchEditorL(TMsvId /*aId*/, TRequestStatus& aStatus)
	{

	CDummyObserver* ob1 = new(ELeave) CDummyObserver;
	CleanupStack::PushL(ob1);

	CMsvSession* session = CMsvSession::OpenSyncL(*ob1);
	CleanupStack::PushL(session);

	CMsvEntry* cEntry = CMsvEntry::NewL(*session, KMsvDraftEntryId, 
		TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue));
	CleanupStack::PushL(cEntry);

	CMsvEntrySelection* selection = cEntry->ChildrenL();
	CleanupStack::PushL(selection);

	CMsvEntry* cEntry2 = session->GetEntryL(selection->At(0));
	CleanupStack::PushL(cEntry2);

	TMsvEntry entry = cEntry2->Entry();
	entry.SetMtmData3(234567890); // Show we've been called by touching the TMsvEntry.
	cEntry2->ChangeL(entry);
	
	CleanupStack::PopAndDestroy(5, ob1); // cEntry2, selection, cEntry, session, ob1

	iUserStatus = &aStatus;
	aStatus = KRequestPending;
	// wait a few seconds before completing
	iEditTimer->After(KSendAsTestEditWaitTime);
	}
void TestUniDataModelVCalPlugin::SetForMtmTypeL(TMsvEntry& aEntry,
                                                TBIOMessageType aType)
{
		TInt index;

		aEntry.iBioType = KUidBIOVCalenderMsg;

		// Set other TMsvEntry fields if we have a BIO message type
		if (aType != ENoMessage)
			{
				aEntry.SetMtmData2(0);
				aEntry.SetMtmData3(0);
			}

		// set description from BIF file
		iBioDb->GetBioIndexWithMsgIDL(TUid::Uid(aEntry.iBioType), index);
		if (index == KErrNotFound)
			User::Leave(KErrNotFound);
		aEntry.iDescription.Set(iBioDb->BifReader(index).Description());
}