|
1 /* |
|
2 * Copyright (c) 2005-2008 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: TMMCScBkupDriveAndSize implementation |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 #include "TMMCScBkupDriveAndSize.h" |
|
20 |
|
21 |
|
22 // ========================= MEMBER FUNCTIONS ================================ |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // TMMCScBkupDriveAndSize::InternalizeL() |
|
26 // |
|
27 // |
|
28 // --------------------------------------------------------------------------- |
|
29 void TMMCScBkupDriveAndSize::InternalizeL( RReadStream& aStream ) |
|
30 { |
|
31 aStream.ReadInt32L(); // EStreamFormatVersion1 |
|
32 aStream.ReadInt32L(); // spare1 |
|
33 aStream.ReadInt32L(); // spare2 |
|
34 // |
|
35 iDrive = static_cast<TDriveNumber>( aStream.ReadUint8L() ); |
|
36 |
|
37 iSize = aStream.ReadInt32L(); |
|
38 // If 64-bit handling will be supported in the future. |
|
39 // That will mean in practice a break in archive file format. |
|
40 /* |
|
41 if ( format == EStreamFormatVersion1 ) |
|
42 { |
|
43 iSize = aStream.ReadInt32L(); |
|
44 } |
|
45 else |
|
46 { |
|
47 iSize = aStream.ReadReal64L(); |
|
48 } |
|
49 */ |
|
50 } |
|
51 |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // TMMCScBkupDriveAndSize::ExternalizeL() |
|
55 // |
|
56 // |
|
57 // --------------------------------------------------------------------------- |
|
58 void TMMCScBkupDriveAndSize::ExternalizeL( RWriteStream& aStream ) const |
|
59 { |
|
60 aStream.WriteInt32L( EStreamFormatVersion1 ); |
|
61 aStream.WriteInt32L( 0 ); // spare1 |
|
62 aStream.WriteInt32L( 0 ); // spare2 |
|
63 // |
|
64 aStream.WriteUint8L( iDrive ); |
|
65 aStream.WriteInt32L( iSize ); |
|
66 //aStream.WriteReal64L( iSize ); // If 64-bit handling will be supported in the future. |
|
67 // That will mean in practice a break in archive file format. |
|
68 } |
|
69 |
|
70 |