Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Persistence layer exports
20 #if !defined(__CNTFIELD_H__)
21 #define __CNTFIELD_H__
27 const TInt KNullFieldId=-1;
29 //const TInt KIntContactFieldHint???=0x01;
30 const TInt KIntContactHintIsPhone=0x02;
31 const TInt KIntContactHintIsMsg=0x04;
32 const TInt KIntContactHintIsCompanyName=0x08;
33 const TInt KIntContactHintIsFamilyName=0x10;
34 const TInt KIntContactHintIsGivenName=0x20;
35 const TInt KIntContactHintIsAddress=0x40;
36 const TInt KIntContactHintIsAdditionalName=0x80;
37 const TInt KIntContactHintIsSuffixName=0x100;
38 const TInt KIntContactHintIsPrefixName=0x200;
39 const TInt KIntContactHintStorageInline=0x400;
40 const TInt KIntContactHintIsEmail=0x4000;
41 const TInt KIntContactHintIsPronunciation=0x800;
42 const TInt KIntContactHintIsCompanyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsCompanyName;
43 const TInt KIntContactHintIsGivenNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsGivenName;
44 const TInt KIntContactHintIsFamilyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsFamilyName;
46 const TInt KHintTypeMask = 0x1FFFFF;
48 #ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__
49 const TInt KHintAdditionalMask = 0x7F000000; //Number of additional type ids.
50 const TInt KHintVCardMappingMask = 0x80000000; //bit flag to show if there is a vCard mapping uid.
51 const TInt KHintTemplateFieldMask = 0x7FFFFFFF; //Template field mask in low hint value.
53 const TInt KHintAdditionalMaskShift = 24;
55 #else //_SYMBIAN_USE_SQLITE__
57 const TInt KHintAdditionalMask = 0x200000;
58 const TInt KHintIdMask = 0xFFC00000;
60 #endif //_SYMBIAN_USE_SQLITE__
65 class CContactFieldStorage;
66 class CContactTextField;
67 class CContactStoreField;
68 class CContactAgentField;
69 class CContactDateField;
71 class CContactItemField;
72 class CContactItemFieldDef;
73 class CContactItemFieldSet;
76 class CContentType : public CBase
77 /** The content type for a contact item field.
79 The content type identifies the field's type and the vCard property which
80 the field maps to. It is owned by the field. Field types are defined as UIDs
83 The vCard mapping is optional. It should be specified if the field type alone
84 is not enough to identify the mapping. The possible values for the vCard
85 mapping are defined as UIDs in cntdef.h.
87 Each field is uniquely identified by the combination of UIDs contained in
94 IMPORT_C ~CContentType();
95 IMPORT_C static CContentType* NewL();
96 IMPORT_C static CContentType* NewL(TFieldType aFieldType,TUid aMapping=KNullUid);
97 IMPORT_C static CContentType* NewL(const CContentType &aContentType);
98 static CContentType* NewLC(RReadStream& aStream);
99 IMPORT_C void SetMapping(TUid aMapping);
100 IMPORT_C void AddFieldTypeL(TFieldType aFieldType);
101 IMPORT_C void RemoveFieldType(TFieldType aFieldType);
102 IMPORT_C TFieldType FieldType(TInt aIndex) const;
103 IMPORT_C TInt FieldTypeCount() const;
104 IMPORT_C TUid Mapping() const;
105 IMPORT_C TBool ContainsFieldType(TFieldType aFieldType) const;
106 IMPORT_C TBool SupportsMultipleLines() const;
107 IMPORT_C TBool operator==(const CContentType &aType) const;
108 IMPORT_C TBool IsEqualForSyncUpdate(const CContentType& aType) const;
109 IMPORT_C TBool IsEqual(const CContentType& aType) const;
111 void InternalizeAdditionalUidsL(TInt aCount,RReadStream& aStream);
112 void ExternalizeL(RWriteStream& aStream) const;
113 void InternalizeL(RReadStream& aStream);
116 CContentType(TUid aMapping);
118 void CloneL(const CContentType &aContentType);
121 CArrayFix<TUid>* iFieldTypes;
124 class CContactItemField : public CBase
125 /** A field in a contact item.
127 Fields are grouped into a field set (CContactItemFieldSet), which is owned by
130 The contact item field stores the field data. The data may be text, a date/time
131 value, or an agent, as indicated by the storage type (TStorageType). The storage
132 type is also owned by the field. Note that numeric field data is not supported.
133 All numbers, for instance telephone or fax numbers are stored as text.
135 Fields also have a content type, attributes and a label. The label is a string
136 which identifies the field to a user e.g. First name, Last name.
138 The following attributes are supported:
140 - hidden: the field is not displayed if the view definition masks hidden
143 - disabled: the field cannot be deleted from the original template and thus
144 is marked as disabled
146 - read only: the field cannot be written to
148 - synchronise: used by Connectivity applications; set by default for all
151 - user added: the field was added by the user and was not taken from the
154 - template: indicates that the field is part of a template. Template fields
155 differ from other fields in that they are persisted when they do not contain
158 - speed dial: the field contains a telephone number which maps to one of
159 the nine possible speed dial positions.
161 These attributes can be set using member functions of this class, but they
162 are normally set automatically by other functions, for instance when
163 setting a speed dial field, CContactDatabase automatically sets the field's
164 speed dial attribute.
170 friend class TFieldHeader;
171 friend class CContactItemFieldSet;
172 friend class CContactDatabase;
173 friend class CContactTables;
174 friend class RPplContactTable;
175 friend class CPackagerTests;
185 TBool operator==(const THint& aHint) const;
186 TBool operator!=(const THint& aHint) const;
187 TInt HintType() const;
188 inline void SetIsMatchAll();
189 inline void SetIsPhone();
190 inline void SetIsMsg();
191 inline void SetIsCompanyName();
192 inline void SetIsFamilyName();
193 inline void SetIsGivenName();
194 inline void SetIsCompanyNamePronunciation();
195 inline void SetIsFamilyNamePronunciation();
196 inline void SetIsGivenNamePronunciation();
197 inline void SetIsAddress();
198 inline void SetIsAdditionalName();
199 inline void SetIsSuffixName();
200 inline void SetIsPrefixName();
201 inline void SetStorageIsInline();
202 inline void SetIsEmail();
203 inline TBool IsMatchAll() const;
204 inline TBool IsDefault() const;
205 inline TBool IsPhone() const;
206 inline TBool IsMsg() const;
207 inline TBool IsCompanyName() const;
208 inline TBool IsFamilyName() const;
209 inline TBool IsGivenName() const;
210 inline TBool IsCompanyNamePronunciation() const;
211 inline TBool IsFamilyNamePronunciation() const;
212 inline TBool IsGivenNamePronunciation() const;
213 inline TBool IsAddress() const;
214 inline TBool IsAdditionalName() const;
215 inline TBool IsSuffixName() const;
216 inline TBool IsPrefixName() const;
217 inline TBool IsStorageInline() const;
218 inline TBool IsEmail() const;
219 inline TBool Contains(const THint& aHint) const;
221 #ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__
222 inline void SetHasAdditionalUids();
223 TBool HasAdditionalUids() const;
225 TInt FieldId() const;
226 void SetFieldId(TInt aId);
228 #else //__SYMBIAN_CNTMODEL_USE_SQLITE__
229 TInt TemplateFieldId() const;
230 void SetTemplateFieldId(TInt aTemplateFieldId);
232 inline void SetHasVCardMappingUid();
233 inline TBool HasVCardMappingUid() const;
235 inline TInt AdditionalUidsNum() const;
236 inline void SetAdditionalUidsNum(TInt aNumber);
237 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__
244 IMPORT_C static CContactItemField* NewLC();
245 IMPORT_C static CContactItemField* NewL(TStorageType aType);
246 IMPORT_C static CContactItemField* NewLC(TStorageType aType);
247 IMPORT_C static CContactItemField* NewL(TStorageType aType, TFieldType aFieldType);
248 IMPORT_C static CContactItemField* NewLC(TStorageType aType, TFieldType aFieldType);
249 IMPORT_C static CContactItemField* NewL(const CContactItemField &aField);
250 IMPORT_C static CContactItemField* NewLC(const CContactItemField &aField);
251 IMPORT_C static CContactItemField* NewL(TStorageType aType, const CContentType &aContentType);
252 IMPORT_C static CContactItemField* NewLC(TStorageType aType, const CContentType &aContentType);
253 IMPORT_C ~CContactItemField();
255 IMPORT_C TStorageType StorageType() const;
256 IMPORT_C const CContentType &ContentType() const;
257 inline TBool IsHidden() const;
258 inline TBool IsReadOnly() const;
259 inline TBool IsDisabled() const;
260 inline TBool IsTemplate() const;
261 inline TBool IsPrivate() const;
262 inline TBool IsSpeedDial() const;
263 inline TBool DoSynchronize() const;
264 inline TBool OverRidesLabel() const;
265 inline TBool HasExtraStream() const;
266 inline TBool UsesTemplateTypes() const;
267 inline TBool LabelUnspecified() const;
268 inline TBool UserAddedField() const;
269 inline TBool IsCustomFilterable() const;
270 IMPORT_C void SetHintType(TInt aType);
271 IMPORT_C TPtrC Label() const;
272 IMPORT_C void ResetStore();
273 IMPORT_C CContactFieldStorage* Storage() const;
274 IMPORT_C CContactTextField * TextStorage() const;
275 IMPORT_C CContactStoreField * StoreStorage() const;
276 IMPORT_C CContactAgentField * AgentStorage() const;
277 IMPORT_C CContactDateField * DateTimeStorage() const;
278 IMPORT_C void AddFieldTypeL(TFieldType aFieldType);
279 IMPORT_C void RemoveFieldType(TFieldType aFieldType);
280 IMPORT_C void SetMapping(TUid aMapping);
281 IMPORT_C void SetHidden(TBool aHidden);
282 IMPORT_C void SetReadOnly(TBool aReadOnly);
283 IMPORT_C void SetSynchronize(TBool aSynchronize);
284 IMPORT_C void SetDisabled(TBool aDisabled);
285 IMPORT_C void SetLabelL(const TDesC& aLabel);
286 IMPORT_C void SetLabel(HBufC* aLabel);
287 IMPORT_C void SetUserAddedField(TBool aUserAddedField);
288 IMPORT_C void SetTemplateField(TBool aTemplateField);
289 IMPORT_C void SetPrivate(TBool aTemplateField);
290 IMPORT_C void SetSpeedDial(TBool aSpeedDialField);
291 IMPORT_C void SetId(TInt aId);
292 IMPORT_C TInt Id() const;
293 IMPORT_C TUint UserFlags() const;
294 IMPORT_C void SetUserFlags(TUint aFlags);
295 IMPORT_C static TBool IsValidLabel(const TDesC& aLabel,TInt& aInvalidPos);
296 IMPORT_C TBool IsTemplateLabelField() const;
297 IMPORT_C void GetFieldText(TDes &aText) const;
298 IMPORT_C void RestoreHeaderL(RReadStream& aStream, const CContactItemFieldSet *aSystemTemplateFields);
299 IMPORT_C TStreamId RestoreFieldTypesL(RReadStream &aRootStream, const CContactItemFieldSet *aSystemTemplateFields);
300 IMPORT_C void RestoreTextL(HBufC *aTextStream,TInt aTextFieldIndex);
301 IMPORT_C TBool RestoreIfMatchL(RReadStream& aStream,const CContactItemFieldDef *aFieldDef, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex);
304 IMPORT_C void SetCustomFilterable(EContactFieldFlags aContactFilterType);
305 IMPORT_C void Reset();
306 void SetUsesTemplateTypes(TBool aUsesTemplateTypes);
307 void SetOverRidesLabel(TBool aValue);
308 TInt TemplateFieldId() const;
309 void SetDeleted(TBool aDeleted);
310 inline TBool IsDeleted() const;
311 void CopyStorageL(const CContactItemField &aField);
312 void UpdateFieldFlags(const CContactItemFieldSet& aTemplateFieldSet);
313 void PopulateStoreL(RStoreWriteStream& aRootStream, TInt aCount, CArrayFix<TFieldHeader>& aFieldHeaderArray) const;
314 void PrepareFieldAsTemplateL(CContactItemFieldSet& aSystemTemplateFieldSet);
315 IMPORT_C TBool HasCustomFilter(EContactFieldFlags& contactFieldFlag) const;
316 TBool RestoreIfMatchL(RReadStream& aStream,TFieldType aFieldType, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex);
317 void ExternalizeL(RWriteStream& aStream) const;
318 void InternalizeL(RReadStream& aStream);
321 void UsesTemplateData(TInt aTemplateFieldId);
323 void UsesTemplateLabel();
324 void SetLabelUnspecified(TBool aUnspecified);
325 const CContentType &TemplateContentType(const CContactItemFieldSet &aSystemTemplateFields) const;
326 TFieldHeader StoreL(RWriteStream& aTextStream,CStreamStore& aBlobStore,TInt aTextFieldIndex);
327 TStreamId StoreAdditionalUidsL(CStreamStore& aStore,TStreamId aId, CArrayFixFlat<TUid> *aAdditionalFields);
328 TStreamId StoreDataL(CStreamStore& aStore);
330 void RestoreL(CStreamStore& aStore,RReadStream& aStream);
331 void RestoreDataL(CStreamStore& aStore,TStreamId aId);
333 TStreamId RestoreHintL(CStreamStore& aStore,RReadStream& aStream);
334 TBool AddFieldToHint(TFieldType aFieldType, CContactItemField::THint &aHint) const;
335 void MapHintsToFieldTypesL(THint aHint);
337 CContactItemField(TStorageType aType);
338 void CloneL(const CContactItemField &aField);
339 void ConstructStorageL();
341 enum {EUserMaskShift=4};
342 enum // er5 hard coded enum most of which have been used but not documented ;o(
345 EReadOnly =0x00000002,
346 ESynchronize =0x00000004,
347 EDisabled =0x00000008,
348 /* 0x00000010,-> 0x00000080 are used for
349 the user defined attribs / categories like work /
350 Personal / Other / None - used in er5 UI */
351 EUserMask =0x000000F0,
352 ETemplateMask =EUserMask|ESynchronize|EReadOnly|EHidden,
353 EOverRidesLabel =0x00000100,
354 EUsesTemplateData =0x00000200,
355 EUserAddedField =0x00000400,
356 ETemplate =0x00000800,
357 /* 0x00001000,-> 0x0000F000 are used for
358 the storage type of the contact field */
359 ELabelUnspecified =0x40000000,
363 // new extended enum to allow cntmodel to have
364 // more attributes per field
366 EPrivate =0x00000001,
367 ESpeedDial =0x00000002,
368 EUserDefinedFilter =0x00000004,
369 EUserDefinedFilter1 =0x00000008,
370 EUserDefinedFilter2 =0x00000010,
371 EUserDefinedFilter3 =0x00000020,
372 EUserDefinedFilter4 =0x00000040
376 CContentType *iContentType;
377 TStorageType iStorageType;
381 TUint32 iExtendedAttributes;
382 CContactFieldStorage* iStorage;
383 TInt iTemplateFieldId;
386 class CContactItemFieldDef : public CArrayFixFlat<TUid>
387 /** A field definition.
389 This is an array of field types. Field definitions are used by
390 CContactDatabase to specify a subset of fields when searching.
392 The CContactItemFieldDef class is derived from CArrayFixFlat<TUid> so all
393 relevant functions can be used, e.g. to add and remove elements. It adds no
394 functions other than a constructor.
400 inline CContactItemFieldDef() : CArrayFixFlat<TUid>(8)
401 /** Constructs the CContactItemFieldDef object, with an array granularity of 8. */
405 class TContactFieldAtts
412 inline TContactFieldAtts() : iStorage(0)
415 void SetAttribs(TUint32 aAttribs);
416 void SetExtendedAttribs(TUint32 aExtendedAttribs);
417 void SetType(TStorageType aType);
418 TUint32 Attribs() const;
419 TUint32 ExtendedAttribs() const;
420 TStorageType Type() const;
421 void InternalizeL(RReadStream& aStream);
422 void ExternalizeL(RWriteStream& aStream) const;
424 #ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__
426 void SetCount(TInt aCount);
427 TInt TemplateFieldId() const;
428 void SetTemplateFieldId(TInt aId);
429 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__
435 #ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__
436 TUint32 iExtendedAttribs;
437 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__
446 #ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__
451 TFieldHeader(TContactFieldAtts aAtts, TUint32 aFieldUid, TStreamId aId);
453 inline TContactFieldAtts FieldAtts() const;
454 inline void SetFieldAtts(TContactFieldAtts aAtts);
456 inline TInt FieldId() const;
457 inline void SetFieldId(TInt aId);
459 inline TStreamId StreamId() const;
460 inline void SetStreamId(TStreamId aId);
463 TContactFieldAtts iAtts;
468 #else //__SYMBIAN_CNTMODEL_USE_SQLITE__
472 inline TFieldHeader(TStreamId aId,TContactFieldAtts aAtts);
476 TContactFieldAtts iAtts;
479 inline TFieldHeader::TFieldHeader(TStreamId aId,TContactFieldAtts aAtts)
480 { iStreamId=aId; iAtts=aAtts; }
481 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__
483 inline TBool CContactItemField::IsHidden() const
484 /** Gets the value of the field's hidden attribute.
486 @return ETrue if hidden attribute is set, EFalse if not set. */
487 { return iAttributes&EHidden; }
489 inline TBool CContactItemField::IsReadOnly() const
490 /** Gets the value of the field's read only attribute.
492 @return ETrue if read only attribute set, EFalse if not set. */
493 { return iAttributes&EReadOnly; }
495 inline TBool CContactItemField::IsDisabled() const
496 /** Gets the value of the field's disabled attribute.
498 @return ETrue if disabled attribute set, EFalse if not set. */
499 { return iAttributes&EDisabled; }
501 inline TBool CContactItemField::IsTemplate() const
502 /** Tests whether the field is in a template, as set by SetTemplateField().
504 @return ETrue if field is a template field. EFalse if not. */
505 { return iAttributes&ETemplate; }
507 inline TBool CContactItemField::IsPrivate() const
508 /** Tests whether the field's private attribute is set.
510 @return True if the field's private attribute is set, false if not. */
511 { return iExtendedAttributes&EPrivate; }
513 inline TBool CContactItemField::IsSpeedDial() const
514 /** Tests whether the field is a speed dial field.
516 @return True if the field is a speed dial field, false if not. */
517 { return iExtendedAttributes&ESpeedDial; }
519 inline TBool CContactItemField::DoSynchronize() const
520 /** Gets the value of the field's synchronise attribute.
522 @return ETrue if synchronise attribute is set, EFalse if not set. */
523 { return iAttributes&ESynchronize; }
525 inline TBool CContactItemField::IsDeleted() const
526 /** Gets the value of the field's deleted attribute.
528 @return ETrue if the field is deleted, otherwise EFalse. */
529 { return iAttributes&EDeleted; }
531 inline void CContactItemField::THint::SetIsPhone()
532 {iHintValue|=KIntContactHintIsPhone;}
533 inline void CContactItemField::THint::SetIsMsg()
534 {iHintValue|=KIntContactHintIsMsg;}
535 // turn off Pronunciation bit too?
536 inline void CContactItemField::THint::SetIsCompanyName()
537 {iHintValue|=KIntContactHintIsCompanyName;}
538 inline void CContactItemField::THint::SetIsFamilyName()
539 {iHintValue|=KIntContactHintIsFamilyName;}
540 inline void CContactItemField::THint::SetIsGivenName()
541 {iHintValue|=KIntContactHintIsGivenName;}
542 inline void CContactItemField::THint::SetIsCompanyNamePronunciation()
543 {iHintValue|=KIntContactHintIsCompanyName|KIntContactHintIsPronunciation;}
544 inline void CContactItemField::THint::SetIsFamilyNamePronunciation()
545 {iHintValue|=KIntContactHintIsFamilyName|KIntContactHintIsPronunciation;}
546 inline void CContactItemField::THint::SetIsGivenNamePronunciation()
547 {iHintValue|=KIntContactHintIsGivenName|KIntContactHintIsPronunciation;}
548 inline void CContactItemField::THint::SetIsAddress()
549 {iHintValue|=KIntContactHintIsAddress;}
550 inline void CContactItemField::THint::SetIsAdditionalName()
551 {iHintValue|=KIntContactHintIsAdditionalName;}
552 inline void CContactItemField::THint::SetIsSuffixName()
553 {iHintValue|=KIntContactHintIsSuffixName;}
554 inline void CContactItemField::THint::SetIsPrefixName()
555 {iHintValue|=KIntContactHintIsPrefixName;}
556 inline void CContactItemField::THint::SetStorageIsInline()
557 {iHintValue|=KIntContactHintStorageInline;}
558 inline void CContactItemField::THint::SetIsEmail()
559 {iHintValue|=KIntContactHintIsEmail;}
560 inline TBool CContactItemField::THint::IsPhone() const
561 {return (iHintValue&KIntContactHintIsPhone);}
562 inline TBool CContactItemField::THint::IsMsg() const
563 {return (iHintValue&KIntContactHintIsMsg);}
564 inline TBool CContactItemField::THint::IsCompanyName() const
565 {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyName);}
566 inline TBool CContactItemField::THint::IsFamilyName() const
567 {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyName);}
568 inline TBool CContactItemField::THint::IsGivenName() const
569 {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenName);}
570 inline TBool CContactItemField::THint::IsCompanyNamePronunciation() const
571 {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyNamePronunciation);}
572 inline TBool CContactItemField::THint::IsFamilyNamePronunciation() const
573 {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyNamePronunciation);}
574 inline TBool CContactItemField::THint::IsGivenNamePronunciation() const
575 {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenNamePronunciation);}
576 inline TBool CContactItemField::THint::IsAddress() const
577 {return (iHintValue&KIntContactHintIsAddress);}
578 inline TBool CContactItemField::THint::IsAdditionalName() const
579 {return (iHintValue&KIntContactHintIsAdditionalName);}
580 inline TBool CContactItemField::THint::IsSuffixName() const
581 {return (iHintValue&KIntContactHintIsSuffixName);}
582 inline TBool CContactItemField::THint::IsPrefixName() const
583 {return (iHintValue&KIntContactHintIsPrefixName);}
584 inline TBool CContactItemField::THint::IsStorageInline() const
585 {return (iHintValue&KIntContactHintStorageInline);}
586 inline TBool CContactItemField::THint::IsEmail() const
587 {return (iHintValue&KIntContactHintIsEmail);}
589 #ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__
590 inline void CContactItemField::THint::SetHasAdditionalUids()
591 {iHintValue|=KHintAdditionalMask;}
592 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__
593 inline TBool CContactItemField::THint::Contains(const THint& aHint) const
594 {return (iHintValue&aHint.iHintValue);}
596 inline TBool CContactItemField::OverRidesLabel() const
597 /** Tests whether the field's label (as set by SetLabel()) overrides the label
598 specified in the field's template.
600 @return True if the field's label overrides the label specified in the template;
602 {return iAttributes&EOverRidesLabel;}
604 inline TBool CContactItemField::HasExtraStream() const
605 /** Tests whether the field needs an extra stream to store information not contained
606 in the template. This is the case if the field's content type is not based
607 on a template, or if the field has a label which overrides the label specified
610 @return True if the field uses an extra stream; false if not. */
611 {return(!(iAttributes&EUsesTemplateData) || iAttributes&EOverRidesLabel);}
613 inline TBool CContactItemField::UsesTemplateTypes() const
614 /** Tests whether or not the field's content type is based on a template.
616 @return True if the field's content type is based on a template; false if not. */
617 {return iAttributes&EUsesTemplateData;}
619 inline TBool CContactItemField::LabelUnspecified() const
620 /** Tests whether the field's label has been set, either by a call to SetLabel()
621 or by inheriting a label specified in the template.
623 @return True if the field's label has been set, false if not. */
624 {return iAttributes&ELabelUnspecified;}
626 inline TBool CContactItemField::UserAddedField() const
627 /** Gets the value of the user added field attribute.
629 @return ETrue if the user added attribute is set, EFalse if not. */
630 {return iAttributes&EUserAddedField;}
632 inline TBool CContactItemField::IsCustomFilterable() const
633 /** Tests the value of the user defined filter attribute.
635 @return ETrue if the user defined filter attribute is set, EFalse if not. */
637 return (iExtendedAttributes&EUserDefinedFilter || iExtendedAttributes&EUserDefinedFilter1 ||
638 iExtendedAttributes&EUserDefinedFilter2 || iExtendedAttributes&EUserDefinedFilter3
639 || iExtendedAttributes&EUserDefinedFilter4);