当前位置: 首页>>代码示例>>C++>>正文


C++ CMsvEntry::SetEntryL方法代码示例

本文整理汇总了C++中CMsvEntry::SetEntryL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvEntry::SetEntryL方法的具体用法?C++ CMsvEntry::SetEntryL怎么用?C++ CMsvEntry::SetEntryL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMsvEntry的用法示例。


在下文中一共展示了CMsvEntry::SetEntryL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ExecuteActionL

void CMtfTestActionDeleteEntry::ExecuteActionL()
	{
	TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDeleteEntry);
	CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
	TMsvId paramEntryId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));

	CMsvEntry* entry = CMsvEntry::NewL(*paramSession,paramEntryId,TMsvSelectionOrdering());
	CleanupStack::PushL(entry);
	entry->SetEntryL(paramEntryId);
	entry->SetEntryL(entry->Entry().Parent());

	if (entry->OwningService() == KMsvLocalServiceIndexEntryId)
		{
		entry->DeleteL(paramEntryId);
		DeleteParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
		TestCase().ActionCompletedL(*this);
		}
	else
		{
		iOperation = entry->DeleteL(paramEntryId,iStatus);
		SetActive();
		}
	CleanupStack::PopAndDestroy(entry);
	TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDeleteEntry);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:25,代码来源:CMtfTestActionDeleteEntry.cpp

示例2: doTestStepL

