|
1 /* |
|
2 * Copyright (c) 2006 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 #include <s32strm.h> |
|
20 |
|
21 #include "ncdsendableprogress.h" |
|
22 |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 // --------------------------------------------------------------------------- |
|
27 // ?description_if_needed |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 TNcdSendableProgress::TNcdSendableProgress() : |
|
31 iState( 0 ), |
|
32 iOperationId( 0 ), |
|
33 iProgress( 0 ), |
|
34 iMaxProgress( 0 ) |
|
35 { |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // ?description_if_needed |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 TNcdSendableProgress::TNcdSendableProgress( TUint aState, TInt32 aOperationId, |
|
43 TInt32 aProgress, |
|
44 TInt32 aMaxProgress ) : |
|
45 iState( aState ), |
|
46 iOperationId( aOperationId ), |
|
47 iProgress( aProgress ), |
|
48 iMaxProgress( aMaxProgress ) |
|
49 { |
|
50 } |
|
51 |
|
52 // --------------------------------------------------------------------------- |
|
53 // ?implementation_description |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 void TNcdSendableProgress::InternalizeL( RReadStream& aStream ) |
|
57 { |
|
58 iState = aStream.ReadUint32L(); |
|
59 iOperationId = aStream.ReadInt32L(); |
|
60 iProgress = aStream.ReadInt32L(); |
|
61 iMaxProgress = aStream.ReadInt32L(); |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // ?implementation_description |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 void TNcdSendableProgress::ExternalizeL( RWriteStream& aStream ) const |
|
69 { |
|
70 aStream.WriteUint32L( iState ); |
|
71 aStream.WriteInt32L( iOperationId ); |
|
72 aStream.WriteInt32L( iProgress ); |
|
73 aStream.WriteInt32L( iMaxProgress ); |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // ?implementation_description |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 TInt TNcdSendableProgress::Size() const |
|
81 { |
|
82 TInt size(0); |
|
83 size += sizeof( iState ); |
|
84 size += sizeof( iOperationId ); |
|
85 size += sizeof( iProgress ); |
|
86 size += sizeof( iMaxProgress ); |
|
87 return size; |
|
88 } |