|
1 /* |
|
2 * Copyright (c) 2005 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: XDM Engine settings property |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "XdmSettingsApi.h" |
|
21 #include "XdmSettingsProperty.h" |
|
22 |
|
23 // --------------------------------------------------------- |
|
24 // CXdmSettingsProperty::SetPropCollectionL |
|
25 // |
|
26 // --------------------------------------------------------- |
|
27 // |
|
28 CXdmSettingsProperty::CXdmSettingsProperty( TXdmSettingsProperty aPropertyName ) : |
|
29 iPropertyName( aPropertyName ) |
|
30 { |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------- |
|
34 // CXdmSettingsProperty::ConstructL |
|
35 // |
|
36 // --------------------------------------------------------- |
|
37 // |
|
38 void CXdmSettingsProperty::ConstructL( const TDesC& aPropertyValue ) |
|
39 { |
|
40 iPropertyValue = HBufC::NewL( aPropertyValue.Length() ); |
|
41 iPropertyValue->Des().Copy( aPropertyValue ); |
|
42 } |
|
43 |
|
44 // --------------------------------------------------------- |
|
45 // CXdmSettingsProperty::SetPropCollectionL |
|
46 // |
|
47 // --------------------------------------------------------- |
|
48 // |
|
49 CXdmSettingsProperty::~CXdmSettingsProperty() |
|
50 { |
|
51 delete iPropertyValue; |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------- |
|
55 // CXdmSettingsProperty::SetPropCollectionL |
|
56 // |
|
57 // --------------------------------------------------------- |
|
58 // |
|
59 CXdmSettingsProperty* CXdmSettingsProperty::NewL( const TDesC& aPropertyValue, |
|
60 TXdmSettingsProperty aPropertyName ) |
|
61 { |
|
62 CXdmSettingsProperty* self = new ( ELeave ) CXdmSettingsProperty( aPropertyName ); |
|
63 CleanupStack::PushL( self ); |
|
64 self->ConstructL( aPropertyValue ); |
|
65 CleanupStack::Pop(); |
|
66 return self; |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------- |
|
70 // CXdmSettingsProperty::SetPropertyL |
|
71 // |
|
72 // --------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C TXdmSettingsProperty CXdmSettingsProperty::PropertyName() const |
|
75 { |
|
76 return iPropertyName; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------- |
|
80 // CXdmSettingsProperty::SetPropertyL |
|
81 // |
|
82 // --------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C TPtrC CXdmSettingsProperty::PropertyValue() const |
|
85 { |
|
86 return iPropertyValue != NULL ? iPropertyValue->Des() : TPtrC(); |
|
87 } |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 // End of File |
|
93 |