/**
doTestStepL()
Performs the comparison of POP messages

@return
Returns the teststep result.
*/
TVerdict CT_MsgComparePopEmailMsgs::doTestStepL()
	{
	INFO_PRINTF1(_L("Test Step: Compare Pop Email Msgs"));
		
	if(LoadParametersL())
		{
		User::LeaveIfError(iFs.Connect());
		CleanupClosePushL(iFs);
		
			// Normally do not push an object that is a data member of another object.
			// But in this case we want to close early if we get a leave.
			// Otherwise the iFs would be open till the thread had begun to die.
		if(TestStepResult() == EPass)
			{
			CMsvEntry* recvMsvEntry = iSharedDataPOP.iSession->GetEntryL(KMsvRootIndexEntryId);
			CleanupStack::PushL(recvMsvEntry);
			CMsvEntry* sentMsvEntry = iSharedDataPOP.iSession->GetEntryL(KMsvRootIndexEntryId);
			CleanupStack::PushL(sentMsvEntry);

			for(TInt i = 0;i < iInboxSelectionList->Count();i++)
				{
				recvMsvEntry->SetEntryL(iInboxSelectionList->At(i));
				TMsvEntry recvEntry = recvMsvEntry->Entry();
				for(TInt j = 0;j < iSentSelectionList->Count();j++)
					{
					sentMsvEntry->SetEntryL(iSentSelectionList->At(j));
					TMsvEntry sentEntry = sentMsvEntry->Entry();
					if(recvEntry.iDescription.Compare(sentEntry.iDescription) == 0) 
						{
						CExpPop3MailInfo* pExpMailInfo = NULL;
						for(int k = 0;k < iExpResults.Count();k++)
							{
							if(iExpResults[k]->GetDescription().Compare(recvEntry.iDescription) == 0)
								{
								pExpMailInfo =  iExpResults[k];
								break;
								}
							}
						if(! pExpMailInfo)
							{
							ERR_PRINTF2(_L("Test %d failed could not retrieve expected mail info"), j+1);
							SetTestStepResult(EFail);
							break;
							}

						if(! DoCompareL(recvEntry, *pExpMailInfo, sentEntry))
							{
							INFO_PRINTF2(_L("Test %d failed"), j + 1);
							SetTestStepResult(EFail);
							}														
						}
					}
				}
			CleanupStack::PopAndDestroy(2, recvMsvEntry); // recvMsvEntry, sentMsvEntry
			}		
		CleanupStack::PopAndDestroy();
		}		
	INFO_PRINTF1(_L("T_ComparePopEmailMsgs Completed"));
	return TestStepResult();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:67,代码来源:T_ComparePopEmailMsgs.cpp

示例3: CountChildrenL

TInt CMtfTestActionCheckChildrenCountWithFlagBase::CountChildrenL(TMsvId aParent, CMsvSession& aSession)
	{
	TInt children = 0;
	// Get children at this level

	CMsvEntry* entryContext = CMsvEntry::NewL(aSession, aParent, 
	    	TMsvSelectionOrdering(KMsvNoGrouping, EMsvSortByNone, ETrue));
	CleanupStack::PushL(entryContext);
	
	entryContext->SetEntryL(aParent);
	TMsvSelectionOrdering order;
	order.SetShowInvisibleEntries(ETrue);
	entryContext->SetSortTypeL(order);
	
	CMsvEntrySelection* selection = entryContext->ChildrenL();
	CleanupStack::PushL(selection);
	
	// for each child
	TInt count=selection->Count();
	for(TInt child=0;child<count;child++)
		{
		entryContext->SetEntryL((*selection)[child]);
		TMsvEntry entry=entryContext->Entry();
		if (entry.iType==KUidMsvMessageEntry && FlagIsSet(entry) )
			{
			++children;
			}
		// if this is a folder then recurse
		if (entry.iType==KUidMsvFolderEntry)
			children +=CountChildrenL((*selection)[child], aSession);
		}
	CleanupStack::PopAndDestroy(2); // selection,entryContext
	return children;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:34,代码来源:CMtfTestActionCheckChildrenCountWithFlagBase.cpp

示例4: TestReadOnlyDeletionL

LOCAL_C void TestReadOnlyDeletionL()
	{
	CDummyObserver* ob = new(ELeave)CDummyObserver;
	CleanupStack::PushL(ob);

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

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

	// Create an entry
	TMsvEntry entry;
	entry.iType = KUidMsvMessageEntry;
	entry.iMtm = KUidMsvLocalServiceMtm;
	entry.iServiceId = KMsvLocalServiceIndexEntryId;
	cEntry->CreateL(entry);

	// Generate name of attachment
	cEntry->SetEntryL(entry.Id());
	TFileName fileName;

	fileName.Append(_L("Test"));
	CMsvStore* store = cEntry->EditStoreL();
	CleanupStack::PushL(store);

	CAsyncWaiter* waiter = CAsyncWaiter::NewL();
	CleanupStack::PushL(waiter);
	CMsvAttachment* attachment = CMsvAttachment::NewL(CMsvAttachment::EMsvFile);
	CleanupStack::PushL(attachment);
	fileName.Append(_L("Test"));
	attachment->SetAttachmentNameL(fileName);
	RFile file;
	store->AttachmentManagerL().CreateAttachmentL(fileName, file, attachment, waiter->iStatus);
	CleanupStack::Pop(attachment); // ownership passed
	waiter->StartAndWait();
	User::LeaveIfError(waiter->Result());
	CleanupStack::PopAndDestroy(waiter);
	
	CleanupClosePushL(file);
	User::LeaveIfError(file.Write(_L8("some text")));
	User::LeaveIfError(file.SetAtt(KEntryAttReadOnly, KEntryAttNormal));
	CleanupStack::PopAndDestroy(2, store); // file, store

	// Now try and delete the file
	cEntry->SetEntryL(entry.Parent());
	cEntry->DeleteL(entry.Id());

	CleanupStack::PopAndDestroy(3); // cEntry, session, ob
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:50,代码来源:t_defect.cpp

示例5: DeleteServiceL

/**
Delete Existing Service

@param aSession		Current Session reference
@internalTechnology
*/
void CentralRepoUtils::DeleteServiceL(CMsvSession* aSession)
	{
	TMsvId serviceId;
	TRAPD(err,TSmsUtilities::ServiceIdL(*aSession,serviceId));
	if(err !=KErrNotFound)
		{
		CMsvEntry* entry = CMsvEntry::NewL(*aSession,serviceId,TMsvSelectionOrdering());
		CleanupStack::PushL(entry);
		entry->SetEntryL(serviceId);
		entry->SetEntryL(entry->Entry().Parent());
		entry->DeleteL(serviceId);
		CleanupStack::PopAndDestroy(entry);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:20,代码来源:CentralRepoUtils.cpp

示例6: GetMessagePartIndexL

/**
GetMessagePartIndexL()
Retrieves the part index id for the email identified by aEntry

@param aEntry
A valid email identifier

@param aUid
An identifier tfor the type of message part to be retrieved

@return
TMsvId - message part identifier
*/
TMsvId CT_MsgComparePopEmailMsgs::GetMessagePartIndexL(TMsvEntry& aEntry, TUid aUid)
	{
	static TBool msgPartFound = EFalse;	
	TMsvId msgPartId = 0;
	CMsvEntry*	baseEntry  = iSharedDataPOP.iSession->GetEntryL(aEntry.Id());
	CleanupStack::PushL(baseEntry);
	CMsvEntrySelection*	selection =  baseEntry->ChildrenL();
	CleanupStack::PushL(selection);
	TInt count = selection->Count();
	TInt ind1;
	CMsvEntry* entry = iSharedDataPOP.iSession->GetEntryL(KMsvRootIndexEntryId);
	CleanupStack::PushL(entry);
	for (ind1=0, msgPartFound=EFalse; ind1 < count; ind1++)
		{
		if(msgPartFound)
			{
			break;
			}		
		TMsvId	childId  = selection->At(ind1);
		entry->SetEntryL(childId);

		if (entry->Entry().iType  == aUid)
			{
			msgPartId = childId;
			break;
			}
		else if (entry->Entry().iType  == KUidMsvFolderEntry)
			{
			TMsvEntry ent = entry->Entry();
			msgPartId = GetMessagePartIndexL(ent, aUid);
			}
		}
	CleanupStack::PopAndDestroy(3, baseEntry);  // entry,selection,baseEntry
	return msgPartId;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:48,代码来源:T_ComparePopEmailMsgs.cpp

示例7: HandleSessionEventL

void CScheduleTestActive::HandleSessionEventL(TMsvSessionEvent eventType, TAny* p1, TAny*, TAny*)
	{
	if (iStopAtRunL) return;
	if (eventType != EMsvEntriesCreated) return;

	CMsvEntrySelection* entries = STATIC_CAST(CMsvEntrySelection*, p1);

	CMsvEntry* cEntry = iSession.GetEntryL((*entries)[0]);
	CleanupStack::PushL(cEntry);

	TMsvEntry entry(cEntry->Entry());
	
	if(entry.iDetails == KSchSendTestDetails)
		{
		iTest.Printf(_L("Scheduled message has been sent\n"));

		//We found the right message!
		CActiveScheduler::Stop();

		//Delete the new message
		CMsvOperationWait* wait = CMsvOperationWait::NewLC();
		wait->Start();
		cEntry->SetEntryL(entry.Parent());
		CMsvOperation* op = cEntry->DeleteL(entry.Id(), wait->iStatus);
		CActiveScheduler::Start();
		delete op;
		CleanupStack::PopAndDestroy(wait);
		}

	CleanupStack::PopAndDestroy(cEntry);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:31,代码来源:t_schsendutils.cpp

示例8: TestIncPcSyncCountL

void CT_CMsvSession::TestIncPcSyncCountL()
	{
	TInt error = KErrGeneral;
	INFO_PRINTF1(_L("Testing: Increment PC Sync Count -- started"));
	TRAP(error, iSession = CMsvSession::OpenSyncL(*this));
	TEST(error == KErrNone);

	CMsvOperationWait* active = CMsvOperationWait::NewLC();
	
	CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
	CleanupStack::PushL(cEntry);
	
	CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
	CleanupStack::PushL(selection);

	TInt ret = iSession->InstallMtmGroup(KDataComponentFilename);
	TEST(ret==KErrNone|| ret==KErrAlreadyExists);

	cEntry->SetEntryL(KMsvRootIndexEntryId);
	TMsvEntry service;
	service.iType=KUidMsvServiceEntry;
	service.iMtm = KUidTestServerMtmType;
	cEntry->CreateL(service);

	selection->AppendL(service.Id());
	
	TBuf8<256> progress;
	TBuf8<32> param;
	TRAP(error, iSession->IncPcSyncCountL(*selection);)
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:29,代码来源:t_cmsvsession.cpp

示例9: ExecuteActionL

void CMtfTestActionSetUserResponse::ExecuteActionL()
	{	
	TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionSetUserResponse);
	CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession> (TestCase(),ActionParameters().Parameter(0));	
	TInt paramUserResponse = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(1),EFalse);
	
	CMsvEntry* cEntry = CMsvEntry::NewL(*paramSession, KMsvDraftEntryId, 
						TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue));
	CleanupStack::PushL(cEntry);
	
	CMsvEntrySelection* selection = cEntry->ChildrenL();
	CleanupStack::PushL(selection);

	TestCase().INFO_PRINTF2(_L("Count of Draft Folder's selection is %d"),selection->Count());
	
	if (selection->Count() == 0)
	{	
	User::Leave(KErrNotFound);
	}
	
	cEntry->SetEntryL((*selection)[0]);

	if (!paramUserResponse)
	{	
	TMsvEntry entry = cEntry->Entry();
	entry.iError = KErrCancel;
	cEntry->ChangeL(entry);
	}
	
	CleanupStack::PopAndDestroy(2);
	
	TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionSetUserResponse);
	TestCase().ActionCompletedL(*this);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:34,代码来源:CMtfTestActionSetUserResponse.cpp

示例10: CheckNoAttachmentsL

void CheckNoAttachmentsL()
	{
	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);

	test(selection->Count() == 1);
	cEntry->SetEntryL((*selection)[0]);

	if (cEntry->HasStoreL())
		{
		CMsvStore* store = cEntry->ReadStoreL();
		CleanupStack::PushL(store);
	
		MMsvAttachmentManager& attachmentMgr = store->AttachmentManagerL();
		test(attachmentMgr.AttachmentCount() == 0);
		CleanupStack::PopAndDestroy(store);
		}

	CleanupStack::PopAndDestroy(4, ob1); // selection, cEntry, session, ob1
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:30,代码来源:T_SendAs_Message_Send_Cancel.cpp

示例11: ExecuteActionL

void CMtfTestActionCopyEntry::ExecuteActionL()
{
    TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionCopyEntry);
    CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
    TMsvId paramEntryId     = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
    TMsvId paramTargetId      = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(2));

    CMsvEntry* entry = CMsvEntry::NewL(*paramSession,paramEntryId,TMsvSelectionOrdering());
    CleanupStack::PushL(entry);
    entry->SetEntryL(paramEntryId);
    entry->SetEntryL(entry->Entry().Parent());
    iOperation = entry->CopyL(paramEntryId,paramTargetId,iStatus);
    CleanupStack::PopAndDestroy(entry);
    CActiveScheduler::Add(this);
    SetActive();
    TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionCopyEntry);
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:17,代码来源:CMtfTestActionCopyEntry.cpp

示例12:

void CMtfTestActionDeletePop3Service::ExecuteActionL()
	{
	TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDeletePop3Service);
	CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
	TMsvId paramServiceId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));

	CMsvEntry* entry = CMsvEntry::NewL(*paramSession,paramServiceId,TMsvSelectionOrdering());
	CleanupStack::PushL(entry);
	entry->SetEntryL(paramServiceId);
	entry->SetEntryL(entry->Entry().Parent());
	entry->DeleteL(paramServiceId);
	CleanupStack::PopAndDestroy(entry);
	DeleteParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));

	TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDeletePop3Service);
	TestCase().ActionCompletedL(*this);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:17,代码来源:CMtfTestActionDeletePop3Service.cpp

