|
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: CNcdPreminetProtocolRightsImpl implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ncd_pp_rightsimpl.h" |
|
20 #include "ncdprotocolutils.h" |
|
21 |
|
22 CNcdPreminetProtocolRightsImpl* |
|
23 CNcdPreminetProtocolRightsImpl::NewL() |
|
24 { |
|
25 CNcdPreminetProtocolRightsImpl* self = |
|
26 new (ELeave) CNcdPreminetProtocolRightsImpl; |
|
27 CleanupStack::PushL( self ); |
|
28 self->ConstructL(); |
|
29 CleanupStack::Pop( self ); |
|
30 return self; |
|
31 } |
|
32 |
|
33 CNcdPreminetProtocolRightsImpl* |
|
34 CNcdPreminetProtocolRightsImpl::NewLC() |
|
35 { |
|
36 CNcdPreminetProtocolRightsImpl* self = |
|
37 new (ELeave) CNcdPreminetProtocolRightsImpl; |
|
38 CleanupStack::PushL( self ); |
|
39 self->ConstructL(); |
|
40 return self; |
|
41 } |
|
42 |
|
43 |
|
44 void CNcdPreminetProtocolRightsImpl::ConstructL() |
|
45 { |
|
46 NcdProtocolUtils::AssignEmptyDesL( iActivationKey ); |
|
47 NcdProtocolUtils::AssignEmptyDesL( iIssuerUri ); |
|
48 NcdProtocolUtils::AssignEmptyDesL( iUri ); |
|
49 NcdProtocolUtils::AssignEmptyDesL( iType ); |
|
50 NcdProtocolUtils::AssignEmptyDesL( iName ); |
|
51 NcdProtocolUtils::AssignEmptyDesL( iRightsObjectDataBlock ); |
|
52 NcdProtocolUtils::AssignEmptyDesL( iRightsObjectMime ); |
|
53 NcdProtocolUtils::AssignEmptyDesL( iRightsObjectData ); |
|
54 } |
|
55 |
|
56 CNcdPreminetProtocolRightsImpl::CNcdPreminetProtocolRightsImpl() |
|
57 : CBase() |
|
58 { |
|
59 } |
|
60 |
|
61 /** |
|
62 * Destructor |
|
63 */ |
|
64 CNcdPreminetProtocolRightsImpl::~CNcdPreminetProtocolRightsImpl() { |
|
65 delete iActivationKey; |
|
66 delete iIssuerUri; |
|
67 delete iUri; |
|
68 delete iType; |
|
69 delete iName; |
|
70 |
|
71 delete iRightsObjectDataBlock; |
|
72 delete iRightsObjectMime; |
|
73 delete iRightsObjectData; |
|
74 } |
|
75 |
|
76 |
|
77 const TDesC& CNcdPreminetProtocolRightsImpl::ActivationKey() const |
|
78 { |
|
79 DASSERT((iActivationKey)); |
|
80 return *iActivationKey; |
|
81 } |
|
82 |
|
83 const TDesC& CNcdPreminetProtocolRightsImpl::IssuerUri() const |
|
84 { |
|
85 DASSERT((iIssuerUri)); |
|
86 return *iIssuerUri; |
|
87 } |
|
88 |
|
89 const TDesC& CNcdPreminetProtocolRightsImpl::Uri() const |
|
90 { |
|
91 DASSERT((iUri)); |
|
92 return *iUri; |
|
93 } |
|
94 |
|
95 const TDesC& CNcdPreminetProtocolRightsImpl::Type() const |
|
96 { |
|
97 DASSERT((iType)); |
|
98 return *iType; |
|
99 } |
|
100 |
|
101 const TDesC& CNcdPreminetProtocolRightsImpl::Name() const |
|
102 { |
|
103 DASSERT((iName)); |
|
104 return *iName; |
|
105 } |
|
106 |
|
107 const TDesC& CNcdPreminetProtocolRightsImpl::RightsObjectDataBlock() const |
|
108 { |
|
109 DLTRACEIN(("")); |
|
110 DASSERT((iRightsObjectDataBlock)); |
|
111 return *iRightsObjectDataBlock; |
|
112 } |
|
113 |
|
114 const TDesC& CNcdPreminetProtocolRightsImpl::RightsObjectMime() const |
|
115 { |
|
116 DASSERT((iRightsObjectMime)); |
|
117 return *iRightsObjectMime; |
|
118 } |
|
119 |
|
120 const TDesC8& CNcdPreminetProtocolRightsImpl::RightsObjectData() const |
|
121 { |
|
122 DLTRACEIN(("")); |
|
123 DASSERT((iRightsObjectData)); |
|
124 return *iRightsObjectData; |
|
125 } |
|
126 |