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: LandmarksUi Content File - |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include "CLmkSelectorLBModelBase.h" |
|
27 #include "CLmkListProviderBase.h" |
|
28 #include "CLmkSelectorCache.h" |
|
29 #include <EPos_Landmarks.h> |
|
30 |
|
31 // CONSTANTS |
|
32 /// Unnamed namespace for local definitions |
|
33 namespace { |
|
34 // Enough space for raw text + formatting: |
|
35 const TInt KLmkSelectorLbModelLength = KPosLmMaxTextFieldLength+10; |
|
36 } // namespace |
|
37 // ============================ MEMBER FUNCTIONS =============================== |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CLmkSelectorLBModelBase::CLmkSelectorLBModelBase |
|
41 // C++ default constructor can NOT contain any code, that |
|
42 // might leave. |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 CLmkSelectorLBModelBase::CLmkSelectorLBModelBase() |
|
46 { |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CLmkSelectorLBModelBase::ConstructL |
|
51 // Symbian 2nd phase constructor can leave. |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 void CLmkSelectorLBModelBase::BaseConstructL( |
|
55 CLmkListProviderBase& aListProvider ) |
|
56 { |
|
57 iCache = CLmkSelectorCache::NewL( aListProvider ); |
|
58 iBuffer = HBufC::NewL( KLmkSelectorLbModelLength ); |
|
59 } |
|
60 |
|
61 // ---------------------------------------------------- |
|
62 // CLmkSelectorLBModelBase::~CLmkSelectorLBModelBase |
|
63 // ---------------------------------------------------- |
|
64 // |
|
65 CLmkSelectorLBModelBase::~CLmkSelectorLBModelBase() |
|
66 { |
|
67 delete iCache; |
|
68 delete iBuffer; |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CLmkSelectorLBModelBase::MdcaCount |
|
73 // ?implementation_description |
|
74 // (other items were commented in a header). |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 TInt CLmkSelectorLBModelBase:: MdcaCount() const |
|
78 { |
|
79 return iCache->ItemCount(); |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CLmkSelectorLBModelBase::MdcaPoint |
|
84 // ?implementation_description |
|
85 // (other items were commented in a header). |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 TPtrC16 CLmkSelectorLBModelBase::MdcaPoint( TInt aIndex ) const |
|
89 { |
|
90 TRAPD( err, MdcaPointL( aIndex ) ); |
|
91 if ( err != KErrNone && err != KErrLocked) |
|
92 { |
|
93 //*iBuffer = KNullDesC; |
|
94 } |
|
95 return *iBuffer; |
|
96 } |
|
97 |
|
98 // End of File |
|