|
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: Implements CNcdNodeItemLink class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ncdnodeitemlink.h" |
|
20 #include "ncd_pp_itemref.h" |
|
21 #include "catalogsdebug.h" |
|
22 |
|
23 |
|
24 CNcdNodeItemLink* CNcdNodeItemLink::NewL( CNcdNode& aNode ) |
|
25 { |
|
26 CNcdNodeItemLink* self = |
|
27 CNcdNodeItemLink::NewLC( aNode ); |
|
28 CleanupStack::Pop( self ); |
|
29 return self; |
|
30 } |
|
31 |
|
32 CNcdNodeItemLink* CNcdNodeItemLink::NewLC( CNcdNode& aNode ) |
|
33 { |
|
34 CNcdNodeItemLink* self = new( ELeave ) CNcdNodeItemLink( aNode ); |
|
35 CleanupClosePushL( *self ); |
|
36 self->ConstructL(); |
|
37 return self; |
|
38 } |
|
39 |
|
40 |
|
41 CNcdNodeItemLink::CNcdNodeItemLink( CNcdNode& aNode, |
|
42 NcdNodeClassIds::TNcdNodeClassId aClassId ) |
|
43 : CNcdNodeLink( aNode, aClassId ) |
|
44 |
|
45 { |
|
46 } |
|
47 |
|
48 void CNcdNodeItemLink::ConstructL() |
|
49 { |
|
50 CNcdNodeLink::ConstructL(); |
|
51 } |
|
52 |
|
53 |
|
54 CNcdNodeItemLink::~CNcdNodeItemLink() |
|
55 { |
|
56 } |
|
57 |
|
58 |
|
59 void CNcdNodeItemLink::InternalizeL( const MNcdPreminetProtocolEntityRef& aData, |
|
60 const CNcdNodeIdentifier& aParentIdentifier, |
|
61 const CNcdNodeIdentifier& aRequestParentIdentifier, |
|
62 const TUid& aClientUid ) |
|
63 { |
|
64 DLTRACEIN(("")); |
|
65 if( aData.Type() != MNcdPreminetProtocolEntityRef::EItemRef ) |
|
66 { |
|
67 // The data should be for the item |
|
68 DLERROR(("Wrong type")); |
|
69 DASSERT( EFalse ); |
|
70 User::Leave( KErrArgument ); |
|
71 } |
|
72 |
|
73 // Let the parent do its internalizing |
|
74 CNcdNodeLink::InternalizeL( |
|
75 aData, aParentIdentifier, aRequestParentIdentifier, aClientUid ); |
|
76 DLTRACEOUT(("")); |
|
77 } |
|
78 |
|
79 |
|
80 void CNcdNodeItemLink::ExternalizeL( RWriteStream& aStream ) |
|
81 { |
|
82 // Before hanling this object specific data, |
|
83 // let the parent handle its data first. |
|
84 CNcdNodeLink::ExternalizeL( aStream ); |
|
85 } |
|
86 |
|
87 void CNcdNodeItemLink::InternalizeL( RReadStream& aStream ) |
|
88 { |
|
89 // Before hanling this object specific data, |
|
90 // let the parent handle its data first. |
|
91 CNcdNodeLink::InternalizeL( aStream ); |
|
92 } |
|
93 |
|
94 |
|
95 void CNcdNodeItemLink::ExternalizeDataForRequestL( RWriteStream& aStream ) const |
|
96 { |
|
97 CNcdNodeLink::ExternalizeDataForRequestL( aStream ); |
|
98 } |