|
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: Contains overview of the test record, not actual test results. |
|
15 * libraries : DiagResultsDatabase.lib DiagResultsDatabase.dll |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef DIAGNOSTICS_RESULTS_DATABASE_TEST_RECORD_INFO_H |
|
21 #define DIAGNOSTICS_RESULTS_DATABASE_TEST_RECORD_INFO_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class RReadStream; |
|
26 class RWriteStream; |
|
27 |
|
28 /** |
|
29 * Results database record info. Contains information about one record. |
|
30 * |
|
31 * @since S60 v5.0 |
|
32 **/ |
|
33 class TDiagResultsDatabaseTestRecordInfo |
|
34 { |
|
35 public: |
|
36 |
|
37 enum TDbRecordStatus |
|
38 { |
|
39 EOpen, // Currently open for writing. |
|
40 ESuspended, // ::Suspend() is called. |
|
41 ECompleted // Record is completed (not resumable), and all |
|
42 // tests were completed. |
|
43 }; |
|
44 |
|
45 |
|
46 /** |
|
47 * Constructor |
|
48 **/ |
|
49 IMPORT_C TDiagResultsDatabaseTestRecordInfo(); |
|
50 |
|
51 /** |
|
52 * Internalize from a stream. |
|
53 * |
|
54 * @param aStream Stream to be read from. |
|
55 **/ |
|
56 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
57 |
|
58 /** |
|
59 * Externalize into a stream. |
|
60 * |
|
61 * @param aStream Stream to be written into. |
|
62 **/ |
|
63 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
64 |
|
65 /** |
|
66 * Returns DRM time. |
|
67 * |
|
68 * @return DRM time. |
|
69 **/ |
|
70 IMPORT_C static TTime DRMTimeL(); |
|
71 |
|
72 //Public member data. |
|
73 TUid iRecordId; // Identifies this record. |
|
74 TTime iDrmStartTime; //When the record was opened (DRM time). |
|
75 TTime iDrmFinishTime; //when the record was completed (DRM time). |
|
76 TTime iStartTime; //When the record was opened (Home time). |
|
77 TTime iFinishTime; //when the record was completed (Home time). |
|
78 TUid iDbUid; //UID3 of the database. |
|
79 TUint iTestCount; //The number of tests in this record. |
|
80 TDbRecordStatus iRecordStatus; //Stored record status. |
|
81 TBool iCompleted; //Writable or read-only test record |
|
82 |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 * Writes time(TTime) into a stream. Time has to be written into a stream |
|
88 * using two 32-bit values since there is no method to write 64-bit value. |
|
89 * |
|
90 * @param aStream Stream to be written into. |
|
91 * @param aTime Time that is written into the stream. |
|
92 **/ |
|
93 void WriteTimeToStreamL( RWriteStream& aStream, const TTime& aTime ) const; |
|
94 |
|
95 /** |
|
96 * Reads time (TTime) from a stream. |
|
97 * |
|
98 * @param aStream Stream to be read from. |
|
99 * @param aTime Time that was read from the stream. |
|
100 **/ |
|
101 void ReadTimeFromStreamL( RReadStream& aStream, TTime& aTime ); |
|
102 |
|
103 }; |
|
104 |
|
105 #endif |