|
1 /* |
|
2 * Copyright (c) 2009 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: This header contains the class for Java (un)install service |
|
15 * |
|
16 */ |
|
17 #ifndef __JAVAPPLICATIONSERVICE__H_ |
|
18 #define __JAVAPPLICATIONSERVICE__H_ |
|
19 |
|
20 // System Includes |
|
21 #include <e32base.h> |
|
22 #include <e32property.h> //Publish subscribe key |
|
23 #include <javadomainpskeys.h> //Java installer |
|
24 #include <swispubsubdefs.h> //Java Installer defined here |
|
25 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
26 #include <schinfo.h> |
|
27 #else |
|
28 #include <schinfo.h> |
|
29 #include <schinfointernal.h> |
|
30 #endif |
|
31 |
|
32 //User includes |
|
33 #include "DmEventServiceBase.h" |
|
34 |
|
35 //The publish subscribe key with condition. Do not alter this unless absolutely needed! |
|
36 const TPSKeyCondition KJavaPSKeyCondition(KUidSystemCategory,KPSUidJavaLatestInstallation, 0, TTaskSchedulerCondition::EGreaterThan); |
|
37 |
|
38 //The task name for this service. Do not alter this unless absolutely needed! |
|
39 _LIT(KJavaTaskName, "JavaTask"); |
|
40 |
|
41 /** |
|
42 * Derives the base service and implementes service for Java installation |
|
43 * |
|
44 * @since S60 v5.2 |
|
45 */ |
|
46 NONSHARABLE_CLASS(CJavaApplicationService) : public CDmEventServiceBase |
|
47 { |
|
48 |
|
49 public: |
|
50 |
|
51 /** Two phase construction **/ |
|
52 static CJavaApplicationService* CJavaApplicationService::NewL(); |
|
53 |
|
54 static CJavaApplicationService* CJavaApplicationService::NewLC(); |
|
55 |
|
56 /** Virtual destructor **/ |
|
57 virtual ~CJavaApplicationService(); |
|
58 |
|
59 /** |
|
60 * Waits until any Java operation is complete |
|
61 * |
|
62 * @since S60 v5.2 |
|
63 * @return None. Can leave with system wide error |
|
64 */ |
|
65 void WaitForRequestCompleteL(); |
|
66 |
|
67 /** |
|
68 * This functions tells if the publish subscribe key exists or not. It is called |
|
69 * before registering the condition schedule. |
|
70 * |
|
71 * @since S60 v5.2 |
|
72 * @return ETrue if exists, otherwise EFalse |
|
73 */ |
|
74 TBool IsKeyValid(); |
|
75 |
|
76 /** |
|
77 * Returns the task name of the service, which should be unique in this application. |
|
78 * |
|
79 * @since S60 v5.2 |
|
80 * @return task name |
|
81 */ |
|
82 const TDesC& TaskName(); |
|
83 |
|
84 private: |
|
85 |
|
86 /** Constructors **/ |
|
87 CJavaApplicationService(); |
|
88 |
|
89 CJavaApplicationService(const TPSKeyCondition& aPSKeyCondition); |
|
90 |
|
91 private: |
|
92 /** Initializes the members of the class **/ |
|
93 void ConstructL(); |
|
94 |
|
95 /** |
|
96 * Checks if no operation is ongoing |
|
97 * |
|
98 * @since S60 v5.2 |
|
99 * @param aValue - value of the publish subscribe key |
|
100 * @return ETrue if idle, otherwise EFalse |
|
101 */ |
|
102 TBool IsSwInIdle(TInt aValue); |
|
103 }; |
|
104 |
|
105 #endif // __JAVAPPLICATIONSERVICE__H_ |
|
106 // End of File |