|
1 /* |
|
2 * Copyright (c) 2009 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: This module contains the implementation of CIAUpdateNodeId |
|
15 * class member functions. |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "iaupdatenodeid.h" |
|
22 |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // CIAUpdateNodeId::NewL |
|
26 // |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 CIAUpdateNodeId* CIAUpdateNodeId::NewL() |
|
30 { |
|
31 CIAUpdateNodeId* self = |
|
32 CIAUpdateNodeId::NewLC(); |
|
33 CleanupStack::Pop( self ); |
|
34 return self; |
|
35 } |
|
36 |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CIAUpdateNodeId::NewLC |
|
40 // |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 CIAUpdateNodeId* CIAUpdateNodeId::NewLC() |
|
44 { |
|
45 CIAUpdateNodeId* self = |
|
46 new( ELeave) CIAUpdateNodeId(); |
|
47 CleanupStack::PushL( self ); |
|
48 self->ConstructL(); |
|
49 return self; |
|
50 } |
|
51 |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CIAUpdateNodeId::CIAUpdateNodeId |
|
55 // |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CIAUpdateNodeId::CIAUpdateNodeId() |
|
59 { |
|
60 } |
|
61 |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CIAUpdateNodeId::ConstructL |
|
65 // |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 void CIAUpdateNodeId::ConstructL() |
|
69 { |
|
70 } |
|
71 |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CIAUpdateNodeId::~CIAUpdateNodeId |
|
75 // |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CIAUpdateNodeId::~CIAUpdateNodeId() |
|
79 { |
|
80 delete iId; |
|
81 delete iNamespace; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CIAUpdateNodeId::Id |
|
86 // |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 const TDesC& CIAUpdateNodeId::Id() const |
|
90 { |
|
91 if ( !iId ) |
|
92 { |
|
93 return KNullDesC; |
|
94 } |
|
95 |
|
96 return *iId; |
|
97 } |
|
98 |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CIAUpdateNodeId::SetIdL |
|
102 // |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 void CIAUpdateNodeId::SetIdL( const TDesC& aId ) |
|
106 { |
|
107 HBufC* tmp( aId.AllocL() ); |
|
108 delete iId; |
|
109 iId = tmp; |
|
110 } |
|
111 |
|
112 |
|
113 // ----------------------------------------------------------------------------- |
|
114 // CIAUpdateNodeId::Namespace |
|
115 // |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 const TDesC& CIAUpdateNodeId::Namespace() const |
|
119 { |
|
120 if ( !iNamespace ) |
|
121 { |
|
122 return KNullDesC; |
|
123 } |
|
124 |
|
125 return *iNamespace; |
|
126 } |
|
127 |
|
128 |
|
129 // ----------------------------------------------------------------------------- |
|
130 // CIAUpdateNodeId::SetNamespaceL |
|
131 // |
|
132 // ----------------------------------------------------------------------------- |
|
133 // |
|
134 void CIAUpdateNodeId::SetNamespaceL( const TDesC& aNamespace ) |
|
135 { |
|
136 HBufC* tmp( aNamespace.AllocL() ); |
|
137 delete iNamespace; |
|
138 iNamespace = tmp; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // CIAUpdateNodeId::NodeType |
|
143 // |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 MIAUpdateAnyNode::TNodeType CIAUpdateNodeId::NodeType() const |
|
147 { |
|
148 return iNodeType; |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // CIAUpdateNodeId::SetNodeType |
|
153 // |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 void CIAUpdateNodeId::SetNodeType( MIAUpdateAnyNode::TNodeType aNodeType ) |
|
157 { |
|
158 iNodeType = aNodeType; |
|
159 } |
|
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // CIAUpdateNodeId::Selected |
|
163 // |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 TBool CIAUpdateNodeId::Selected() const |
|
167 { |
|
168 return iSelected; |
|
169 } |
|
170 |
|
171 // ----------------------------------------------------------------------------- |
|
172 // CIAUpdateNodeId::SetSelected |
|
173 // |
|
174 // ----------------------------------------------------------------------------- |
|
175 // |
|
176 void CIAUpdateNodeId::SetSelected( TInt aSelected ) |
|
177 { |
|
178 iSelected = aSelected; |
|
179 } |