1 /* |
|
2 * Copyright (c) 2007 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: Class definition of CDiagPluginConstructionParam |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // CLASS DECLARATION |
|
20 #include <DiagPluginConstructionParam.h> |
|
21 |
|
22 // SYSTEM INCLUDE FILES |
|
23 #include <badesca.h> // CDesC16ArrayFlat |
|
24 |
|
25 // USER INCLUDE FILES |
|
26 |
|
27 // CONSTANTS |
|
28 _LIT( KDiagPluginBlankServiceName, "" ); |
|
29 |
|
30 // ======== LOCAL FUNCTIONS ======== |
|
31 |
|
32 |
|
33 // ======== MEMBER FUNCTIONS ======== |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // CDiagPluginConstructionParam::NewL() |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 EXPORT_C CDiagPluginConstructionParam* CDiagPluginConstructionParam::NewL( |
|
40 HBufC* aServiceProvided, |
|
41 CDesC16ArrayFlat* aServicesRequired, |
|
42 TInt aOrder, |
|
43 TUid aImplUid, |
|
44 TUid aParentUid ) |
|
45 { |
|
46 CDiagPluginConstructionParam* self = CDiagPluginConstructionParam::NewLC( |
|
47 aServiceProvided, |
|
48 aServicesRequired, |
|
49 aOrder, |
|
50 aImplUid, |
|
51 aParentUid ); |
|
52 CleanupStack::Pop( self ); |
|
53 return self; |
|
54 } |
|
55 |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // CDiagPluginConstructionParam::NewLC() |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 EXPORT_C CDiagPluginConstructionParam* CDiagPluginConstructionParam::NewLC( |
|
62 HBufC* aServiceProvided, |
|
63 CDesC16ArrayFlat* aServicesRequired, |
|
64 TInt aOrder, |
|
65 TUid aImplUid, |
|
66 TUid aParentUid ) |
|
67 { |
|
68 CDiagPluginConstructionParam* self = new( ELeave )CDiagPluginConstructionParam( |
|
69 aServiceProvided, |
|
70 aServicesRequired, |
|
71 aOrder, |
|
72 aImplUid, |
|
73 aParentUid ); |
|
74 CleanupStack::PushL( self ); |
|
75 return self; |
|
76 } |
|
77 |
|
78 // --------------------------------------------------------------------------- |
|
79 // CDiagPluginConstructionParam::CDiagPluginConstructionParam |
|
80 // --------------------------------------------------------------------------- |
|
81 // |
|
82 CDiagPluginConstructionParam::CDiagPluginConstructionParam( |
|
83 HBufC* aServiceProvided, |
|
84 CDesC16ArrayFlat* aServicesRequired, |
|
85 TInt aOrder, |
|
86 TUid aImplUid, |
|
87 TUid aParentUid ) |
|
88 : iServiceProvided ( aServiceProvided ), |
|
89 iServicesRequired ( aServicesRequired ), |
|
90 iOrder ( aOrder ), |
|
91 iImplUid ( aImplUid ), |
|
92 iParentUid ( aParentUid ) |
|
93 { |
|
94 } |
|
95 |
|
96 // --------------------------------------------------------------------------- |
|
97 // CDiagPluginConstructionParam::~CDiagPluginConstructionParam |
|
98 // --------------------------------------------------------------------------- |
|
99 // |
|
100 EXPORT_C CDiagPluginConstructionParam::~CDiagPluginConstructionParam() |
|
101 { |
|
102 delete iServiceProvided; |
|
103 iServiceProvided = NULL; |
|
104 |
|
105 delete iServicesRequired; |
|
106 iServicesRequired = NULL; |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // CDiagPluginConstructionParam::ServiceProvided |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 EXPORT_C const TDesC& CDiagPluginConstructionParam::ServiceProvided() const |
|
114 { |
|
115 if ( iServiceProvided ) |
|
116 { |
|
117 return *iServiceProvided; |
|
118 } |
|
119 else |
|
120 { |
|
121 // there is no service name. Because we must return a reference, |
|
122 // we should at least return a blank text. |
|
123 return KDiagPluginBlankServiceName(); |
|
124 } |
|
125 } |
|
126 |
|
127 // --------------------------------------------------------------------------- |
|
128 // CDiagPluginConstructionParam::ServicesRequired |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 EXPORT_C const CDesC16ArrayFlat& CDiagPluginConstructionParam::ServicesRequired() const |
|
132 { |
|
133 return *iServicesRequired; |
|
134 } |
|
135 |
|
136 // --------------------------------------------------------------------------- |
|
137 // CDiagPluginConstructionParam::Order |
|
138 // --------------------------------------------------------------------------- |
|
139 // |
|
140 EXPORT_C TInt CDiagPluginConstructionParam::Order() const |
|
141 { |
|
142 return iOrder; |
|
143 } |
|
144 |
|
145 // --------------------------------------------------------------------------- |
|
146 // CDiagPluginConstructionParam::Uid |
|
147 // --------------------------------------------------------------------------- |
|
148 // |
|
149 EXPORT_C TUid CDiagPluginConstructionParam::Uid() const |
|
150 { |
|
151 return iImplUid; |
|
152 } |
|
153 |
|
154 // --------------------------------------------------------------------------- |
|
155 // CDiagPluginConstructionParam::ParentUid |
|
156 // --------------------------------------------------------------------------- |
|
157 // |
|
158 EXPORT_C TUid CDiagPluginConstructionParam::ParentUid() const |
|
159 { |
|
160 return iParentUid; |
|
161 } |
|
162 |
|
163 // End of File |
|
164 |
|