本文整理汇总了C++中CMsvEntry::ChildDataL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvEntry::ChildDataL方法的具体用法?C++ CMsvEntry::ChildDataL怎么用?C++ CMsvEntry::ChildDataL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvEntry
的用法示例。
在下文中一共展示了CMsvEntry::ChildDataL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckInboxL
/*
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
*/
void CSMSMonitor::CheckInboxL(void)
{
TInt smsCount(0),mmsCount(0);
CMsvEntry* Entrie = iSession->GetEntryL(KMsvGlobalInBoxIndexEntryId);
if(Entrie)
{
CleanupStack::PushL(Entrie);
if(Entrie->Count())
{
TMsvSelectionOrdering MySortType;
MySortType.SetSorting(EMsvSortByDate);
Entrie->SetSortTypeL(MySortType);
CMsvEntrySelection* entries = Entrie->ChildrenL();
if(entries)
{
CleanupStack::PushL(entries);
for(TInt i = (entries->Count() - 1); i >= 0; i--)
{
if(Entrie->ChildDataL(entries->At(i)).Unread())
{
if(Entrie->ChildDataL(entries->At(i)).iMtm == KUidMsgTypeSMS)
{
smsCount++;
}
else if(Entrie->ChildDataL(entries->At(i)).iMtm == KUidMsgTypeMultimedia)
{
mmsCount++;
}
}
}
CleanupStack::PopAndDestroy(entries);
}
}
CleanupStack::PopAndDestroy(1);//Entrie
}
if(iObserver){
iObserver->InboxChangedL(smsCount,mmsCount);
}
}
示例2: AddEmailFoldersL
/*
-----------------------------------------------------------------------------
----------------------------------------------------------------------------
*/
void CMailBoxContainer::AddEmailFoldersL(CMsvSession* aSession)
{
if(aSession)
{
CMsvEntry *localServiceEntry = aSession->GetEntryL(KMsvRootIndexEntryId);//KMsvLocalServiceIndexEntryId);
CleanupStack::PushL(localServiceEntry);
CMsvEntrySelection *folders = localServiceEntry->ChildrenL();
CleanupStack::PushL(folders);
if(folders->Count() > 1) // first is local folder
{
for (TInt i = 1;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
}
}
示例3: 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);
}
}
示例4: GetOutboxEntriesL
// ---------------------------------------------------------
// GetOutboxEntries()
// Outgoing Pending message/messages
// ---------------------------------------------------------
TInt MsgStoreHandler::GetOutboxEntriesL(MsgInfo& aFailedIndicatorData,
MsgInfo& aPendingIndicatorData)
{
CMsvEntry* rootEntry = iMsvSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId);
CMsvEntrySelection* messages = rootEntry->ChildrenL();
TInt failedMessageCount = 0;
TInt pendingMessageCount = 0;
for (TInt i = 0; i < messages->Count(); ++i) {
TMsvEntry entry = rootEntry->ChildDataL(messages->At(i));
if ((entry.iMtm != KSenduiMtmSmsUid) && (entry.iMtm != KSenduiMtmMmsUid)) {
continue;
}
if (entry.SendingState() == KMsvSendStateFailed) {
++failedMessageCount;
}
else {
++pendingMessageCount;
}
if (entry.SendingState() == KMsvSendStateFailed) {
ProcessIndicatorDataL(entry.Id(), aFailedIndicatorData);
}
else {
ProcessIndicatorDataL(entry.Id(), aPendingIndicatorData);
}
}
aFailedIndicatorData.mFromSingle = (failedMessageCount > 1) ? false : true;
aPendingIndicatorData.mFromSingle = (pendingMessageCount > 1) ? false : true;
aFailedIndicatorData.mIndicatorType = FailedIndicatorPlugin;
aPendingIndicatorData.mIndicatorType = PendingIndicatorPlugin;
aFailedIndicatorData.mMsgCount = failedMessageCount;
aPendingIndicatorData.mMsgCount = pendingMessageCount;
return KErrNone;
}
示例5: HandleSessionEventL
// ---------------------------------------------------------
// MsgStoreHandler::HandleSessionEventL()
// ---------------------------------------------------------
//
void MsgStoreHandler::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
{
CMsvEntrySelection* selection = NULL;
TMsvId parent;
//args
if (aArg1 == NULL || aArg2 == NULL) {
return;
}
//start, processing the event
selection = (CMsvEntrySelection*) aArg1;
parent = *(TMsvId*) aArg2;
// Return when not (outbox or inbox) and event not EMsvEntriesChanged
if (!(parent == KMsvGlobalOutBoxIndexEntryIdValue || parent == KMsvGlobalInBoxIndexEntryIdValue)
&& aEvent != EMsvEntriesChanged) {
return;
}
// check for incoming class 0 sms
if (parent == KMsvGlobalInBoxIndexEntryIdValue && aEvent == EMsvEntriesChanged) {
CMsvEntry* inboxEntry = iMsvSession->GetEntryL(KMsvGlobalInBoxIndexEntryId);
for (TInt i = 0; i < selection->Count(); ++i) {
TMsvEntry entry = inboxEntry->ChildDataL(selection->At(i));
if (KSenduiMtmSmsUidValue == entry.iMtm.iUid) {
CMsvEntry* msgEntry = iMsvSession->GetEntryL(entry.Id());
TMsvSmsEntry smsEntry = msgEntry->Entry();
TSmsDataCodingScheme::TSmsClass classType(TSmsDataCodingScheme::ESmsClass0);
if (smsEntry.Class(classType) && smsEntry.Unread())
{
HandleClass0SmsL(msgEntry, smsEntry.Id());
}
else
{
delete msgEntry;
msgEntry = NULL;
}
}
} // for (TInt i = 0; i < selection->Count(); ++i)
delete inboxEntry;
}
//Handling for outbox entries
else if (parent == KMsvGlobalOutBoxIndexEntryIdValue) {
CMsvEntry* rootEntry = iMsvSession->GetEntryL(KMsvGlobalOutBoxIndexEntryId);
for (TInt i = 0; i < selection->Count(); ++i) {
TMsvEntry entry = rootEntry->ChildDataL(selection->At(i));
if ((entry.iMtm == KSenduiMtmSmsUid) || (entry.iMtm == KSenduiMtmMmsUid)) {
TUint sendingState = entry.SendingState();
TInt index = iFailedMessages->Find(entry.Id());
if (sendingState == KMsvSendStateFailed && KErrNotFound == index) {
iFailedMessages->AppendL(entry.Id());
MsgInfo aInfo;
ProcessIndicatorDataL(entry.Id(), aInfo);
iNotifier->displayFailedNote(aInfo);
}
else if (sendingState != KMsvSendStateFailed && KErrNotFound != index) {
iFailedMessages->Delete(index);
iFailedMessages->Compress();
}
}
}//end for
}
else {
TMsvEntry entry;
TMsvId service;
TInt error = KErrNone;
for (TInt i = 0; i < selection->Count(); ++i) {
error = iMsvSession->GetEntry(selection->At(i), service, entry);
if (error == KErrNone && entry.iMtm == KUidMsgMMSNotification &&
MmsNotificationStatus(entry) == EMsgStatusFailed) {
TInt index = iFailedMessages->Find(entry.Id());
if (KErrNotFound == index) {
iFailedMessages->AppendL(entry.Id());
MsgInfo aInfo;
//Fill aInfo with appropriate data
aInfo.mMessageType = ECsMmsNotification;
ProcessIndicatorDataL(entry.Id(), aInfo);
iNotifier->displayFailedNote(aInfo);
}// end of if
}
else if (error == KErrNone && entry.iMtm == KUidMsgMMSNotification
&& MmsNotificationStatus(entry) == EMsgStatusRetrieving) {
TInt index = iFailedMessages->Find(entry.Id());
//.........这里部分代码省略.........