|
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: |
|
15 * . |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "CMsgDeliveryItem.h" |
|
24 |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // MACROS |
|
29 |
|
30 // LOCAL CONSTANTS AND MACROS |
|
31 |
|
32 // MODULE DATA STRUCTURES |
|
33 |
|
34 // LOCAL FUNCTION PROTOTYPES |
|
35 |
|
36 // ==================== LOCAL FUNCTIONS ==================== |
|
37 |
|
38 |
|
39 // ================= MEMBER FUNCTIONS ======================= |
|
40 |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // CMsgDeliveryItem::CMsgDeliveryItem |
|
44 // C++ default constructor can NOT contain any code, that |
|
45 // might leave. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 CMsgDeliveryItem::CMsgDeliveryItem() |
|
49 { |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CMsgDeliveryItem::ConstructL |
|
54 // Symbian 2nd phase constructor can leave. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 void CMsgDeliveryItem::ConstructL() |
|
58 { |
|
59 iNumber = HBufC::NewL(0); |
|
60 iRecipient = HBufC::NewL(0); |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CMsgDeliveryItem::CMsgDeliveryItem |
|
65 // Destructor |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 CMsgDeliveryItem::~CMsgDeliveryItem() |
|
69 { |
|
70 delete iRecipient; |
|
71 delete iNumber; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CMmsMTMLogData::NewL |
|
76 // Two-phased constructor. |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 CMsgDeliveryItem* CMsgDeliveryItem::NewL() |
|
80 { |
|
81 CMsgDeliveryItem* self = new( ELeave ) CMsgDeliveryItem( ); |
|
82 |
|
83 CleanupStack::PushL( self ); |
|
84 self->ConstructL(); |
|
85 CleanupStack::Pop(); |
|
86 |
|
87 return self; |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------- |
|
91 // CMsgDeliveryItem::GetTime |
|
92 // --------------------------------------------------------- |
|
93 // |
|
94 TTime CMsgDeliveryItem::GetTime() |
|
95 { |
|
96 return iTime; |
|
97 } |
|
98 // --------------------------------------------------------- |
|
99 // CMsgDeliveryItem::SetTime |
|
100 // --------------------------------------------------------- |
|
101 // |
|
102 void CMsgDeliveryItem::SetTime(const TTime aTime) |
|
103 { |
|
104 iTime = aTime; |
|
105 } |
|
106 |
|
107 // --------------------------------------------------------- |
|
108 // CMsgDeliveryItem::GetNumber |
|
109 // --------------------------------------------------------- |
|
110 // |
|
111 TDesC& CMsgDeliveryItem::GetNumber() |
|
112 { |
|
113 return *iNumber; |
|
114 } |
|
115 |
|
116 // --------------------------------------------------------- |
|
117 // CMsgDeliveryItem::SetNumberL |
|
118 // --------------------------------------------------------- |
|
119 // |
|
120 void CMsgDeliveryItem::SetNumberL(const TDesC& aText) |
|
121 { |
|
122 delete iNumber; |
|
123 iNumber = NULL; |
|
124 iNumber = aText.AllocL(); |
|
125 } |
|
126 |
|
127 // --------------------------------------------------------- |
|
128 // CMsgDeliveryItem::GetRecipient |
|
129 // --------------------------------------------------------- |
|
130 // |
|
131 TDesC& CMsgDeliveryItem::GetRecipient() |
|
132 { |
|
133 return *iRecipient; |
|
134 } |
|
135 |
|
136 // --------------------------------------------------------- |
|
137 // CMsgDeliveryItem::SetRecipientL |
|
138 // --------------------------------------------------------- |
|
139 // |
|
140 void CMsgDeliveryItem::SetRecipientL(const TDesC& aText) |
|
141 { |
|
142 delete iRecipient; |
|
143 iRecipient = NULL; |
|
144 iRecipient = aText.AllocL(); |
|
145 } |
|
146 |
|
147 // --------------------------------------------------------- |
|
148 // CMsgDeliveryItem::GetStatus |
|
149 // --------------------------------------------------------- |
|
150 // |
|
151 TInt CMsgDeliveryItem::GetStatus() |
|
152 { |
|
153 return iStatus; |
|
154 } |
|
155 |
|
156 // --------------------------------------------------------- |
|
157 // CMsgDeliveryItem::SetStatus |
|
158 // --------------------------------------------------------- |
|
159 // |
|
160 void CMsgDeliveryItem::SetStatus(const TMmsStatus aStatus) |
|
161 { |
|
162 iStatus = aStatus; |
|
163 } |
|
164 |
|
165 // End of File |