本文整理汇总了C++中CContactItemField::StoreStorage方法的典型用法代码示例。如果您正苦于以下问题:C++ CContactItemField::StoreStorage方法的具体用法?C++ CContactItemField::StoreStorage怎么用?C++ CContactItemField::StoreStorage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CContactItemField
的用法示例。
在下文中一共展示了CContactItemField::StoreStorage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoCompareCContactItemFieldStorageTypeL
TBool CPackagerCntComparator::DoCompareCContactItemFieldStorageTypeL(const CContactItemField& anItemField1, const CContactItemField& anItemField2) const
/** Compares two storage type items contained within their respective CContactItemField parent.
@param anItemField1 The first CContactItemField containing the storage type to be compared.
@param anItemField2 The second CContactItemField containing the storage type to be compared.
@return ETrue if the two items are equal, EFalse otherwise. */
{
// Check if storage type is same first, otherwise don't need to
// compare storage content.
if(!DoCompareTUint(anItemField1.StorageType(), anItemField2.StorageType()))
{
return EFalse;
}
TBool result = ETrue;
switch (anItemField1.StorageType())
{
case KStorageTypeText:
result = DoCompareTPtrC(anItemField1.TextStorage()->Text(), anItemField2.TextStorage()->Text());
break;
case KStorageTypeStore:
result = (anItemField1.StoreStorage()->Thing()==anItemField2.StoreStorage()->Thing());
break;
case KStorageTypeDateTime:
result = DoCompareTTime(anItemField1.DateTimeStorage()->Time(), anItemField2.DateTimeStorage()->Time());
break;
case KStorageTypeContactItemId:
result = DoCompareTContactItemId(anItemField1.AgentStorage()->Value(), anItemField2.AgentStorage()->Value());
break;
default:
User::Leave(KErrNotSupported);
break;
}
return result;
}
示例2: InsertBinaryFieldL
//------------------------------------------------------------------------------------------------------------
void CPerfTestContact::InsertBinaryFieldL(TUid aID, const TDesC8& aBufOfStuff )
{
CContactItemField* itemFieldPtr = NULL;
CContactStoreField* binStoragePtr = NULL;
itemFieldPtr = CContactItemField::NewLC( KStorageTypeStore, aID );
binStoragePtr = itemFieldPtr->StoreStorage(); // we don't have ownership here, hence no stack.
binStoragePtr->SetThingL(aBufOfStuff);
binStoragePtr = NULL; // we've finished with this ptr now.
iContactItem->AddFieldL( *itemFieldPtr ); // hand ownership over here
CleanupStack::Pop( itemFieldPtr ); // and pop,
}
示例3: SetFieldL
/*sets a specific contact field to a value as determined by its type.
field at aPos in aFields is set to aText*/
void CContactsRamTest::SetFieldL(const CContactItemField &aField, const TDesC& aText)
{
if( aField.IsTemplateLabelField() )
{
return;
}
if( 0 == aText.Size() )
{
return;
}
switch(aField.StorageType())
{
case KStorageTypeText:
aField.TextStorage()->SetTextL(aText);
break;
case KStorageTypeStore:
{
HBufC8 *buf = HBufC8::NewLC(aText.Size());
TPtr8 tptr8 = buf->Des();
tptr8.Copy(aText);
aField.StoreStorage()->SetThingL(*buf);
CleanupStack::PopAndDestroy(buf);
}
break;
case KStorageTypeContactItemId:
{
aField.AgentStorage()->SetAgentId( KAgentId );
}
break;
case KStorageTypeDateTime:
{
if( aText.Size() > 0 )
{
aField.DateTimeStorage()->SetTime( TTime(KTime) );
}
else
{
aField.DateTimeStorage()->SetTime( TTime(0) );
}
}
break;
default:
User::Panic(aText,EInvariantFalse);
break;
}
}
示例4: CreateContactFieldL
void CntThumbnailCreator::CreateContactFieldL()
{
__ASSERT_DEBUG(m_imageData, User::Panic(KPanicCategory, KPanicUnitialized));
initializeThumbnailFieldL();
CContactItemField *thumbnailField = CContactItemField::NewLC(*m_thumbnailFieldFromTemplate);
thumbnailField->StoreStorage()->SetThingL(*m_imageData);
QT_TRYCATCH_LEAVING(m_fieldList->append(thumbnailField));
CleanupStack::Pop(thumbnailField);
// Complete request to proceed to the final state
TRequestStatus *status = &iStatus;
User::RequestComplete(status, KErrNone);
SetActive();
}