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