本文整理汇总了C++中TMsvEntry::SetMtmData1方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::SetMtmData1方法的具体用法?C++ TMsvEntry::SetMtmData1怎么用?C++ TMsvEntry::SetMtmData1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMsvEntry
的用法示例。
在下文中一共展示了TMsvEntry::SetMtmData1方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareEntryLC
// -----------------------------------------------------------------------------
// CWPMessage::PrepareEntry
// -----------------------------------------------------------------------------
//
void CWPMessage::PrepareEntryLC( TMsvEntry& aEntry )
{
FLOG( _L( "CWPMessage::PrepareEntryLC" ) );
// Current time
TTime time;
// Get Universal time
time.UniversalTime();
FLOG( _L( "CWPMessage::PrepareEntryLC create an invisible blank entry" ) );
// create an invisible blank entry
aEntry.iType = KUidMsvMessageEntry;
aEntry.SetVisible(EFalse);
aEntry.SetInPreparation(ETrue);
aEntry.SetReadOnly(EFalse);
aEntry.SetUnread(ETrue);
aEntry.iDate = time;
aEntry.iServiceId = KMsvLocalServiceIndexEntryId;
aEntry.iError = KErrNone;
// iMtmData1 is been used/reserved for count, please don't use for any other purpose.
aEntry.SetMtmData1(3);
FLOG( _L( "CWPMessage::PrepareEntryLC create an invisible blank entry done" ) );
// Look up the details
HBufC* details = NULL;
if( iMessage->Authenticated() )
{
FLOG( _L( "CWPMessage::PrepareEntryLC iMessage->Authenticated() true" ) );
details = LoadStringLC( R_FROM_SERVICEPROVIDER );
FLOG( _L( "CWPMessage::PrepareEntryLC LoadString done" ) );
}
else
{
FLOG( _L( "CWPMessage::PrepareEntryLC iMessage->Authenticated() false" ) );
if( iSender )
{
FLOG( _L( "CWPMessage::PrepareEntryLC iSender true" ) );
details = HBufC::NewLC( iSender->Length() );
details->Des().Copy( *iSender );
}
else
{
FLOG( _L( "CWPMessage::PrepareEntryLC iSender false" ) );
details = KNullDesC().AllocLC();
}
}
FLOG( _L( "CWPMessage::PrepareEntryLC iDetails.Set" ) );
aEntry.iDetails.Set( *details );
FLOG( _L( "CWPMessage::PrepareEntryLC Done" ) );
}
示例2: TestChangeEntry
void CTestSearchSortDeltaCache::TestChangeEntry()
{
_LIT(KFunction, "TestChangeEntry");
INFO_PRINTF1(KFunction);
TSecureId aOwnerId = 0x999;
sampleTMsvEntry.iDate.UniversalTime();
sampleTMsvEntry.SetParent(4096);
sampleTMsvEntry.iType = KUidMsvMessageEntry;
sampleTMsvEntry.SetId(10);
iIndexAdapter->AddEntry(sampleTMsvEntry, aOwnerId, ETrue);
TInt32 mtm1 = 35;
TInt32 mtm2 = 45;
sampleTMsvEntry.SetMtmData1(mtm1);
sampleTMsvEntry.SetMtmData2(mtm2);
iIndexAdapter->ChangeEntry(sampleTMsvEntry, 0x999, ETrue);
ASSERT_TRUE(iSearchSortDeltaCache->iUpdateEntry.Count() == 0 );
}
示例3: doMainL
LOCAL_C void doMainL()
{
Init();
testUtils->FileSession().SetSessionPath(_L("c:\\"));
// smtpService = testUtils->CreateSmtpServiceL();
// Create the POP3 service and set the settings for this test.
pop3Service = testUtils->CreatePopServiceL();
CImPop3Settings* settings = new(ELeave) CImPop3Settings();
CleanupStack::PushL(settings);
settings->Reset();
_LIT(KPopServer, "internet-test.plc.psion.com");
settings->SetServerAddressL(KPopServer);
settings->SetLoginNameL(testUtils->MachineName());
settings->SetPasswordL(testUtils->MachineName());
settings->SetPort(110);
// Saving POP settings
CEmailAccounts* accounts = CEmailAccounts::NewLC();
TPopAccount popAccount;
accounts->GetPopAccountL(pop3Service, popAccount);
accounts->SavePopSettingsL(popAccount, *settings);
CleanupStack::PopAndDestroy(2, settings); // accounts/store, settings
// Set the IAP to Demon (even though we're not going to dial up as such.)
User::LeaveIfError(testUtils->iServerEntry->SetEntry(pop3Service));
TMsvEntry entry = testUtils->iServerEntry->Entry();
entry.SetMtmData1(3);
User::LeaveIfError(testUtils->iServerEntry->ChangeEntry(entry));
test.Printf(_L("\nPerforming Tests\n"));
CTestActive* activeObjectTester = new (ELeave) CTestActive;
CleanupStack::PushL(activeObjectTester);
// Get server MTM.
testUtils->InstantiatePopServerMtmL();
CBaseServerMtm* pop3ServerMtm = testUtils->iPopServerMtm;
// Get the POP3 server MTM to connect.
log->AppendComment(_L8("Connect to POP3 server"));
CMsvEntrySelection* serviceId = new (ELeave) CMsvEntrySelection;
CleanupStack::PushL(serviceId);
serviceId->AppendL(pop3Service);
TBuf8<1> parameters;
activeObjectTester->StartL();
User::LeaveIfError(testUtils->iServerEntry->SetEntry(pop3Service));
pop3ServerMtm->StartCommandL(*serviceId, KPOP3MTMConnect, parameters, activeObjectTester->iStatus);
CActiveScheduler::Start();
// Get the progress
TPop3Progress prog;
TPckgC<TPop3Progress> paramPack(prog);
paramPack.Set(pop3ServerMtm->Progress());
TPop3Progress progress=paramPack();
// Check that the reported progress is EPopConnecting
test(progress.iPop3Progress == TPop3Progress::EPopConnecting);
CleanupStack::PopAndDestroy(); // serviceId
// Cleanup
CleanupStack::PopAndDestroy(); // activeObjectTester
Closedown();
}