本文整理汇总了C++中TMsvEntry类的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry类的具体用法?C++ TMsvEntry怎么用?C++ TMsvEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TMsvEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: BaseConstructL
// ----------------------------------------------------------------------------
// CIpsPlgPop3ConnectOp::ConstructL()
// ----------------------------------------------------------------------------
//
void CIpsPlgPop3ConnectOp::ConstructL()
{
FUNC_LOG;
BaseConstructL( KUidMsgTypePOP3 );
// <qmail> iSelection construction has been removed
CMsvEntry* cEntry = iMsvSession.GetEntryL( iService );
User::LeaveIfNull( cEntry );
// NOTE: Not using cleanupStack as it is not needed in this situation:
const TMsvEntry tentry = cEntry->Entry();
delete cEntry;
cEntry = NULL;
if ( tentry.iType.iUid != KUidMsvServiceEntryValue )
{
// should we panic with own codes?
User::Leave( KErrNotSupported );
}
// <qmail> no need to have population limit as member variable
// <qmail> it is read from settings when needed
if ( tentry.Connected() )
{
iState = EConnected;
// <qmail> iAlreadyConnected removed
}
else
{
iState = EStartConnect;
}
// <qmail> SetActive(); moved inside CompleteThis();
CompleteThis();
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:39,代码来源:ipsplgpop3connectop.cpp
示例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
}
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:33,代码来源:mail_Container.cpp
示例3: CompleteMessage
TInt CIacSettingsParser::CompleteMessage()
{
TMsvEntry entry = iEntry.Entry();
entry.SetMtmData3(KBIO_MSG_ENTRY_PROCESSED);
TRAPD(error, iEntry.ChangeL(entry));
return error;
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:7,代码来源:IACP.CPP
示例4: new
// methods from CSendAsEditUtils
void CSendAsTestEditUtils::LaunchEditorL(TMsvId /*aId*/, TRequestStatus& aStatus)
{
CDummyObserver* ob1 = new(ELeave) CDummyObserver;
CleanupStack::PushL(ob1);
CMsvSession* session = CMsvSession::OpenSyncL(*ob1);
CleanupStack::PushL(session);
CMsvEntry* cEntry = CMsvEntry::NewL(*session, KMsvDraftEntryId,
TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue));
CleanupStack::PushL(cEntry);
CMsvEntrySelection* selection = cEntry->ChildrenL();
CleanupStack::PushL(selection);
CMsvEntry* cEntry2 = session->GetEntryL(selection->At(0));
CleanupStack::PushL(cEntry2);
TMsvEntry entry = cEntry2->Entry();
entry.SetMtmData3(234567890); // Show we've been called by touching the TMsvEntry.
cEntry2->ChangeL(entry);
CleanupStack::PopAndDestroy(5, ob1); // cEntry2, selection, cEntry, session, ob1
iUserStatus = &aStatus;
aStatus = KRequestPending;
// wait a few seconds before completing
iEditTimer->After(KSendAsTestEditWaitTime);
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:31,代码来源:csendastesteditutils.cpp
示例5: InitL
LOCAL_C void InitL()
{
// Connect to the file system...
gFs.Connect();
// Connect to the Message Server...
pObserver = new (ELeave) CObserver();
CleanupStack::PushL(pObserver);
pSession = CMsvSession::OpenSyncL(*pObserver);
CleanupStack::PushL(pSession);
// Create a test entry with some dummy values so the Message Server
// will not panic when the entry is created in the message store...
pContext = CMsvEntry::NewL(*pSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(pContext);
TMsvEntry testEntry;
TUid entryMtm;
entryMtm.iUid = 11;
testEntry.iMtm = entryMtm;
testEntry.iServiceId = pContext->OwningService();
testEntry.iType = KUidMsvMessageEntry;
// Create the entry in the message store and set the current context to it...
pContext->CreateL(testEntry);
gTestEntryId = testEntry.Id();
pContext->SetEntryL(gTestEntryId);
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:27,代码来源:T_CMsvBodyText.cpp
示例6: CreateEntry
/**
Creates a new entry as a child of the current context.
Ownership of the created entry is given to the process with the specified SID.
The parent ID and entry ID are set by the Message Server.
@param aEntry
Index entry value for the new entry
@param aOwnerId
The SID of the process that will own the create entry.
@param aBulk
A boolean value to indicate whether this is part of a bulk operation. (ETrue = bulk)
@return
KErrNone - success; KErrNoMemory - a memory allocation failed;
KErrNotSupported - aEntry is invalid
*/
EXPORT_C TInt CMsvServerEntry::CreateEntry(TMsvEntry& aEntry, TSecureId aOwnerId, TBool aBulk)
{
__ASSERT_DEBUG(iEntry.Id()!=KMsvNullIndexEntryId, PanicServer(EMsvEntryWithNoContext2));
aEntry.SetParent(iEntry.Id());
__ASSERT_DEBUG(MsvUtils::ValidEntry(aEntry, ETrue), PanicServer(EMsvBadEntryContents));
// if valid - try to create the new child
TInt error;
if (iEntry.Id()==KMsvNullIndexEntryId || !MsvUtils::ValidEntry(aEntry, ETrue))
error = KErrNotSupported;
else
{
error = iServer.AddEntry(aEntry, aOwnerId, ETrue, aBulk);
// if the child was created,then notify everyone, otherwise reset the parent
if (error)
aEntry.SetParent(KMsvNullIndexEntryId);
else
{
if (!aBulk)
{
iServer.NotifyChanged(EMsvEntriesCreated, aEntry.Id(), aEntry.Parent());
}
iEntry.SetOwner(ETrue);
}
}
return error;
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:49,代码来源:MSVENTRY.CPP
示例7: INFO_PRINTF1
void CT_CMsvSession::TestIncPcSyncCountL()
{
TInt error = KErrGeneral;
INFO_PRINTF1(_L("Testing: Increment PC Sync Count -- started"));
TRAP(error, iSession = CMsvSession::OpenSyncL(*this));
TEST(error == KErrNone);
CMsvOperationWait* active = CMsvOperationWait::NewLC();
CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(cEntry);
CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
CleanupStack::PushL(selection);
TInt ret = iSession->InstallMtmGroup(KDataComponentFilename);
TEST(ret==KErrNone|| ret==KErrAlreadyExists);
cEntry->SetEntryL(KMsvRootIndexEntryId);
TMsvEntry service;
service.iType=KUidMsvServiceEntry;
service.iMtm = KUidTestServerMtmType;
cEntry->CreateL(service);
selection->AppendL(service.Id());
TBuf8<256> progress;
TBuf8<32> param;
TRAP(error, iSession->IncPcSyncCountL(*selection);)
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:29,代码来源:t_cmsvsession.cpp
示例8: found
// -----------------------------------------------------------------------------
// CMmsAdapterMsvApi::FindUserFolderL
// -----------------------------------------------------------------------------
//
TBool CMmsAdapterMsvApi::FindUserFolderL( const TDesC& aName, TMsvId& aFolder )
{
CMsvEntry* entry = iSession.GetEntryL( KMsvMyFoldersEntryIdValue );
CleanupStack::PushL( entry );
CMsvEntrySelection* selection = entry->ChildrenL();
CleanupStack::PushL( selection );
TBool found( EFalse );
TMsvId serviceId;
TMsvEntry entryT;
for ( TInt i = 0; i < selection->Count(); i++ )
{
User::LeaveIfError( iSession.GetEntry( selection->At( i ), serviceId, entryT ) );
if ( !entryT.Deleted() && entryT.iType == KUidMsvFolderEntry &&
aName.Compare(entryT.iDescription) == 0 )
{
found = ETrue;
aFolder = entryT.Id();
break;
}
}
CleanupStack::PopAndDestroy( selection );
CleanupStack::PopAndDestroy( entry );
return found;
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:34,代码来源:mmsadaptermsvapi.cpp
示例9: TRAPD
/**
Creates a New Service
If a Service Exists it doesnot create a new one
@param aSession Current Session reference
@param aDescription Entry Description Descriptor
@param aDetail Entry Details Descriptor
@internalTechnology
*/
void CentralRepoUtils::CreateServiceL(CMsvSession* aSession, const TDesC& aDescription, const TDesC& aDetail)
{
TMsvId serviceId=0;
TRAPD(err,TSmsUtilities::ServiceIdL(*aSession,serviceId));
if(err == KErrNotFound) // If Service Already Exists Do not create new One
{
TInt priority = EMsvMediumPriority;
TInt readOnlyFlag = EFalse;
TInt visibleFlag = ETrue;
TMsvEntry indexEntry;
indexEntry.iType = KUidMsvServiceEntry;
indexEntry.iMtm = KUidMsgTypeSMS;
indexEntry.SetReadOnly(readOnlyFlag);
indexEntry.SetVisible(visibleFlag);
indexEntry.SetPriority(TMsvPriority(priority));
indexEntry.iDescription.Set(aDescription);
indexEntry.iDetails.Set(aDetail);
indexEntry.iDate.HomeTime();
CMsvEntry* entry = CMsvEntry::NewL(*aSession,KMsvRootIndexEntryId,TMsvSelectionOrdering());
CleanupStack::PushL(entry);
entry->CreateL(indexEntry);
CleanupStack::PopAndDestroy(entry);
}
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:36,代码来源:CentralRepoUtils.cpp
示例10: new
void CPigeonServerMtm::ConstructL()
{
iScheduleSend = CPigeonScheduledSend::NewL(*iServerEntry);
// Get the entry id for the pigeon service entry.
User::LeaveIfError(iServerEntry->SetEntry(KMsvRootIndexEntryId));
CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection();
CleanupStack::PushL(sel);
User::LeaveIfError(iServerEntry->GetChildrenWithMtm(KUidMsgTypePigeon, *sel));
TInt count = sel->Count();
if( count > 1 ) // should only be one service entry
User::Leave(KErrCorrupt);
if( count == 0 )
{
// Create the settings
TMsvEntry serviceEntry;
serviceEntry.iType= KUidMsvServiceEntry;
serviceEntry.iMtm = KUidMsgTypePigeon;
User::LeaveIfError(iServerEntry->CreateEntry(serviceEntry));
iServiceId = serviceEntry.Id();
}
else
{
iServiceId = sel->At(0);
}
CleanupStack::PopAndDestroy(sel);
User::LeaveIfError(iServerEntry->SetEntry(KMsvNullIndexEntryId));
iHeapFailure = EFalse;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:30,代码来源:pigeonservermtm.cpp
示例11: new
void CBulkCommitServerMtm::ConstructL()
{
// Get the entry id for the bulkcommit service entry.
User::LeaveIfError(iServerEntry->SetEntry(KMsvRootIndexEntryId));
CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection();
CleanupStack::PushL(sel);
User::LeaveIfError(iServerEntry->GetChildrenWithMtm(KUidBulkCommitTestMtm, *sel));
TInt count = sel->Count();
if( count > 1 ) // should only be one service entry
{
User::Leave(KErrCorrupt);
}
if( count == 0 )
{
// Create the settings
TMsvEntry serviceEntry;
serviceEntry.iType= KUidMsvServiceEntry;
serviceEntry.iMtm = KUidBulkCommitTestMtm;
User::LeaveIfError(iServerEntry->CreateEntry(serviceEntry));
iServiceId = serviceEntry.Id();
}
else
{
iServiceId = sel->At(0);
}
CleanupStack::PopAndDestroy(sel);
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:28,代码来源:cbulkcommitservermtm.cpp
示例12: new
void CPopsTestHarness::DoLocalCopyTestL()
// Test copying a message locally. ie create a message in the Drafts folder
// and copy it to a local sub folder
{
// Create the Message in the Drafts Folder
iTestUtils->CreateMessageL(KTestMsgPath, KMsvDraftEntryId, KMsvDraftEntryId);
CMsvServerEntry* serverEntry = iTestUtils->iServerEntry;
serverEntry->SetEntry(KMsvDraftEntryId);
CMsvEntrySelection* newMessageList = new (ELeave)CMsvEntrySelection();
CleanupStack::PushL(newMessageList);
serverEntry->GetChildren(*newMessageList);
TMsvId newMessageId = (*newMessageList)[0];
// Create a local folder under the Drafts folder
TMsvEntry parentEntry = serverEntry->Entry();
TMsvEntry newFolder;
newFolder.SetStandardFolder(ETrue);
newFolder.iDetails.Set(KSubFolder);
newFolder.iType.iUid=KUidMsvFolderEntryValue;
newFolder.iMtm=parentEntry.iMtm;
newFolder.iServiceId = parentEntry.iServiceId;
serverEntry->CreateEntry(newFolder);
// Fill the Disk Space and attempt to do the Copy
FillDiskL();
// Copy the message into the new LOCAL Sub-Folder
CTestActive* active = new(ELeave) CTestActive;
CleanupStack::PushL(active);
serverEntry->CopyEntryL(newMessageId, newFolder.Id(), active->iStatus);
active->StartL();
CActiveScheduler::Start();
CleanupStack::PopAndDestroy(2); // newMessageList, active
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:T_PopFullDsk.cpp
示例13: 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);
}
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:36,代码来源:mail_Container.cpp
示例14: Cancel
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CSMSSender::CreateNewMessageL()
{
Cancel();
iMessageMade = iMessageSent = iMessageReceived = EFalse;
delete iMtm;
iMtm = NULL;
TMsvEntry newEntry; // This represents an entry in the Message Server index
newEntry.iMtm = KUidMsgTypeSMS; // message type is SMS
newEntry.iType = KUidMsvMessageEntry; // this defines the type of the entry: message
newEntry.iServiceId = KMsvLocalServiceIndexEntryId; // ID of local service (containing the standard folders)
newEntry.iDate.UniversalTime(); // set the date of the entry to home time
newEntry.SetInPreparation(ETrue); // a flag that this message is in preparation
newEntry.SetReadOnly(EFalse);
// - CMsvEntry accesses and acts upon a particular Message Server entry.
// - NewL() does not create a new entry, but simply a new object to access an existing entry.
// - It takes in as parameters the client's message server session,
// ID of the entry to access and initial sorting order of the children of the entry.
CMsvEntry* entry = CMsvEntry::NewL(*iSession, KMsvDraftEntryIdValue, TMsvSelectionOrdering());
CleanupStack::PushL(entry);
delete iOperation;
iOperation = NULL;
iOperation = entry->CreateL(newEntry, iStatus);
CleanupStack::PopAndDestroy(entry);
iPhase = EWaitingForCreate;
SetActive();
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:35,代码来源:SMS_Sender.cpp
示例15: CreateNewMessageL
TMsvId CFakeSMSSender::CreateNewMessageL(TTime aMsgTime)
{
CMsvEntry* Draftentry = CMsvEntry::NewL(*iMsvSession, KMsvDraftEntryIdValue ,TMsvSelectionOrdering());
CleanupStack::PushL(Draftentry);
CMsvOperationWait* wait = CMsvOperationWait::NewLC();
wait->Start();
TMsvEntry newEntry; // This represents an entry in the Message Server index
newEntry.iMtm = KUidMsgTypeSMS; // message type is SMS
newEntry.iType = KUidMsvMessageEntry; //KUidMsvServiceEntry // this defines the type of the entry: message
newEntry.iServiceId = KMsvLocalServiceIndexEntryId; // // ID of local service (containing the standard folders)
newEntry.iDate = aMsgTime; // set the date of the entry to home time
newEntry.SetInPreparation(ETrue); // a flag that this message is in preparation
newEntry.SetReadOnly(EFalse);
CMsvOperation* oper = Draftentry->CreateL(newEntry,wait->iStatus);
CleanupStack::PushL(oper);
CActiveScheduler::Start();
while( wait->iStatus.Int() == KRequestPending )
{
CActiveScheduler::Start();
}
// ...and keep track of the progress of the create operation.
TMsvLocalOperationProgress progress = McliUtils::GetLocalProgressL(*oper);
User::LeaveIfError(progress.iError);
// Draftentry->MoveL(progress.iId,KMsvGlobalInBoxIndexEntryId);
CleanupStack::PopAndDestroy(3);//Draftentry,wait,oper
return progress.iId;
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:35,代码来源:Fake_SMS.cpp
示例16: FLOG
// -----------------------------------------------------------------------------
// CWPMessage::StoreMsgL
// -----------------------------------------------------------------------------
//
void CWPMessage::StoreMsgL()
{
FLOG( _L( "CWPMessage::StoreMsgL" ) );
// create an invisible blank entry
TMsvEntry entry;
PrepareEntryLC( entry ); // details on cleanup stack
entry.iBioType = iBioUID.iUid;
entry.iMtm = KUidBIOMessageTypeMtm;
// Look up and set the description
FLOG( _L( "CWPMessage::StoreMsgL 1" ) );
TInt index;
CBIODatabase* bioDB = CBIODatabase::NewLC( iSession->FileSession() );
FLOG( _L( "CWPMessage::StoreMsgL 2" ) );
TRAPD( err, bioDB->GetBioIndexWithMsgIDL( iBioUID, index ) );
if (err ==KErrNone)
{
FLOG( _L( "CWPMessage::StoreMsgL 3" ) );
HBufC* description = bioDB->BifReader(index).Description().AllocL();
FLOG( _L( "CWPMessage::StoreMsgL 4" ) );
entry.iDescription.Set(*description);
FLOG( _L( "CWPMessage::StoreMsgL 5" ) );
CleanupStack::PopAndDestroy(); // bioDB
CleanupStack::PushL( description );
}
else
{
FTRACE(RDebug::Print(_L(" CWPMessage::StoreMsgL err (%d)"), err));
CleanupStack::PopAndDestroy(); // bioDB
}
FLOG( _L( "CWPMessage::StoreMsgL 6" ) );
// Store entry in inbox
CMsvEntry* msvEntry = iSession->GetEntryL( KMsvGlobalInBoxIndexEntryId );
FLOG( _L( "CWPMessage::StoreMsgL 7" ) );
CleanupStack::PushL(msvEntry);
msvEntry->CreateL(entry);
msvEntry->Session().CleanupEntryPushL(entry.Id());
msvEntry->SetEntryL(entry.Id());
FLOG( _L( "CWPMessage::StoreMsgL 8" ) );
// Save the message
CMsvStore* store = msvEntry->EditStoreL();
CleanupStack::PushL(store);
FLOG( _L( "CWPMessage::StoreMsgL 9" ) );
iMessage->StoreL( *store );
store->CommitL();
// Complete processing the message
PostprocessEntryL( *msvEntry, entry );
CleanupStack::PopAndDestroy(); //store
msvEntry->Session().CleanupEntryPop(); //entry
CleanupStack::PopAndDestroy(3); //description, details, msvEntry
FLOG( _L( "CWPMessage::StoreMsgL Done" ) );
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:61,代码来源:CWPMessage.cpp
示例17: PostprocessEntryL
// -----------------------------------------------------------------------------
// CWPMessage::PostprocessEntryL
// -----------------------------------------------------------------------------
//
void CWPMessage::PostprocessEntryL( CMsvEntry& aCEntry, TMsvEntry& aTEntry )
{
FLOG( _L( "CWPMessage::PostprocessEntryL" ) );
aTEntry.SetReadOnly(EFalse);
aTEntry.SetVisible(ETrue);
aTEntry.SetInPreparation(EFalse);
aCEntry.ChangeL(aTEntry);
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:13,代码来源:CWPMessage.cpp
示例18: TestNotifyBug2L
LOCAL_C void TestNotifyBug2L()
{
CDummyObserver* ob = new(ELeave)CDummyObserver;
CleanupStack::PushL(ob);
CMsvSession* session = CMsvSession::OpenSyncL(*ob);
CleanupStack::PushL(session);
// Create the first CMsvEntry sitting on drafts
CMsvEntry* cEntry1 = CMsvEntry::NewL(*session, KMsvDraftEntryId, TMsvSelectionOrdering(0, EMsvSortByNone, ETrue));
CleanupStack::PushL(cEntry1);
// Add an observer to the first CMsvEntry
CEntryObserver* eOb1 = new(ELeave)CEntryObserver;
CleanupStack::PushL(eOb1);
cEntry1->AddObserverL(*eOb1);
// Create another CMsvEntry sitting on drafts
CMsvEntry* cEntry2 = CMsvEntry::NewL(*session, KMsvDraftEntryId, TMsvSelectionOrdering());
CleanupStack::PushL(cEntry2);
// Create an entry in drafts
TMsvEntry entry;
entry.iType = KUidMsvMessageEntry;
entry.iMtm = KUidMsvLocalServiceMtm;
entry.iServiceId = KMsvLocalServiceIndexEntryId;
cEntry2->CreateL(entry);
// Wait for create notification to be received by the first CMsvEntry
eOb1->Start();
CActiveScheduler::Start();
// Change the entry in drafts
// This queues a change notification in the server
// It is waiting to be handled by all the observers
cEntry2->SetEntryL(entry.Id());
cEntry2->ChangeL(entry);
cEntry2->SetEntryL(KMsvDraftEntryId);
// Start an asynchronous delete using the second CMsvEntry
CMsvOperationWait* wait = CMsvOperationWait::NewLC();
wait->Start();
CMsvOperation* op = cEntry2->DeleteL(entry.Id(), wait->iStatus);
CleanupStack::PushL(op);
// The first CMsvEntry is out of date because it hasn't been told that the entry has been deleted from drafts yet
// Switching the CMsvEntry in and out of drafts forces it to be up to date
// But there is still a change notification waiting to be handled
cEntry1->SetEntryL(KMsvRootIndexEntryId);
cEntry1->SetEntryL(KMsvDraftEntryId);
// The first CMsvEntry is now up to date, but in the next CActiveScheduler::Start() it receives a change notification
// for a child that doesn't exist
CActiveScheduler::Start();
CleanupStack::PopAndDestroy(7); // op, wait, cEntry2, eOb1, cEntry1, session, ob
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:57,代码来源:t_defect.cpp
示例19: UpdateEntryAfterSchedule
/**
Utility function that updates message index entry fields to reflect
the message's scheduling.
@param aRef
Scheduler item.
@param aInfo
Scheduler task information.
@param aTime
Schedule start time.
@param aFinalState
Sending state flag.
@param aEntry
On return, updated index entry.
@param aData
On return, populated messaging scheduling data.
*/
EXPORT_C void CMsvScheduleSend::UpdateEntryAfterSchedule(const TSchedulerItemRef& aRef, const TTaskInfo& aInfo, const TTime& aTime, TInt aFinalState, TMsvEntry& aEntry, TMsvEntryScheduleData& aData)
{
aEntry.SetScheduled(ETrue);
aEntry.SetFailed(EFalse);
aEntry.SetSendingState(aFinalState);
aEntry.SetConnected(EFalse);
aEntry.iDate = aTime;
aData.iRef = aRef;
aData.iTaskId = aInfo.iTaskId;
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:32,代码来源:MsvScheduleSend.cpp
示例20: __ASSERT_DEBUG
void CMsvServerEntry::RunL()
//
//
//
{
__ASSERT_DEBUG(iEntryState != EMsvIdle, PanicServer(EMsvServerEntryIdle));
__ASSERT_DEBUG(iCopyMove, PanicServer(EMsvCopyMoveCompletionMissing));
if (iCopyMove->CompletedIds().Count() > 0)
{
switch (iEntryState)
{
case EMsvMoving:
{
iServer.NotifyChanged(EMsvEntriesMoved, iCopyMove->CompletedIds(), iCopyMove->TargetId(), iEntry.Id());
TMsvEntry* pEntry;
TInt err = KErrNone;
err = iServer.IndexAdapter().GetEntry(iEntry.Id(), pEntry);
if (err ==KErrNone)
iEntry.SetOwner(pEntry->Owner());
break;
}
case EMsvCopying:
{
const CMsvEntrySelection& newEntries = static_cast<CMsvCopyEntries*>(iCopyMove)->NewEntryIds();
iServer.NotifyChanged(EMsvEntriesCreated, newEntries, iCopyMove->TargetId());
if (iCompletedSelection)
{
iCompletedSelection->Reset();
TInt count = newEntries.Count();
while (count--)
iCompletedSelection->AppendL(newEntries[count]);
}
else if (iCompletedEntryId)
*iCompletedEntryId = newEntries[0];
break;
}
default:
break;
}
}
delete iCopyMove;
iCopyMove = NULL;
iEntryState = EMsvIdle;
User::RequestComplete(iObserverStatus, iStatus.Int());
}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:54,代码来源:MSVENTRY.CPP
注:本文中的TMsvEntry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论