|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PROGRAMSTATUS_H |
|
19 #define PROGRAMSTATUS_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 namespace Swi |
|
24 { |
|
25 // Program main state |
|
26 enum TProgramState |
|
27 { |
|
28 EStateIdle, |
|
29 EStateInstalling, |
|
30 EStateUninstalling |
|
31 }; |
|
32 /** |
|
33 * CProgramStatus class handles program main status. |
|
34 * |
|
35 * @since S60 3.2 |
|
36 */ |
|
37 class CProgramStatus : public CBase |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Symbian construction |
|
43 */ |
|
44 static CProgramStatus* NewL( TInt aProcessStatus ); |
|
45 |
|
46 /** |
|
47 * Symbian construction |
|
48 */ |
|
49 static CProgramStatus* NewLC( TInt aProcessStatus ); |
|
50 |
|
51 /** |
|
52 * C++ destructor |
|
53 */ |
|
54 ~CProgramStatus(); |
|
55 |
|
56 /** |
|
57 * This function sets main status. |
|
58 * |
|
59 * @since 3.2 |
|
60 * @param aProcessStatus - program status |
|
61 */ |
|
62 void SetProgramStatus( TInt aProcessStatus ); |
|
63 |
|
64 /** |
|
65 * This function returns main status. |
|
66 * |
|
67 * @since 3.2 |
|
68 * @return TInt Program status |
|
69 */ |
|
70 TInt GetProgramStatus(); |
|
71 |
|
72 /** |
|
73 * This function sets main status to idle. |
|
74 * |
|
75 * @since 3.2 |
|
76 */ |
|
77 void SetProgramStatusToIdle(); |
|
78 |
|
79 /** |
|
80 * This function defines general PS key for dialogs. |
|
81 * If PS key is already set function does nothing. |
|
82 * |
|
83 * @since 3.2 |
|
84 */ |
|
85 void DefinePSKeyForUI(); |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * 2nd phase constructor |
|
91 */ |
|
92 void ConstructL( TInt aProcessStatus ); |
|
93 |
|
94 private: |
|
95 |
|
96 // Defines program main status. |
|
97 TInt iGeneralProcessStatus; |
|
98 // Current PS key for UI dialog control. |
|
99 TInt iPSKeyValue; |
|
100 }; |
|
101 |
|
102 } //namespace Swi |
|
103 |
|
104 #endif /*PROGRAMSTATUS_*/ |
|
105 |
|
106 //EOF |
|
107 |