示例13: ForwardL

CMsvOperation* CTextMtmClient::ForwardL(TMsvId aForwardEntryId, TMsvPartList aPartList, 
										TRequestStatus& aCompletionStatus)
// Create forwarded message 
// Destination folder is aForwardEntryL
//
	{
	__ASSERT_DEBUG(iMsvEntry!=NULL,gPanic(ETxtcNoCMsvEntrySet));
	__ASSERT_DEBUG(iMsvEntry->Entry().iType.iUid == KUidMsvMessageEntryValue, gPanic(ETxtcEntryTypeNotSupported));
	__ASSERT_DEBUG(iMsvEntry->Entry().iServiceId == KMsvLocalServiceIndexEntryId, gPanic(ETxtcInvalidServiceId));
	
	// Create the forwarded index entry
	TMsvEntry forwardEntry;
	forwardEntry.iMtm = KUidMsgTypeText;
	forwardEntry.iServiceId = Entry().Entry().iServiceId;
	forwardEntry.iType = KUidMsvMessageEntry;
	forwardEntry.iDetails.Set(iMsvEntry->Entry().iDetails);				
	forwardEntry.iSize = iMsvEntry->Entry().iSize;	
	if(aPartList&KMsvMessagePartDate)
		forwardEntry.iDate.HomeTime();
	if(aPartList&KMsvMessagePartDescription)
		forwardEntry.iDescription.Set(iMsvEntry->Entry().iDescription);		

	// Get CMsvEntry for destination (parent)
	CMsvEntry* cEntry = CMsvEntry::NewL(Session(), aForwardEntryId, TMsvSelectionOrdering());
	CleanupStack::PushL(cEntry);
	// Synchronously create new child
	CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC();
	CMsvOperation* opert = cEntry->CreateL(forwardEntry, wait->iStatus);
	CleanupStack::PushL(opert);
	wait->Start();
	User::LeaveIfError(opert->iStatus.Int());
	// Check result
	TPckgBuf<TMsvLocalOperationProgress> progressPack;
    progressPack.Copy(opert->ProgressL());
	TMsvLocalOperationProgress progress = progressPack();
	User::LeaveIfError(progress.iError);
	CleanupStack::PopAndDestroy(2);	// opert, wait

	// Get CMsvEntry for new entry
	TMsvId forwardId=progress.iId;
	cEntry->SetEntryL(forwardId);
	
	// Populate new forwarded message with Body text
	if(aPartList&KMsvMessagePartBody)
		{
		CMsvStore* store=cEntry->EditStoreL();
		CleanupStack::PushL(store);
		StoreBodyL(*store);				// Current context is original message
		store->CommitL();
		CleanupStack::PopAndDestroy();	// store
		}

	CleanupStack::PopAndDestroy(); // cEntry
		
	// Request was performed synchronously, so return a completed operation object
	return CMsvCompletedOperation::NewL(Session(), KUidMsgTypeText, progressPack, 
		KMsvNullIndexEntryId, aCompletionStatus);
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:58,代码来源:TXCLIENT.CPP

示例14: StoreMsgL

// -----------------------------------------------------------------------------
// CWPMessage::StoreMsgL
// -----------------------------------------------------------------------------
//
void CWPMessage::StoreMsgL()
    {
    FLOG( _L( "CWPMessage::StoreMsgL" ) );
    
    // create an invisible blank entry 
    TMsvEntry entry;
    PrepareEntryLC( entry ); // details on cleanup stack
    entry.iBioType = iBioUID.iUid;
    entry.iMtm = KUidBIOMessageTypeMtm;
    
    // Look up and set the description
    FLOG( _L( "CWPMessage::StoreMsgL 1" ) );
    
    TInt index;
    CBIODatabase* bioDB = CBIODatabase::NewLC( iSession->FileSession() );
    FLOG( _L( "CWPMessage::StoreMsgL 2" ) );
    TRAPD( err, bioDB->GetBioIndexWithMsgIDL( iBioUID, index ) );
    if (err ==KErrNone)
        {
        FLOG( _L( "CWPMessage::StoreMsgL 3" ) );
        HBufC* description = bioDB->BifReader(index).Description().AllocL();
        FLOG( _L( "CWPMessage::StoreMsgL 4" ) );
        entry.iDescription.Set(*description);
        FLOG( _L( "CWPMessage::StoreMsgL 5" ) );
        CleanupStack::PopAndDestroy();  // bioDB
        CleanupStack::PushL( description );
        }
    else
        {
        FTRACE(RDebug::Print(_L(" CWPMessage::StoreMsgL err (%d)"), err));
        CleanupStack::PopAndDestroy();  // bioDB
        }
        
    FLOG( _L( "CWPMessage::StoreMsgL 6" ) );
    // Store entry in inbox
    CMsvEntry* msvEntry = iSession->GetEntryL( KMsvGlobalInBoxIndexEntryId );
    FLOG( _L( "CWPMessage::StoreMsgL 7" ) );
    CleanupStack::PushL(msvEntry);
    msvEntry->CreateL(entry);
    msvEntry->Session().CleanupEntryPushL(entry.Id());
    msvEntry->SetEntryL(entry.Id());
    FLOG( _L( "CWPMessage::StoreMsgL 8" ) );
    // Save the message
    CMsvStore* store = msvEntry->EditStoreL();
    CleanupStack::PushL(store);
    FLOG( _L( "CWPMessage::StoreMsgL 9" ) );
    iMessage->StoreL( *store );
    store->CommitL();
    
    // Complete processing the message
    PostprocessEntryL( *msvEntry, entry );

    CleanupStack::PopAndDestroy(); //store
    msvEntry->Session().CleanupEntryPop(); //entry
    CleanupStack::PopAndDestroy(3); //description, details, msvEntry
    FLOG( _L( "CWPMessage::StoreMsgL Done" ) );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:61,代码来源:CWPMessage.cpp

示例15: TestSetSendingStateAttributeL

LOCAL_C void TestSetSendingStateAttributeL()
	{
	CDummyObserver* ob = new(ELeave)CDummyObserver;
	CleanupStack::PushL(ob);

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

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

	CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
	CleanupStack::PushL(selection);

	TMsvEntry entry1;
	entry1.iType = KUidMsvMessageEntry;
	entry1.iMtm = KUidMsvLocalServiceMtm;
	entry1.iServiceId = KMsvLocalServiceIndexEntryId;
	entry1.SetSendingState(12);
	cEntry->CreateL(entry1);
	selection->AppendL(entry1.Id());

	TMsvEntry entry2;
	entry2.iType = KUidMsvMessageEntry;
	entry2.iMtm = KUidMsvLocalServiceMtm;
	entry2.iServiceId = KMsvLocalServiceIndexEntryId;
	entry2.SetSendingState(3);
	cEntry->CreateL(entry2);
	selection->AppendL(entry2.Id());
	
	session->ChangeAttributesL(*selection, 6<<KMsvSendingStateShift, 0);

	cEntry->SetEntryL(entry1.Id());
	test(cEntry->Entry().SendingState() == 6);

	cEntry->SetEntryL(entry2.Id());
	test(cEntry->Entry().SendingState() == 6);
	
	CleanupStack::PopAndDestroy(4); // selection, cEntry, session, ob
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:40,代码来源:t_defect.cpp


注:本文中的CMsvEntry::SetEntryL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。