|
1 /* |
|
2 * Copyright (c) 2005 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: Implementation of applicationmanagement components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __AMAPPHIDEUTIL_H__ |
|
20 #define __AMAPPHIDEUTIL_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 namespace NApplicationManagement |
|
25 { |
|
26 |
|
27 typedef RArray<TUid> RUidArray; |
|
28 |
|
29 class CAMAppHideUtil : public CBase |
|
30 { |
|
31 RUidArray iHiddenUids; // The hidden uid list |
|
32 TBool iChanged; |
|
33 /** |
|
34 * Constructor |
|
35 */ |
|
36 CAMAppHideUtil(); |
|
37 |
|
38 |
|
39 /** |
|
40 * Second phase constructor. Loads the uid list from centrep. |
|
41 */ |
|
42 void ConstructL(); |
|
43 |
|
44 |
|
45 |
|
46 void ParseUids( RUidArray &aUid, const TDesC8& aUidList ); |
|
47 |
|
48 /** |
|
49 * Loads uids from centrep |
|
50 */ |
|
51 void LoadUidsL(); |
|
52 |
|
53 /** |
|
54 * Parses uid, returning KErrNone if successful |
|
55 */ |
|
56 TInt ParseUid( TLex &aLex, TUid &aUid ) const; |
|
57 |
|
58 /** |
|
59 * Skips delimiter, returning ETrue if delimiter is expected one. |
|
60 */ |
|
61 TBool SkipDelim( TLex &aLex ) const; |
|
62 |
|
63 /** |
|
64 * Puts aUid to aBuf and if aHasMore also adds delimiter |
|
65 */ |
|
66 void PersistUid( const TUid &aUid, TDes &aBuf, TBool aHasMore ) const; |
|
67 public: |
|
68 /** |
|
69 * Destructor |
|
70 */ |
|
71 virtual ~CAMAppHideUtil(); |
|
72 |
|
73 /** |
|
74 * Creates new CAMAppHideUtil instance |
|
75 */ |
|
76 static CAMAppHideUtil* CAMAppHideUtil::NewL(); |
|
77 |
|
78 /** |
|
79 * Adds uid to list, and updates the repository if needed |
|
80 */ |
|
81 void AddUidL(const TUid& aUid, TBool aPersist = EFalse ); |
|
82 |
|
83 /** |
|
84 * Removed uid from list, and updates the repository if needed |
|
85 */ |
|
86 void RemoveUidL( const TUid& aUid, TBool aPersist = EFalse ); |
|
87 |
|
88 /** |
|
89 * Writes uids to centrep |
|
90 */ |
|
91 void PersistUidsL(); |
|
92 |
|
93 /** |
|
94 * Resets the hidden uid array |
|
95 */ |
|
96 void Reset(); |
|
97 }; |
|
98 |
|
99 } |
|
100 |
|
101 #endif // #ifdef __AMAPPHIDEUTIL_H__ |
|
102 |
|
103 // End of File |