|
1 /* |
|
2 * Copyright (c) 2007-2007 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: Utility classes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DEVDIAGUTIL_H |
|
20 #define DEVDIAGUTIL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 /** |
|
28 * TUtil |
|
29 * |
|
30 * This class contains general utility functions. |
|
31 */ |
|
32 NONSHARABLE_CLASS (TDevDiagUtil) |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Get data as text. |
|
39 * @param aText Contains the transformed TTime in text format. |
|
40 * @param aDateTime Time to be converted. |
|
41 **/ |
|
42 static void GetDateTextL( TDes& aText, TTime aDateTime ); |
|
43 |
|
44 /** |
|
45 * Get time as text. |
|
46 * @param aText Contains the transformed TTime in text format. |
|
47 * @param aDateTime Time to be converted. |
|
48 */ |
|
49 static void GetTimeTextL( TDes& aText, TTime aDateTime ); |
|
50 |
|
51 /** |
|
52 * Get data and time as text. |
|
53 * @param aText Contains the transformed TTime in text format. |
|
54 * @param aDateTime Time to be converted. |
|
55 */ |
|
56 static void GetDateTimeTextL( TDes& aText, TTime aDateTime ); |
|
57 |
|
58 /** |
|
59 * Check if sync has happened today. |
|
60 * @param aTime Time to be checked. |
|
61 * @return Boolean ETrue if time is today, otherwise EFalse. |
|
62 */ |
|
63 static TBool IsToday( TTime aTime ); |
|
64 |
|
65 private: |
|
66 |
|
67 /** |
|
68 * Convert time to hometime. |
|
69 * @param aUniversalTime Time to be transformed. |
|
70 * @return TTIme Hometime. |
|
71 */ |
|
72 static TTime ConvertUniversalToHomeTime( const TTime& aUniversalTime ); |
|
73 |
|
74 }; |
|
75 |
|
76 #endif // DEVDIAGUTIL_H |
|
77 |
|
78 // End of File |