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