|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __APGCTL_LIST_H__ |
|
17 #define __APGCTL_LIST_H__ |
|
18 |
|
19 #if !defined(__E32STD_H__) |
|
20 #include <e32std.h> |
|
21 #endif |
|
22 #if !defined(__E32BASE_H__) |
|
23 #include <e32base.h> |
|
24 #endif |
|
25 |
|
26 // classes defined: |
|
27 class CApaSystemControlList; |
|
28 |
|
29 // |
|
30 // classes referenced: |
|
31 class CApaSystemControl; |
|
32 class RFs; |
|
33 // |
|
34 |
|
35 class CApaSystemControlList : public CBase |
|
36 /** Provides a list of all available control panel applications present on the phone. |
|
37 This class is implemented as a linked list of CApaSystemControl. Updates the control panel application list by removing |
|
38 control panels that no longer exist, adding new control panels found to the control panel application list and replacing |
|
39 a control panel if found in an earlier drive. |
|
40 |
|
41 @see CApaSystemControl |
|
42 @publishedPartner |
|
43 @released |
|
44 */ |
|
45 { |
|
46 public: |
|
47 IMPORT_C static CApaSystemControlList* NewL(RFs& aFs); |
|
48 IMPORT_C ~CApaSystemControlList(); |
|
49 |
|
50 IMPORT_C TInt Count()const; |
|
51 IMPORT_C TInt Index(TUid aType)const; |
|
52 IMPORT_C CApaSystemControl* Control(TInt aIndex)const; |
|
53 IMPORT_C CApaSystemControl* Control(TUid aType)const; |
|
54 |
|
55 IMPORT_C void UpdateL(); |
|
56 inline TInt UpdateCount()const; |
|
57 private: |
|
58 CApaSystemControlList(RFs& aFs); |
|
59 CApaSystemControl* PreviousControl(const CApaSystemControl* aControl) const; |
|
60 private: |
|
61 TInt iUpdateCount; |
|
62 RFs& iFs; |
|
63 CApaSystemControl* iControl; |
|
64 }; |
|
65 |
|
66 |
|
67 // |
|
68 // inlines |
|
69 // |
|
70 |
|
71 |
|
72 inline TInt CApaSystemControlList::UpdateCount()const |
|
73 /** Gets the number of times the control panel application list has been |
|
74 updated (by calling UpdateL()). It returns 1 for a newly created list. |
|
75 |
|
76 @return The number of times the control panel application list has been changed. */ |
|
77 { return iUpdateCount; } |
|
78 |
|
79 #endif |