|
1 /* |
|
2 * Copyright (c) 2008 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 FILES |
|
20 |
|
21 #include <s32strm.h> |
|
22 #include "mcssuiteobjectattr.h" |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ======================= |
|
25 |
|
26 // --------------------------------------------------------- |
|
27 // CSuiteObjectAttr::~CSuiteObjectAttr |
|
28 // --------------------------------------------------------- |
|
29 // |
|
30 CSuiteObjectAttr::~CSuiteObjectAttr() |
|
31 { |
|
32 iName.Close(); |
|
33 iValue.Close(); |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------- |
|
37 // CSuiteObjectAttr::NewL |
|
38 // --------------------------------------------------------- |
|
39 // |
|
40 CSuiteObjectAttr* CSuiteObjectAttr::NewL( const TDesC& aName ) |
|
41 { |
|
42 CSuiteObjectAttr* attr = NewLC( aName ); |
|
43 CleanupStack::Pop( attr ); |
|
44 return attr; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // CSuiteObjectAttr::NewLC |
|
49 // --------------------------------------------------------- |
|
50 // |
|
51 CSuiteObjectAttr* CSuiteObjectAttr::NewLC( const TDesC& aName ) |
|
52 { |
|
53 CSuiteObjectAttr* attr = new (ELeave) CSuiteObjectAttr(); |
|
54 CleanupStack::PushL( attr ); |
|
55 attr->ConstructL( aName ); |
|
56 return attr; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------- |
|
60 // CSuiteObjectAttr::CSuiteObjectAttr |
|
61 // --------------------------------------------------------- |
|
62 // |
|
63 CSuiteObjectAttr::CSuiteObjectAttr() |
|
64 { |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------- |
|
68 // CSuiteObjectAttr::ConstructL |
|
69 // --------------------------------------------------------- |
|
70 // |
|
71 void CSuiteObjectAttr::ConstructL( const TDesC& aName ) |
|
72 { |
|
73 iName.CreateL( aName ); |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------- |
|
77 // CSuiteObjectAttr::SetValueL |
|
78 // --------------------------------------------------------- |
|
79 // |
|
80 void CSuiteObjectAttr::SetValueL( const TDesC& aValue ) |
|
81 { |
|
82 iValue.Close(); |
|
83 iValue.CreateL( aValue ); |
|
84 } |
|
85 |
|
86 // --------------------------------------------------------- |
|
87 // RSuiteAttrArray::Find |
|
88 // --------------------------------------------------------- |
|
89 // |
|
90 TInt RSuiteAttrArray::Find( const TDesC& aName ) const |
|
91 { |
|
92 for ( TInt i = 0; i < Count(); i++ ) |
|
93 { |
|
94 if ( !aName.Compare( operator[]( i )->Name() ) ) |
|
95 { |
|
96 return i; |
|
97 } |
|
98 } |
|
99 return KErrNotFound; |
|
100 } |
|
101 |
|
102 // End of File |