1 /* |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
3 * All rights reserved. |
3 // This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
8 * |
8 // Initial Contributors: |
9 * Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
10 // |
11 * |
11 // Contributors: |
12 * Contributors: |
12 // |
13 * |
13 // Description: |
14 * Description: |
14 // Persistence layer exports |
15 * Persistence layer exports |
15 // |
16 * |
16 // |
17 */ |
|
18 |
|
19 |
17 |
20 |
18 |
21 |
19 |
22 #if !defined(__CNTFIELD_H__) |
20 #if !defined(__CNTFIELD_H__) |
23 #define __CNTFIELD_H__ |
21 #define __CNTFIELD_H__ |
24 |
22 |
25 #include <cntdef.h> |
23 #include <cntdef.h> |
|
24 |
26 |
25 |
27 |
26 |
28 /** Null field ID. |
27 /** Null field ID. |
29 @publishedAll |
28 @publishedAll |
30 @released |
29 @released |
31 */ |
30 */ |
32 const TInt KNullFieldId=-1; |
31 const TInt KNullFieldId=-1; |
33 |
32 |
|
33 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
34 /** @internalComponent */ |
34 /** @internalComponent */ |
35 const TInt KIntContactHintIsPhone=0x02; |
35 const TInt KIntContactHintIsPhone=0x02; |
36 /** @internalComponent */ |
36 /** @internalComponent */ |
37 const TInt KIntContactHintIsMsg=0x04; |
37 const TInt KIntContactHintIsMsg=0x04; |
38 /** @internalComponent */ |
38 /** @internalComponent */ |
89 const TInt KHintAdditionalMask = 0x200000; |
89 const TInt KHintAdditionalMask = 0x200000; |
90 /** @internalComponent */ |
90 /** @internalComponent */ |
91 const TInt KHintIdMask = 0xFFC00000; |
91 const TInt KHintIdMask = 0xFFC00000; |
92 |
92 |
93 #endif //_SYMBIAN_USE_SQLITE__ |
93 #endif //_SYMBIAN_USE_SQLITE__ |
94 |
94 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
95 |
95 |
96 class RWriteStream; |
96 class RWriteStream; |
97 class RReadStream; |
97 class RReadStream; |
98 class CContactFieldStorage; |
98 class CContactFieldStorage; |
99 class CContactTextField; |
99 class CContactTextField; |
204 friend class CContactItemFieldSet; |
204 friend class CContactItemFieldSet; |
205 friend class CContactDatabase; |
205 friend class CContactDatabase; |
206 friend class CContactTables; |
206 friend class CContactTables; |
207 friend class RPplContactTable; |
207 friend class RPplContactTable; |
208 friend class CPackagerTests; |
208 friend class CPackagerTests; |
|
209 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
210 class THint; |
|
211 #else |
209 class THint |
212 class THint |
210 /** |
213 /** |
211 @internalComponent |
214 @internalComponent |
212 @released |
215 @released |
213 */ |
216 */ |
510 }; |
514 }; |
511 |
515 |
512 inline TFieldHeader::TFieldHeader(TStreamId aId,TContactFieldAtts aAtts) |
516 inline TFieldHeader::TFieldHeader(TStreamId aId,TContactFieldAtts aAtts) |
513 { iStreamId=aId; iAtts=aAtts; } |
517 { iStreamId=aId; iAtts=aAtts; } |
514 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ |
518 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ |
|
519 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
515 |
520 |
516 inline TBool CContactItemField::IsHidden() const |
521 inline TBool CContactItemField::IsHidden() const |
517 /** Gets the value of the field's hidden attribute. |
522 /** Gets the value of the field's hidden attribute. |
518 |
523 |
519 @return ETrue if hidden attribute is set, EFalse if not set. */ |
524 @return ETrue if hidden attribute is set, EFalse if not set. */ |
558 inline TBool CContactItemField::IsDeleted() const |
563 inline TBool CContactItemField::IsDeleted() const |
559 /** Gets the value of the field's deleted attribute. |
564 /** Gets the value of the field's deleted attribute. |
560 |
565 |
561 @return ETrue if the field is deleted, otherwise EFalse. */ |
566 @return ETrue if the field is deleted, otherwise EFalse. */ |
562 { return iAttributes&EDeleted; } |
567 { return iAttributes&EDeleted; } |
563 |
568 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
564 inline void CContactItemField::THint::SetIsPhone() |
569 inline void CContactItemField::THint::SetIsPhone() |
565 {iHintValue|=KIntContactHintIsPhone;} |
570 {iHintValue|=KIntContactHintIsPhone;} |
566 inline void CContactItemField::THint::SetIsMsg() |
571 inline void CContactItemField::THint::SetIsMsg() |
567 {iHintValue|=KIntContactHintIsMsg;} |
572 {iHintValue|=KIntContactHintIsMsg;} |
568 // turn off Pronunciation bit too? |
573 // turn off Pronunciation bit too? |
623 inline void CContactItemField::THint::SetHasAdditionalUids() |
628 inline void CContactItemField::THint::SetHasAdditionalUids() |
624 {iHintValue|=KHintAdditionalMask;} |
629 {iHintValue|=KHintAdditionalMask;} |
625 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ |
630 #endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ |
626 inline TBool CContactItemField::THint::Contains(const THint& aHint) const |
631 inline TBool CContactItemField::THint::Contains(const THint& aHint) const |
627 {return (iHintValue&aHint.iHintValue);} |
632 {return (iHintValue&aHint.iHintValue);} |
628 |
633 #endif |
629 inline TBool CContactItemField::OverRidesLabel() const |
634 inline TBool CContactItemField::OverRidesLabel() const |
630 /** Tests whether the field's label (as set by SetLabel()) overrides the label |
635 /** Tests whether the field's label (as set by SetLabel()) overrides the label |
631 specified in the field's template. |
636 specified in the field's template. |
632 |
637 |
633 @return True if the field's label overrides the label specified in the template; |
638 @return True if the field's label overrides the label specified in the template; |