|
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 CNcdNodeItem class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ncdnodeitem.h" |
|
20 #include "ncdnodeitemlink.h" |
|
21 #include "ncdnodeitemmetadata.h" |
|
22 #include "ncdnodemanager.h" |
|
23 #include "catalogssession.h" |
|
24 #include "catalogsbasemessage.h" |
|
25 #include "ncdnodeclassids.h" |
|
26 |
|
27 |
|
28 CNcdNodeItem::CNcdNodeItem( CNcdNodeManager& aNodeManager, |
|
29 NcdNodeClassIds::TNcdNodeClassId aNodeClassId, |
|
30 NcdNodeClassIds::TNcdNodeClassId aAcceptedLinkClassId, |
|
31 NcdNodeClassIds::TNcdNodeClassId aAcceptedMetaDataClassId ) |
|
32 : CNcdNode( aNodeManager, |
|
33 aNodeClassId, |
|
34 aAcceptedLinkClassId, |
|
35 aAcceptedMetaDataClassId ) |
|
36 { |
|
37 } |
|
38 |
|
39 void CNcdNodeItem::ConstructL( const CNcdNodeIdentifier& aIdentifier ) |
|
40 { |
|
41 CNcdNode::ConstructL( aIdentifier ); |
|
42 } |
|
43 |
|
44 |
|
45 CNcdNodeItem::~CNcdNodeItem() |
|
46 { |
|
47 } |
|
48 |
|
49 |
|
50 CNcdNodeItem* CNcdNodeItem::NewL( CNcdNodeManager& aNodeManager, |
|
51 const CNcdNodeIdentifier& aIdentifier ) |
|
52 { |
|
53 CNcdNodeItem* self = |
|
54 CNcdNodeItem::NewLC( aNodeManager, aIdentifier ); |
|
55 CleanupStack::Pop( self ); |
|
56 return self; |
|
57 } |
|
58 |
|
59 CNcdNodeItem* CNcdNodeItem::NewLC( CNcdNodeManager& aNodeManager, |
|
60 const CNcdNodeIdentifier& aIdentifier ) |
|
61 { |
|
62 CNcdNodeItem* self = |
|
63 new( ELeave ) CNcdNodeItem( aNodeManager ); |
|
64 CleanupClosePushL( *self ); |
|
65 self->ConstructL( aIdentifier ); |
|
66 return self; |
|
67 } |
|
68 |
|
69 |
|
70 CNcdNodeLink* CNcdNodeItem::CreateLinkL() |
|
71 { |
|
72 DLTRACEIN(("")); |
|
73 CNcdNodeLink* link = NodeLink(); |
|
74 |
|
75 if ( link ) |
|
76 { |
|
77 DLTRACEOUT(("Link already exists")); |
|
78 // The link was already created |
|
79 return link; |
|
80 } |
|
81 else |
|
82 { |
|
83 DLTRACEOUT(("Creating a new link")); |
|
84 // Link was not already created. |
|
85 // So, create new. |
|
86 return CNcdNodeItemLink::NewL( *this ); |
|
87 } |
|
88 } |
|
89 |
|
90 |
|
91 void CNcdNodeItem::ExternalizeDataForRequestL( RWriteStream& aStream ) const |
|
92 { |
|
93 CNcdNode::ExternalizeDataForRequestL( aStream ); |
|
94 } |
|
95 |
|
96 |