本文整理汇总了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();
}
}
示例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));
}