|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declares index data for SpdCtrl. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <s32strm.h> |
|
23 #include <gulicon.h> |
|
24 |
|
25 #include <CPbkContactItem.h> // Phonebook Contact |
|
26 #include <fbs.h> |
|
27 #include "SpdiaIndexData.h" |
|
28 |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 |
|
32 // C++ default constructor can NOT contain any code, that |
|
33 // might leave. |
|
34 // |
|
35 TSpdiaIndexData::TSpdiaIndexData() |
|
36 : iIconIndex(-1), iThumbIndex(-1), |
|
37 iContactItem(NULL), iOperation(NULL), iLastThumb(EFalse) |
|
38 { |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------- |
|
42 // TSpdiaIndexData::OffsetValue |
|
43 // Return offset address of member data |
|
44 // (other items were commented in a header). |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 TInt TSpdiaIndexData::OffsetValue(TDataIndex aIndex) |
|
48 { |
|
49 TInt size(0); |
|
50 switch (aIndex) |
|
51 { |
|
52 default: |
|
53 case EIndex: |
|
54 size = _FOFF(TSpdiaIndexData, iIndex); |
|
55 break; |
|
56 case ENumber: |
|
57 size = _FOFF(TSpdiaIndexData, iNumber); |
|
58 break; |
|
59 case EContactId: |
|
60 size = _FOFF(TSpdiaIndexData, iContactId); |
|
61 break; |
|
62 case EPhoneNumber: |
|
63 size = _FOFF(TSpdiaIndexData, iPhoneNumber); |
|
64 break; |
|
65 case ETelNumber: |
|
66 size = _FOFF(TSpdiaIndexData, iTelNumber); |
|
67 break; |
|
68 case EContactItem: |
|
69 size = _FOFF(TSpdiaIndexData, iContactItem); |
|
70 break; |
|
71 case EOperation: |
|
72 size = _FOFF(TSpdiaIndexData, iOperation); |
|
73 break; |
|
74 case ELastThumb: |
|
75 size = _FOFF(TSpdiaIndexData, iLastThumb); |
|
76 break; |
|
77 } |
|
78 return size; |
|
79 } |
|
80 |
|
81 // End of File |
|
82 |