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: AppInfo array used in Model |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "appmngr2appinfoarray.h" // CAppMngr2AppInfoArray |
|
20 |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // CAppMngr2AppInfoArray::NewL() |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 CAppMngr2AppInfoArray* CAppMngr2AppInfoArray::NewL( MAppMngr2InfoArrayObserver& aObserver ) |
|
29 { |
|
30 CAppMngr2AppInfoArray* self = new (ELeave) CAppMngr2AppInfoArray( aObserver ); |
|
31 return self; |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // CAppMngr2AppInfoArray::~CAppMngr2AppInfoArray() |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 CAppMngr2AppInfoArray::~CAppMngr2AppInfoArray() |
|
39 { |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // CAppMngr2AppInfoArray::AddItemsInOrderL() |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 void CAppMngr2AppInfoArray::AddItemsInOrderL( |
|
47 RPointerArray<CAppMngr2AppInfo>& aAppInfos ) |
|
48 { |
|
49 // move items from aAppInfos to iArray using alphabetical order |
|
50 TInt count = aAppInfos.Count(); |
|
51 for( TInt index = count - 1; index >= 0; index-- ) |
|
52 { |
|
53 AddItemInOrderL( aAppInfos[ index ] ); // takes ownership |
|
54 aAppInfos.Remove( index ); |
|
55 } |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // CAppMngr2AppInfoArray::CAppMngr2AppInfoArray() |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 CAppMngr2AppInfoArray::CAppMngr2AppInfoArray( |
|
63 MAppMngr2InfoArrayObserver& aObserver ) : CAppMngr2InfoArray( aObserver ) |
|
64 { |
|
65 } |
|
66 |
|