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


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

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


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

示例1: testInboxMessage

//---------------------------------------------------------------
// TestUniDataModelPlugin::testInboxMessage
//---------------------------------------------------------------
void TestUniDataModelMMSPlugin::testInboxMessage()
    {
	//Create the MMS First
	createMMS(KMsvGlobalInBoxIndexEntryIdValue,ETrue);
    
	QTest::qWait(50000);  //to ensure path completion
	
	//MMS Message created, will now be validated
	
	//Checking if Another Instance of MMS Data Plugin can be created form an existing one
	QObject* anotherInstance = pluginInterface->createInstance();
    QVERIFY(anotherInstance != NULL);
    delete anotherInstance;
    
    //Setting a Message ID, thereby populating the MMS message at the Plugin
    QVERIFY(pluginInterface->setMessageId(iMessageId) == KErrNone);

    //Verifying the MMS message size
    QVERIFY(pluginInterface->messageSize() == msgSize);
    
    //Verifying the MMS timestamp
    QVERIFY(pluginInterface->timeStamp() == retTimeStamp);
    
    //Verifying is the MMP Plugin works file afetr it has been Reset and Restored
    pluginInterface->reset();
	pluginInterface->restore(*iMmsClientMtm);
	QVERIFY(pluginInterface->setMessageId(iMessageId) == KErrNone);
	
	//Subject Verification
    QVERIFY(pluginInterface->subject().compare(QString(TEST_MSG_SUBJECT)) == 0);
    
    //MMS message have no Body String
    QString body;
    pluginInterface->body(body);
    QVERIFY(body == QString(""));
    
    //Message type verification
    QVERIFY(pluginInterface->messageType().compare(QString("mms")) == 0);
    
    //Fetch the To List
    ConvergedMessageAddressList recipientList;
    pluginInterface->toRecipientList(recipientList);
    QVERIFY(recipientList.count() != 0);
    QVERIFY(recipientList[0]->address().compare(QString(TEST_MSG_RECIEPIENT1)) == 0);
    
    //Fetch the CC List
    ConvergedMessageAddressList recipientList2;
    pluginInterface->ccRecipientList(recipientList2);
    QVERIFY(recipientList2.count() != 0);
    QVERIFY(recipientList2[0]->address().compare(QString(TEST_MSG_RECIEPIENT2)) == 0);
    
    //Fetch the BCC List
    ConvergedMessageAddressList recipientList3;
    pluginInterface->bccRecipientList(recipientList3);
    QVERIFY(recipientList3.count() != 0);
    QVERIFY(recipientList3[0]->address().compare(QString(TEST_MSG_RECIEPIENT3)) == 0);
    
    //Fetch the From Address
    QString recepient(TEST_MSG_FROM1);
    QString fromaddress;
    pluginInterface->fromAddress(fromaddress);
    QVERIFY(recepient == fromaddress);
    
    //Verifying Attachments
    UniMessageInfoList attList = pluginInterface->attachmentList();
    QVERIFY(attList.count() == 0);
    
    QVERIFY(pluginInterface->hasAttachment() == false);
    
    QVERIFY(pluginInterface->attachmentCount() == 0);
    
    QVERIFY(pluginInterface->messagePriority() == 1);

    //Verifying various objects added to the MMS Message during creation
    QVERIFY(pluginInterface->objectCount() == 2);
    
    UniMessageInfoList objectlist = pluginInterface->objectList();
    QVERIFY(!objectlist.isEmpty());
    
    QVERIFY(objectlist[1]->path().contains(QString("TestUnidataModelMMSPluginPhoto.jpg"), Qt::CaseInsensitive) == true);
	QVERIFY(objectlist[1]->mimetype().contains(QString("image/jpeg"), Qt::CaseInsensitive) == true);
    
    QVERIFY(pluginInterface->slideCount() == 1);
    
    QVERIFY(pluginInterface->slideContent(0)[0]->path().contains(QString("Story.txt"), Qt::CaseInsensitive) == true);
    QVERIFY(pluginInterface->slideContent(0)[0]->mimetype().contains(QString("text/plain"), Qt::CaseInsensitive) == true);
    
    //Verifying if the plugin returns the correct session, thus will correctly delete the MMS we just created
    CMsvSession* msvSession = pluginInterface->session();
    QVERIFY(msvSession != NULL);
    msvSession->RemoveEntry(iMessageId);
    
    qDebug() << "Verified Test MMS Successfully";    
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:97,代码来源:testunidatamodelmmsplugin.cpp


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