|
1 /* |
|
2 * Copyright (c) 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 |
|
20 #include <liwservicehandler.h> |
|
21 |
|
22 #include "hnconvutils.h" |
|
23 #include "hnmdstring8key.h" |
|
24 |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CHnMdString8Key* CHnMdString8Key::NewL() |
|
33 { |
|
34 CHnMdString8Key* self = NewLC(); |
|
35 CleanupStack::Pop( self ); |
|
36 return self; |
|
37 } |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 CHnMdString8Key* CHnMdString8Key::NewLC() |
|
44 { |
|
45 CHnMdString8Key* self = new ( ELeave ) CHnMdString8Key(); |
|
46 CleanupStack::PushL( self ); |
|
47 self->ConstructL(); |
|
48 return self; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 CHnMdString8Key* CHnMdString8Key::NewL( const CHnMdString8Key* aKey ) |
|
56 { |
|
57 CHnMdString8Key* self = NewLC( aKey ); |
|
58 CleanupStack::Pop( self ); |
|
59 return self; |
|
60 } |
|
61 |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 // --------------------------------------------------------------------------- |
|
65 // |
|
66 CHnMdString8Key* CHnMdString8Key::NewLC( const CHnMdString8Key* aKey ) |
|
67 { |
|
68 CHnMdString8Key* self = new ( ELeave ) CHnMdString8Key(); |
|
69 CleanupStack::PushL( self ); |
|
70 self->ConstructL( aKey ); |
|
71 return self; |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 CHnMdBaseKey* CHnMdString8Key::CopyLC() |
|
79 { |
|
80 CHnMdString8Key* self = CHnMdString8Key::NewL( this ); |
|
81 CleanupStack::PushL( self ); |
|
82 return self; |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 CHnMdString8Key::~CHnMdString8Key() |
|
90 { |
|
91 } |
|
92 |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 // --------------------------------------------------------------------------- |
|
96 // |
|
97 CHnMdString8Key::CHnMdString8Key() |
|
98 { |
|
99 } |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 void CHnMdString8Key::ConstructL() |
|
106 { |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 void CHnMdString8Key::ConstructL( const CHnMdString8Key* aKey ) |
|
114 { |
|
115 BaseConstructL( aKey ); |
|
116 } |
|
117 |
|
118 // --------------------------------------------------------------------------- |
|
119 // |
|
120 // --------------------------------------------------------------------------- |
|
121 // |
|
122 void CHnMdString8Key::ToVariantL( TLiwVariant& aRet ) const |
|
123 { |
|
124 TLiwVariant ret; |
|
125 HBufC8* keyVal8 = HnConvUtils::StrToStr8LC( KeyContent() ); |
|
126 |
|
127 aRet.SetL(TLiwVariant( *keyVal8) ); // crates a copy of the data |
|
128 |
|
129 // clean up |
|
130 CleanupStack::PopAndDestroy(keyVal8); |
|
131 } |
|
132 |