|
1 /* |
|
2 * Copyright (c) 2004 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: Store API to retrieve contact list models. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CPEngContactListStore2.h" |
|
20 #include "CPEngContactListStore2Imp.h" |
|
21 #include "MPEngContactListProperties.h" |
|
22 |
|
23 |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CPEngContactListStore2::NewL() |
|
30 // Two-phased constructor. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 EXPORT_C CPEngContactListStore2* CPEngContactListStore2::NewL( |
|
34 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
35 TInt aPriority ) |
|
36 { |
|
37 CPEngContactListStore2* self = CPEngContactListStore2::NewLC( aNWSessionSlotID, |
|
38 aPriority ); |
|
39 CleanupStack::Pop( self ); |
|
40 return self; |
|
41 } |
|
42 |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CPEngContactListStore2::NewLC() |
|
46 // Two-phased constructor. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 EXPORT_C CPEngContactListStore2* CPEngContactListStore2::NewLC( |
|
50 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
51 TInt aPriority ) |
|
52 { |
|
53 CPEngContactListStore2* self = new ( ELeave ) CPEngContactListStore2; |
|
54 CleanupStack::PushL( self ); |
|
55 self->iImp = CPEngContactListStore2Imp::NewL( aNWSessionSlotID, |
|
56 aPriority ); |
|
57 return self; |
|
58 } |
|
59 |
|
60 |
|
61 |
|
62 // Destructor |
|
63 CPEngContactListStore2::~CPEngContactListStore2() |
|
64 { |
|
65 delete iImp; |
|
66 } |
|
67 |
|
68 |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // CPEngContactListStore2::CPEngContactListStore2 |
|
72 // C++ default constructor can NOT contain any code, that |
|
73 // might leave. |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 CPEngContactListStore2::CPEngContactListStore2() |
|
77 { |
|
78 } |
|
79 |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CPEngContactListStore2::AllContactListsL() |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 EXPORT_C const MDesCArray& CPEngContactListStore2::AllContactListsL() const |
|
86 { |
|
87 return iImp->AllContactListsL(); |
|
88 } |
|
89 |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CPEngContactListStore2::SynchronizedContactListsL() |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 EXPORT_C const MDesCArray& CPEngContactListStore2::SynchronizedContactListsL() const |
|
96 { |
|
97 return iImp->SynchronizedContactListsL(); |
|
98 } |
|
99 |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // CPEngContactListStore2::ContactListL() |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 EXPORT_C MPEngContactList2& CPEngContactListStore2::ContactListL( const TDesC& aContactList ) |
|
106 { |
|
107 return iImp->ContactListL( aContactList ); |
|
108 } |
|
109 |
|
110 |
|
111 // ----------------------------------------------------------------------------- |
|
112 // CPEngContactListStore2::CreateContactListL() |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 EXPORT_C MPEngContactListProperties& CPEngContactListStore2::CreateContactListL( |
|
116 const TDesC& aContactList, |
|
117 TPEngContactListBaseSettings& aBaseSettings ) |
|
118 { |
|
119 return iImp->CreateContactListL( aContactList, aBaseSettings ); |
|
120 } |
|
121 |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // CPEngContactListStore2::DeleteContactListL() |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 EXPORT_C void CPEngContactListStore2::DeleteContactListL( const TDesC& aContactList ) |
|
128 { |
|
129 iImp->DeleteContactListL( aContactList ); |
|
130 } |
|
131 |
|
132 |
|
133 // ----------------------------------------------------------------------------- |
|
134 // CPEngContactListStore2::ChangeContactListTypeL() |
|
135 // ----------------------------------------------------------------------------- |
|
136 // |
|
137 EXPORT_C void CPEngContactListStore2::ChangeContactListTypeL( const TDesC& aContactList, |
|
138 TPEngContactListType aContactListType ) |
|
139 { |
|
140 iImp->ChangeContactListTypeL( aContactList, aContactListType ); |
|
141 } |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CPEngContactListStore2::ContactListPropertiesL() |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 EXPORT_C MPEngContactListProperties& CPEngContactListStore2::ContactListPropertiesL( |
|
148 const TDesC& aContactList ) |
|
149 { |
|
150 return iImp->ContactListPropertiesL( aContactList ); |
|
151 } |
|
152 |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // CPEngContactListStore2::SetAsDefaultContactListL() |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 EXPORT_C void CPEngContactListStore2::SetAsDefaultContactListL( |
|
159 const TDesC& aContactList ) |
|
160 { |
|
161 iImp->SetAsDefaultContactListL( aContactList ); |
|
162 } |
|
163 |
|
164 |
|
165 // ----------------------------------------------------------------------------- |
|
166 // CPEngContactListStore2::ReleaseContactList() |
|
167 // ----------------------------------------------------------------------------- |
|
168 // |
|
169 EXPORT_C TInt CPEngContactListStore2::ReleaseContactList( const TDesC& aContactList ) |
|
170 { |
|
171 return iImp->ReleaseContactList( aContactList ); |
|
172 } |
|
173 |
|
174 |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // CPEngContactListStore2::ActiveContactListsL() |
|
178 // Deprecated. |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 EXPORT_C const MDesCArray& CPEngContactListStore2::ActiveContactListsL() const |
|
182 { |
|
183 return iImp->DummyList(); |
|
184 } |
|
185 |
|
186 |
|
187 // ----------------------------------------------------------------------------- |
|
188 // CPEngContactListStore2::NativeContactListsL() |
|
189 // Deprecated. |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 EXPORT_C const MDesCArray& CPEngContactListStore2::NativeContactListsL() const |
|
193 { |
|
194 return iImp->DummyList(); |
|
195 } |
|
196 |
|
197 |
|
198 // ----------------------------------------------------------------------------- |
|
199 // CPEngContactListStore2::NativeContactListsL() |
|
200 // Deprecated. |
|
201 // ----------------------------------------------------------------------------- |
|
202 // |
|
203 EXPORT_C const MDesCArray& CPEngContactListStore2::UnknownServerContactListsL() const |
|
204 { |
|
205 return iImp->DummyList(); |
|
206 } |
|
207 |
|
208 |
|
209 // ----------------------------------------------------------------------------- |
|
210 // CPEngContactListStore2::ReleaseUnknownContactListFromStore() |
|
211 // Deprecated. |
|
212 // ----------------------------------------------------------------------------- |
|
213 // |
|
214 EXPORT_C TInt CPEngContactListStore2::ReleaseUnknownContactListFromStore( |
|
215 const TDesC& /*aContactList*/ ) |
|
216 { |
|
217 return KErrNotSupported; |
|
218 } |
|
219 |
|
220 |
|
221 // End of File |
|
222 |
|
223 |