本文整理汇总了C++中CMsvEntry::ChildrenWithTypeL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvEntry::ChildrenWithTypeL方法的具体用法?C++ CMsvEntry::ChildrenWithTypeL怎么用?C++ CMsvEntry::ChildrenWithTypeL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvEntry
的用法示例。
在下文中一共展示了CMsvEntry::ChildrenWithTypeL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFoldersL
/*
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
*/
void CMailBoxContainer::GetFoldersL(void)
{
iFolderArray.ResetAndDestroy();
if(iSession)
{
CMsvEntry *localServiceEntry = iSession->GetEntryL(KMsvLocalServiceIndexEntryId);
CleanupStack::PushL(localServiceEntry);
CMsvEntrySelection *folders = localServiceEntry->ChildrenWithTypeL(KUidMsvFolderEntry);
CleanupStack::PushL(folders);
for (TInt i = 0;i < folders->Count();i++)
{
TMsvEntry ExtraFolder = localServiceEntry->ChildDataL((*folders)[i]);
CMailFldItem* NewIttem = new(ELeave)CMailFldItem();
CleanupStack::PushL(NewIttem);
NewIttem->iTitle = ExtraFolder.iDetails.AllocL();
NewIttem->iMscId = ExtraFolder.Id();
CleanupStack::Pop();//NewIttem
iFolderArray.Append(NewIttem);
}
CleanupStack::PopAndDestroy(2); // localServiceEntry, folders
AddEmailFoldersL(iSession);
}
}
示例2:
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
void CIpsPlgImap4ConnectOp::CreateInboxMessagesSelectionL()
{
FUNC_LOG;
// get children of service entry
CMsvEntry* cEntry = iMsvSession.GetEntryL( iService );
CleanupStack::PushL( cEntry );
CMsvEntrySelection* childrenSelection = cEntry->ChildrenL();
CleanupStack::PopAndDestroy( cEntry );
cEntry = NULL;
CleanupStack::PushL( childrenSelection );
if ( childrenSelection->Count() )
{
TMsvId id = (*childrenSelection)[0]; // index 0 == inbox
cEntry = iMsvSession.GetEntryL( id ); // reusing cEntry pointer for Inbox entry
CleanupStack::PushL( cEntry );
delete iSelection;
iSelection = NULL;
// get message-type children of inbox
iSelection = cEntry->ChildrenWithTypeL( KUidMsvMessageEntry );
CleanupStack::PopAndDestroy( cEntry );
}
CleanupStack::PopAndDestroy( childrenSelection );
}
示例3: PopulateAllL
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
void CIpsSosAOImapAgent::PopulateAllL()
{
FUNC_LOG;
TImImap4GetPartialMailInfo info;
//<QMail>
CIpsSosAOSettingsHandler* settings =
CIpsSosAOSettingsHandler::NewL(iSession, iServiceId);
CleanupStack::PushL(settings);
settings->ConstructImapPartialFetchInfo( info, *iImapSettings );
CleanupStack::PopAndDestroy(settings);
//</QMail>
if ( !IsConnected() )
{
SignalSyncCompleted( iServiceId, iError );
CancelAllAndDisconnectL();
}
//<QMail>
else if ( iFoldersArray.Count() > 0 && info.iTotalSizeLimit
!= KIpsSetDataHeadersOnly )
//</QMail>
{
// only inbox is set, do we have to populate other folders also
TMsvId id = iFoldersArray[0];
CMsvEntry* cEntry = iSession.GetEntryL( id );
CleanupStack::PushL( cEntry );
CMsvEntrySelection* sel = cEntry->ChildrenWithTypeL(
KUidMsvMessageEntry );
CleanupStack::PushL( sel );
info.iDestinationFolder = iFoldersArray[0];
CIpsPlgTimerOperation* dummy = NULL;
iImapClientMtm->SwitchCurrentEntryL( iServiceId );
TFSMailMsgId mbox( KIpsPlgImap4PluginUidValue, iServiceId );
iStatus = KRequestPending;
//<Qmail>
iOngoingOp = CIpsPlgImap4PopulateOp::NewL(
iSession,
this->iStatus,
iServiceId,
*dummy,
info,
*sel,
mbox,
this,
0,
NULL );
//</Qmail>
iFoldersArray.Remove( 0 );
SetActive();
iState = EStatePopulateAll;
CleanupStack::PopAndDestroy( 2, cEntry );
}
else
{
iState = EStateDisconnect;
SignalSyncStarted( iServiceId );
SetActiveAndCompleteThis();
}
}
示例4: CreateNewSMSMessageL
void CSAEXAppUi::CreateNewSMSMessageL()
{
TMsvSelectionOrdering order( KMsvNoGrouping, EMsvSortByDate, ETrue );
CMsvEntry* folderEntry = CMsvEntry::NewL( *iSession,KMsvDraftEntryId, order );
CleanupStack::PushL( folderEntry );
CMsvEntrySelection* folderSelection = folderEntry->ChildrenWithTypeL(
KUidMsvMessageEntry );
CleanupStack::PushL( folderSelection );
const TInt count( folderSelection->Count() );
for ( TInt i( 0 ); i < count; i++ )
{
CMsvEntry *msgEntry;
TMsvId msgEntryId = ( *folderSelection )[ i ];
msgEntry=iSession->GetEntryL( msgEntryId);
CleanupStack::PushL(msgEntry);
if( msgEntry!= KErrNone )
{
if(true)//msgEntry->Entry().iType)//KUidMsvMessageEntry)
{
CParaFormatLayer* paraLayer = CParaFormatLayer::NewL();
CleanupStack::PushL(paraLayer);
CCharFormatLayer* charLayer = CCharFormatLayer::NewL();
CleanupStack::PushL(charLayer);
CRichText* cipherBody = CRichText::NewL(paraLayer, charLayer);
CRichText * plainBody=CRichText::NewL(paraLayer, charLayer);
CleanupStack::PushL(cipherBody);
CleanupStack::PushL(plainBody);
CMsvStore* store= msgEntry->ReadStoreL();
CleanupStack::PushL(store);
store->RestoreBodyTextL(*cipherBody);
CSendAs* iSendAs=NULL;
iSendAs = CSendAs::NewL(*this);
if(iSendAs)
{
CleanupStack::PushL(iSendAs);
iSendAs->SetMtmL(KUidMsgTypeSMS);
if(iSendAs->AvailableServices().Count()<1)
{
CEikonEnv::Static()->InfoMsg(_L("No SMS services available."));
User::Leave(KErrNotFound);
}
iSendAs->SetService(0);
User::LeaveIfError(iSendAs->QueryMessageCapability(KUidMtmQueryCanSendMsg, EFalse));
User::LeaveIfError(iSendAs->QueryMessageCapability(KUidMtmQueryMaxBodySize, ETrue));
iSendAs->CreateMessageL();
iSendAs->AddRecipientL( iRecipient->Des() );
//iSendAs->SetSubjectL( KIGainTag );
decryptBody(cipherBody,plainBody);
iSendAs->SetBodyL(*plainBody);
User::LeaveIfError(iSendAs->ValidateMessage());
iSendAs->SaveMessageL(ETrue); // message is saved into Outbox(drafts)
CleanupStack::PopAndDestroy(1,iSendAs);//plainBody and iSendAs
}
CleanupStack::PopAndDestroy(5, paraLayer);
}
else
{
CEikonEnv::Static()->AlertWin(_L("No SMS found."));
User::Leave(KErrNotFound);
}
CleanupStack::PopAndDestroy(1, msgEntry);
}
}
CleanupStack::PopAndDestroy( 2 );
}