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


C++ CMsvSession::GetEntry方法代码示例

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


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

示例1: HandleSessionEventL

void CSessionObserver::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny*)
	{
	if (aEvent == EMsvServerReady ||
		aEvent == EMsvCorruptedIndexRebuilt ||
		aEvent == EMsvMediaIncorrect ||
		aEvent == EMsvCorruptedIndexRebuilding)
		{
		// See if the index is available
		if (aEvent != EMsvMediaIncorrect &&  aEvent != EMsvCorruptedIndexRebuilding)
			{
			TMsvId service;
			TMsvEntry entry;

			// Check we can retrieve the inbox details from the index
			test(iSession->GetEntry(KMsvGlobalInBoxIndexEntryId, service, entry) == KErrNone);
			}

		iType = aEvent;
		if (aArg1)
			iArg1 = *(TInt*)aArg1;
		if (aArg2)
			iArg2 = *(TInt*)aArg2;
		CActiveScheduler::Stop();
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:25,代码来源:T_MAILSTORE.CPP

示例2: RunTestL

void CMtfTestActionAddEntryAttachment::RunTestL()
{
    CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
    TMsvId messageEntry = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
    TMsvId attachmentMessageEntry = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(2));

    CMsvEntry* entry = paramSession->GetEntryL(messageEntry);
    CleanupStack::PushL(entry);

    CMsvStore* store = entry->EditStoreL();
    CleanupStack::PushL(store);

    CMtfAsyncWaiter* waiter = CMtfAsyncWaiter::NewL();
    CleanupStack::PushL(waiter);

    CMsvAttachment* attachment = CMsvAttachment::NewL(CMsvAttachment::EMsvMessageEntry);
    CleanupStack::PushL(attachment);

    TMsvEntry attachmentEntry;
    TMsvId attachmentServiceEntry;
    User::LeaveIfError(paramSession->GetEntry(attachmentMessageEntry, attachmentServiceEntry, attachmentEntry));
    attachment->SetSize(attachmentEntry.iSize);

    MMsvAttachmentManager& manager = store->AttachmentManagerL();

    manager.AddEntryAsAttachmentL(attachmentMessageEntry, attachment, waiter->iStatus);
    CleanupStack::Pop(attachment); // ownership passed to manager
    waiter->StartAndWait();
    User::LeaveIfError(waiter->Result());
    CleanupStack::PopAndDestroy(waiter);

    TMsvAttachmentId attachmentId = attachment->Id();

    store->CommitL();

    CleanupStack::PopAndDestroy(2, entry); // store, entry

    StoreParameterL<TMsvAttachmentId>(TestCase(),attachmentId,ActionParameters().Parameter(3));
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:39,代码来源:CMtfTestActionAddEntryAttachment.cpp


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