|
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: Message store property containers array client implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "MsgStorePropertyContainersArray.h" |
|
21 //<cmail> |
|
22 #include "MsgStorePropertyContainer.h" |
|
23 //</cmail> |
|
24 |
|
25 // ------------------------ |
|
26 // TPropertyContainersArray |
|
27 // ------------------------ |
|
28 |
|
29 // ========================================================================== |
|
30 // FUNCTION: Constructor |
|
31 // ========================================================================== |
|
32 TMsgStorePropertyContainersArray::TMsgStorePropertyContainersArray( RPointerArray<CMsgStorePropertyContainer>& aContainers ) : |
|
33 iContainers( aContainers ) |
|
34 { |
|
35 } // end constructor |
|
36 |
|
37 // ========================================================================== |
|
38 // FUNCTION: AddElementL |
|
39 // ========================================================================== |
|
40 void TMsgStorePropertyContainersArray::AddElementL( TMsgStoreId aId, TMsgStoreId aParentId, const TDesC8& aProperties ) |
|
41 { |
|
42 CMsgStorePropertyContainer *newContainer = CMsgStorePropertyContainer::NewL(); |
|
43 CleanupStack::PushL( newContainer ); |
|
44 |
|
45 newContainer->SetIds( aId, aParentId ); |
|
46 newContainer->DeserializeL( aProperties ); |
|
47 |
|
48 iContainers.AppendL( newContainer ); |
|
49 |
|
50 CleanupStack::Pop( newContainer ); |
|
51 } // end AddElementL |
|
52 |
|
53 // ========================================================================== |
|
54 // FUNCTION: Reset |
|
55 // ========================================================================== |
|
56 void TMsgStorePropertyContainersArray::Reset() |
|
57 { |
|
58 iContainers.ResetAndDestroy(); |
|
59 } // end Reset |
|
60 |