|
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: The implementation for presentation elements. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_IRNMSLOGGER_H |
|
20 #define C_IRNMSLOGGER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "irsessionparams.h" |
|
25 |
|
26 class RReadStream; |
|
27 class RWriteStream; |
|
28 |
|
29 /** |
|
30 * This class can hold data for Nms log |
|
31 */ |
|
32 |
|
33 NONSHARABLE_CLASS( CIRNmsLogger ) : public CBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Function: NewL |
|
38 * Two phase constructor returns the instance of CIRNmsLogger |
|
39 * @returns instance of CIRNmsLogger |
|
40 */ |
|
41 static CIRNmsLogger* NewL(); |
|
42 |
|
43 /** |
|
44 * Function: NewLC |
|
45 * Two phase constructor creates the instance of CIRNmsLogger |
|
46 * @returns instance of CIRNmsLogger |
|
47 */ |
|
48 static CIRNmsLogger* NewLC(); |
|
49 |
|
50 /** |
|
51 * Function: ~CIRNmsLogger |
|
52 * default destructor |
|
53 */ |
|
54 ~CIRNmsLogger(); |
|
55 |
|
56 private: |
|
57 /** |
|
58 * Function: ConstructL |
|
59 * Two phase constructor |
|
60 */ |
|
61 void ConstructL(); |
|
62 |
|
63 /** |
|
64 * Function: CIRNmsLogger |
|
65 * default constructor |
|
66 */ |
|
67 CIRNmsLogger(); |
|
68 |
|
69 public: |
|
70 |
|
71 |
|
72 /** |
|
73 * Function: ResetResource |
|
74 * reset data from channel server |
|
75 */ |
|
76 void ResetResource(); |
|
77 |
|
78 |
|
79 /** |
|
80 * Function: UpdateChannelID |
|
81 * updates the channel id |
|
82 * @param channel id |
|
83 */ |
|
84 void UpdateChannelID( TInt aChanneldID ); |
|
85 |
|
86 /** |
|
87 * Function: UpdateCurrentNetwork |
|
88 * updates the current network |
|
89 * @param current network |
|
90 */ |
|
91 void UpdateCurrentNetwork( TInt aCurrentNetwork ); |
|
92 |
|
93 /** |
|
94 * Function: UpdateHomeOperator |
|
95 * updates the home network |
|
96 * @param home network |
|
97 */ |
|
98 void UpdateHomeOperator( TInt aHomeOperator ); |
|
99 |
|
100 /** |
|
101 * Function : UpdateNmsStartGMTTime |
|
102 * function updates Nms start time with current GMT time |
|
103 */ |
|
104 void UpdateNmsStartGMTTime(); |
|
105 |
|
106 /** |
|
107 * Function: UpdateNmsType |
|
108 * updates the nms type |
|
109 * @param nms type |
|
110 */ |
|
111 void UpdateNmsType( const TDesC& aNmsType ); |
|
112 |
|
113 /** |
|
114 * Function: ChannelID |
|
115 * return the channel id |
|
116 * @return channel id |
|
117 */ |
|
118 TInt ChannelID() const; |
|
119 |
|
120 /** |
|
121 * Function: CurrentNetwork |
|
122 * returns the Current Network |
|
123 * @return Current Network |
|
124 */ |
|
125 TInt CurrentNetwork() const; |
|
126 |
|
127 /** |
|
128 * Function: HomeOperator |
|
129 * returns the home network |
|
130 * @return home network |
|
131 */ |
|
132 TInt HomeOperator() const; |
|
133 |
|
134 |
|
135 /** |
|
136 * Function: StartTime |
|
137 * returns the start time |
|
138 * @return start time |
|
139 */ |
|
140 TDes& StartTime(); |
|
141 |
|
142 /** |
|
143 * Function: NmsType |
|
144 * returns the nms type |
|
145 * @return nms type |
|
146 */ |
|
147 TDesC& NmsType(); |
|
148 |
|
149 /** |
|
150 * Function: NmsLogId |
|
151 * returns the nmslog id |
|
152 * @return n nmslog id |
|
153 */ |
|
154 |
|
155 TInt NmsLogId() const; |
|
156 |
|
157 |
|
158 /** |
|
159 * Function: FileName |
|
160 * returns file name |
|
161 * @return file name |
|
162 */ |
|
163 TFileName FileName(); |
|
164 |
|
165 /** |
|
166 * Function: DateTime |
|
167 * returns Nms start time |
|
168 * @return Nms start time |
|
169 */ |
|
170 TTime DateTime(); |
|
171 |
|
172 /** |
|
173 * Function: GetBackedUp |
|
174 * Back up the given Nms, copies the data of the Nms |
|
175 * @param Nms logs instance which to be copied |
|
176 */ |
|
177 void GetBackedUp( CIRNmsLogger& aNms ); |
|
178 |
|
179 /** |
|
180 * Function: ExternalizeL |
|
181 * externialize the stream to the given stream |
|
182 * @param write stream |
|
183 */ |
|
184 void ExternalizeL( RWriteStream& aWriteStream ); |
|
185 |
|
186 /** |
|
187 * Function: InternalizeL |
|
188 * gets the data from the stream |
|
189 * @param read stream |
|
190 */ |
|
191 void InternalizeL( RReadStream& aReadStream ); |
|
192 |
|
193 |
|
194 private: |
|
195 /** |
|
196 * file name |
|
197 */ |
|
198 TFileName iFilePath; |
|
199 |
|
200 /** |
|
201 * Nms start time |
|
202 */ |
|
203 TTime iStartNmsTime; |
|
204 |
|
205 /** |
|
206 * time current Nms become active started |
|
207 */ |
|
208 TTime iActiveNmsTime; |
|
209 |
|
210 |
|
211 /** |
|
212 * start time is stored |
|
213 */ |
|
214 TBuf<64> iStartTime; |
|
215 |
|
216 |
|
217 /** |
|
218 * NmsLog id |
|
219 */ |
|
220 TInt iNmsLogId; |
|
221 |
|
222 /** |
|
223 * channel id |
|
224 */ |
|
225 TInt iChannelId; |
|
226 |
|
227 /** |
|
228 * home operator mcc+mnc |
|
229 */ |
|
230 TInt iHomeOperator; |
|
231 |
|
232 /** |
|
233 * current operator mcc+mnc |
|
234 */ |
|
235 TInt iNmsCurrentNetwork; |
|
236 |
|
237 /** |
|
238 * nms type information |
|
239 */ |
|
240 TBuf<16> iNmsType; |
|
241 }; |
|
242 |
|
243 #endif //C_IRNMSLOGGER_H |