WEB开发网
开发学院手机开发Symbian 开发 Symbian (Read Inbox)读取收件箱的内容 阅读

Symbian (Read Inbox)读取收件箱的内容

 2010-02-21 15:53:00 来源:WEB开发网   
核心提示:const TInt length = richText.DocumentLength();HBufC* smsContent = richText.Read(0, length).AllocL();CleanupStack::PushL(smsContent);richText.Reset();RLog::LogPo

const TInt length = richText.DocumentLength();

HBufC* smsContent = richText.Read(0, length).AllocL();

CleanupStack::PushL(smsContent);

richText.Reset();

RLog::LogPoor(smsContent->Des());

//iAppView->LogPrintL(*smsContent);

CleanupStack::PopAndDestroy(); // smsContent

}

else

{

// The SMS contains no text

RLog::LogPoor(_L("Has no body text"));

}

CleanupStack::PopAndDestroy();

}

else if(entry->Entry().iMtm == KUidMsgTypeMultimedia)//彩信

{

RLog::LogPoor(_L("mms message"));

CMsvStore* inboxStore= entry->ReadStoreL();

CleanupStack::PushL(inboxStore);

MMsvAttachmentManager& attachManager = inboxStore->AttachmentManagerL();

TInt attachmentCount = attachManager.AttachmentCount();

RLog::LogPoor(_L("attachmentCount = "),attachmentCount);

RFs fs;

fs.Connect();

//得到所有附件

for(TInt i=0;i< p>

{

CMsvAttachment *attachment =attachManager.GetAttachmentInfoL(i);

CleanupStack::PushL(attachment);

TPtrC8 mime = attachment->MimeType();

CMsvAttachment::TMsvAttachmentType type =attachment->Type();

RLog::LogPoor(mime);

RLog::LogPoor(attachment->AttachmentName());

RLog::LogPoor(attachment->FilePath());

RLog::LogPoor(_L("type = "),type);

彩信附件分三种类型

1.文件附件:被拷贝或创建在消息存储(Message Store)中的文件。

2.文件链接附件:附件是链接到磁盘中的文件,没有拷贝到消息存储(Message Store)中。

3.消息条目(Entry):系统中的消息可以注册为别一个消息的附件。

if (type != CMsvAttachment::EMsvMessageEntry)

上一页  1 2 3 4 5  下一页

Tags:Symbian Read Inbox

编辑录入:coldstar [复制链接] [打 印]
赞助商链接