1 /* |
|
2 * Copyright (c) 2005-2006 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: Plugin activity PS tool |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AIPLUGINACTIVITYPSTOOL_H |
|
20 #define AIPLUGINACTIVITYPSTOOL_H |
|
21 |
|
22 #include <e32base.h> // TUid |
|
23 #include <e32property.h> // RProperty |
|
24 |
|
25 struct TAiPublisherInfo; |
|
26 |
|
27 NONSHARABLE_CLASS(CAiPluginActivityRegistry) : public CBase |
|
28 { |
|
29 public: |
|
30 |
|
31 static CAiPluginActivityRegistry* NewL(); |
|
32 |
|
33 TInt SetPluginActive( const TAiPublisherInfo& aPubInfo ); |
|
34 |
|
35 void CleanRegistry(); |
|
36 |
|
37 ~CAiPluginActivityRegistry(); |
|
38 |
|
39 private: |
|
40 |
|
41 // construction |
|
42 |
|
43 void ConstructL(); |
|
44 |
|
45 CAiPluginActivityRegistry(); |
|
46 |
|
47 // new methods |
|
48 |
|
49 /** |
|
50 * Update PS registry count register. |
|
51 */ |
|
52 TInt UpdateCountRegister(); |
|
53 |
|
54 /** |
|
55 * Update PS registry ordinal register. |
|
56 */ |
|
57 TInt UpdateOrdinalRegister( TInt aPluginUid ); |
|
58 |
|
59 /** |
|
60 * Update plugins name register. |
|
61 */ |
|
62 TInt UpdateNameRegister( TInt aPluginUid, |
|
63 const TDesC& aName ); |
|
64 |
|
65 /** |
|
66 * Clean last added entry. In case of failure. |
|
67 */ |
|
68 void CleanLastEntry( TInt aPluginUid, |
|
69 TInt aOrdinal, |
|
70 TInt aLastCount ); |
|
71 |
|
72 private: // Members |
|
73 |
|
74 /** |
|
75 * Ordinal in registry. Ascending. |
|
76 */ |
|
77 TInt iRegistryOrdinal; |
|
78 |
|
79 /** |
|
80 * Plugin count in registry. |
|
81 */ |
|
82 TInt iPluginCount; |
|
83 |
|
84 /** |
|
85 * PS property that is updated. |
|
86 */ |
|
87 RProperty iProperty; |
|
88 |
|
89 }; |
|
90 |
|
91 #endif // AIPLUGINACTIVITYPSTOOL_H |
|
92 |
|