|
1 /* |
|
2 * Copyright (c) 2009 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: Location history item class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRLOCATIONHISTORYITEM_H |
|
20 #define CESMRLOCATIONHISTORYITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "mesmrlocationhistoryitem.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * List item wrapper for location history |
|
30 */ |
|
31 NONSHARABLE_CLASS( CESMRLocationHistoryItem ) : public CBase, |
|
32 public MESMRLocationHistoryItem |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 * Creates a new instance of class |
|
38 * |
|
39 * @return CESMRLocationHistoryItem instance |
|
40 */ |
|
41 static CESMRLocationHistoryItem* NewL( const TUint aId, |
|
42 const TDesC& aAddress, |
|
43 const TDesC& aUrl ); |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * Creates a new instance of class |
|
48 * and leaves it on the cleanupstack |
|
49 * |
|
50 * @return CESMRLocationHistoryItem instance |
|
51 */ |
|
52 static CESMRLocationHistoryItem* NewLC( const TUint aId, |
|
53 const TDesC& aAddress, |
|
54 const TDesC& aUrl ); |
|
55 |
|
56 /** |
|
57 * C++ Destructor. |
|
58 */ |
|
59 virtual ~CESMRLocationHistoryItem(); |
|
60 |
|
61 public: // from MESMRLocationHistoryItem |
|
62 |
|
63 /** |
|
64 * Sets aAddress as new address |
|
65 * |
|
66 * @param aAddress New address to be set |
|
67 */ |
|
68 void SetAddressL( const TDesC& aAddress ); |
|
69 |
|
70 /** |
|
71 * Sets aUrl as new url |
|
72 * |
|
73 * @param aUrl New url to be set |
|
74 */ |
|
75 void SetUrlL( const TDesC& aUrl ); |
|
76 |
|
77 /** |
|
78 * Returns address |
|
79 * |
|
80 * @return the address of this item |
|
81 */ |
|
82 const TDesC& Address() const; |
|
83 |
|
84 /** |
|
85 * Returns url |
|
86 * |
|
87 * @return the url of this item |
|
88 */ |
|
89 const TDesC& Url() const; |
|
90 |
|
91 /** |
|
92 * Returns id |
|
93 * |
|
94 * @return the id of this item |
|
95 */ |
|
96 TUint Id() const; |
|
97 |
|
98 protected: |
|
99 /** |
|
100 * C++ default constructor. |
|
101 * |
|
102 * @param aId id for this item |
|
103 */ |
|
104 CESMRLocationHistoryItem( const TUint aId ); |
|
105 |
|
106 private: |
|
107 /** |
|
108 * ConstructL |
|
109 * |
|
110 * @param aAddress address for this item |
|
111 * @param aUrl url for this item |
|
112 */ |
|
113 void ConstructL( const TDesC& aAddress, |
|
114 const TDesC& aUrl ); |
|
115 |
|
116 private: // data |
|
117 HBufC* iAddress; /// Owned: address |
|
118 |
|
119 HBufC* iUrl; /// Owned: url |
|
120 |
|
121 TUint iId; // unique id |
|
122 }; |
|
123 |
|
124 #endif // CESMRLOCATIONHISTORYITEM_H |
|
125 |
|
126 // End of File |