本文整理汇总了C++中CMsvEntry::OwningService方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvEntry::OwningService方法的具体用法?C++ CMsvEntry::OwningService怎么用?C++ CMsvEntry::OwningService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvEntry
的用法示例。
在下文中一共展示了CMsvEntry::OwningService方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExecuteActionL
void CMtfTestActionDeleteEntry::ExecuteActionL()
{
TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDeleteEntry);
CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
TMsvId paramEntryId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
CMsvEntry* entry = CMsvEntry::NewL(*paramSession,paramEntryId,TMsvSelectionOrdering());
CleanupStack::PushL(entry);
entry->SetEntryL(paramEntryId);
entry->SetEntryL(entry->Entry().Parent());
if (entry->OwningService() == KMsvLocalServiceIndexEntryId)
{
entry->DeleteL(paramEntryId);
DeleteParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(1));
TestCase().ActionCompletedL(*this);
}
else
{
iOperation = entry->DeleteL(paramEntryId,iStatus);
SetActive();
}
CleanupStack::PopAndDestroy(entry);
TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDeleteEntry);
}
示例2: ExecuteActionL
void CMtfTestActionCreateEntry::ExecuteActionL()
{
TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionCreateEntry);
CActiveScheduler::Add(this);
iBlank = KNullDesC().AllocL();
CMsvSession* paramSession = ObtainParameterReferenceL<CMsvSession>(TestCase(),ActionParameters().Parameter(0));
TUid paramEntryTypeUid = ObtainValueParameterL<TUid>(TestCase(),ActionParameters().Parameter(1));
TMsvId paramParentId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(2));
TUid paramMtmUid = ObtainValueParameterL<TUid>(TestCase(),ActionParameters().Parameter(3), KUidMsvLocalServiceMtm);
TMsvId paramServiceId = ObtainValueParameterL<TMsvId>(TestCase(),ActionParameters().Parameter(4), KMsvLocalServiceIndexEntryId);
TMsvPriority paramPriority = ObtainValueParameterL<TMsvPriority>(TestCase(),ActionParameters().Parameter(5),EMsvMediumPriority);
TInt paramReadOnlyFlag = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(6),EFalse);
TInt paramVisibleFlag = ObtainValueParameterL<TInt>(TestCase(),ActionParameters().Parameter(7),ETrue);
HBufC* paramDescription = ObtainParameterReferenceL<HBufC>(TestCase(),ActionParameters().Parameter(8),iBlank);
HBufC* paramDetails = ObtainParameterReferenceL<HBufC>(TestCase(),ActionParameters().Parameter(9),iBlank);
iIndexEntry.iType = paramEntryTypeUid;
iIndexEntry.iMtm = paramMtmUid;
iIndexEntry.iServiceId = paramServiceId;
iIndexEntry.SetPriority(paramPriority);
iIndexEntry.SetReadOnly(paramReadOnlyFlag);
iIndexEntry.SetVisible(paramVisibleFlag);
iIndexEntry.iDescription.Set(paramDescription->Des());
iIndexEntry.iDetails.Set(paramDetails->Des());
iIndexEntry.iDate.HomeTime();
CMsvEntry* entry = CMsvEntry::NewL(*paramSession,paramParentId,TMsvSelectionOrdering());
CleanupStack::PushL(entry);
entry->SetEntryL(paramParentId);
if (entry->OwningService() == KMsvLocalServiceIndexEntryId)
{
entry->CreateL(iIndexEntry);
CleanupStack::PopAndDestroy(entry);
TMsvId paramEntryId;
paramEntryId = iIndexEntry.Id();
StoreParameterL<TMsvId>(TestCase(),paramEntryId,ActionParameters().Parameter(10));
TestCase().ActionCompletedL(*this);
}
else
{
iOperation = entry->CreateL(iIndexEntry,iStatus);
SetActive();
}
TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionCreateEntry);
}