|
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 "ncd_pp_itemrefimpl.h" |
|
20 #include "ncdprotocolutils.h" |
|
21 |
|
22 CNcdPreminetProtocolItemRefImpl* |
|
23 CNcdPreminetProtocolItemRefImpl::NewL() |
|
24 { |
|
25 CNcdPreminetProtocolItemRefImpl* self = |
|
26 new (ELeave) CNcdPreminetProtocolItemRefImpl; |
|
27 CleanupStack::PushL( self ); |
|
28 self->ConstructL(); |
|
29 CleanupStack::Pop( self ); |
|
30 return self; |
|
31 } |
|
32 |
|
33 CNcdPreminetProtocolItemRefImpl* |
|
34 CNcdPreminetProtocolItemRefImpl::NewLC() |
|
35 { |
|
36 CNcdPreminetProtocolItemRefImpl* self = |
|
37 new (ELeave) CNcdPreminetProtocolItemRefImpl; |
|
38 CleanupStack::PushL( self ); |
|
39 self->ConstructL(); |
|
40 return self; |
|
41 } |
|
42 |
|
43 |
|
44 void CNcdPreminetProtocolItemRefImpl::ConstructL() |
|
45 { |
|
46 iDescription = ENormal; |
|
47 NcdProtocolUtils::AssignEmptyDesL( iParentId ); |
|
48 NcdProtocolUtils::AssignEmptyDesL( iId ); |
|
49 NcdProtocolUtils::AssignEmptyDesL( iNamespace ); |
|
50 NcdProtocolUtils::AssignEmptyDesL( iTimestamp ); |
|
51 NcdProtocolUtils::AssignEmptyDesL( iRemoteUri ); |
|
52 NcdProtocolUtils::AssignEmptyDesL( iServerUri ); |
|
53 NcdProtocolUtils::AssignEmptyDesL( iParentNamespace ); |
|
54 } |
|
55 |
|
56 |
|
57 MNcdPreminetProtocolEntityRef::TType CNcdPreminetProtocolItemRefImpl::Type() const |
|
58 { |
|
59 return EItemRef; |
|
60 } |
|
61 |
|
62 MNcdPreminetProtocolEntityRef::TDescription CNcdPreminetProtocolItemRefImpl::Description() const |
|
63 { |
|
64 return iDescription; |
|
65 } |
|
66 |
|
67 |
|
68 CNcdPreminetProtocolItemRefImpl::~CNcdPreminetProtocolItemRefImpl() |
|
69 { |
|
70 delete iId; |
|
71 delete iParentId; |
|
72 delete iNamespace; |
|
73 delete iTimestamp; |
|
74 delete iRemoteUri; |
|
75 iQueries.Close(); |
|
76 delete iServerUri; |
|
77 delete iParentNamespace; |
|
78 } |
|
79 |
|
80 const TDesC& CNcdPreminetProtocolItemRefImpl::ParentId() const |
|
81 { |
|
82 return *iParentId; |
|
83 } |
|
84 |
|
85 const TDesC& CNcdPreminetProtocolItemRefImpl::Id() const |
|
86 { |
|
87 return *iId; |
|
88 } |
|
89 |
|
90 const TDesC& CNcdPreminetProtocolItemRefImpl::Timestamp() const |
|
91 { |
|
92 return *iTimestamp; |
|
93 } |
|
94 |
|
95 const TDesC& CNcdPreminetProtocolItemRefImpl::Namespace() const |
|
96 { |
|
97 return *iNamespace; |
|
98 } |
|
99 |
|
100 const RArray<TInt>& CNcdPreminetProtocolItemRefImpl::Queries() const |
|
101 { |
|
102 return iQueries; |
|
103 } |
|
104 |
|
105 const TDesC& CNcdPreminetProtocolItemRefImpl::ServerUri() const |
|
106 { |
|
107 return *iServerUri; |
|
108 } |
|
109 |
|
110 const TDesC& CNcdPreminetProtocolItemRefImpl::RemoteUri() const |
|
111 { |
|
112 return *iRemoteUri; |
|
113 } |
|
114 |
|
115 const TDesC& CNcdPreminetProtocolItemRefImpl::ParentNamespace() const |
|
116 { |
|
117 return *iParentNamespace; |
|
118 } |
|
119 |
|
120 TInt CNcdPreminetProtocolItemRefImpl::ValidUntilDelta() const |
|
121 { |
|
122 return iValidUntilDelta; |
|
123 } |
|
124 |
|
125 TBool CNcdPreminetProtocolItemRefImpl::ValidUntilAutoUpdate() const |
|
126 { |
|
127 return iValidUntilAutoUpdate; |
|
128 } |