1 /* |
|
2 * Copyright (c) 2002-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: SimSessionEnd command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSIMSESSIONENDHANDLER_H |
|
21 #define CSIMSESSIONENDHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelsat.h> |
|
25 #include "CSatCommandHandler.h" |
|
26 #include "MSatEventObserver.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Command handler for SimSessionEnd command. |
|
32 * |
|
33 * @lib SimSessionEndCmd.lib |
|
34 * @since Series 60 3.0 |
|
35 */ |
|
36 class CSimSessionEndHandler : public CSatCommandHandler |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @param aUtils SAT Utils interface |
|
43 */ |
|
44 static CSimSessionEndHandler* NewL( MSatUtils* aUtils ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CSimSessionEndHandler(); |
|
50 |
|
51 private: // New function |
|
52 |
|
53 /** |
|
54 * Timer call back for sim session end generation |
|
55 */ |
|
56 static TInt TimerCallback( TAny* aSimSessionEndHandler ); |
|
57 |
|
58 public: // Functions from base classes |
|
59 |
|
60 /** |
|
61 * From CSatCommandHandler Overrides the default implementation. |
|
62 * @param aEvent Identifies the event. |
|
63 */ |
|
64 void Event( TInt aEvent ); |
|
65 |
|
66 protected: // Functions from base classes |
|
67 |
|
68 /** |
|
69 * From CActive Cancels the usat request. |
|
70 */ |
|
71 void DoCancel(); |
|
72 |
|
73 /** |
|
74 * From CSatCommandHandler Requests the command notification. |
|
75 * @param aStatus Request status |
|
76 */ |
|
77 void IssueUSATRequest( TRequestStatus& aStatus ); |
|
78 |
|
79 /** |
|
80 * From CSatCommandHandler Precheck before executing the command. |
|
81 * @return TBool indicating command is currently allowed. |
|
82 */ |
|
83 TBool CommandAllowed(); |
|
84 |
|
85 /** |
|
86 * From CSatCommandHandler Need for ui session. |
|
87 * @return TBool indicating need of ui session. |
|
88 */ |
|
89 TBool NeedUiSession(); |
|
90 |
|
91 /** |
|
92 * From CSatCommandHandler Called when USAT API notifies that command. |
|
93 */ |
|
94 void HandleCommand(); |
|
95 |
|
96 /** |
|
97 * From CSatCommandHandler. Ui launch failed. |
|
98 */ |
|
99 void UiLaunchFailed(); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CSimSessionEndHandler(); |
|
107 |
|
108 /** |
|
109 * By default Symbian 2nd phase constructor is private. |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 private: // Data |
|
114 |
|
115 // Indication of user terminated the SIM session. |
|
116 TBool iSimSessionTerminatedByUser; |
|
117 |
|
118 // Timer for launcing simsession end. |
|
119 CPeriodic* iTimer; |
|
120 |
|
121 // Sustained display text on screen |
|
122 TBool iSustainedTextActive; |
|
123 |
|
124 // Sim session end pending because sustained text |
|
125 TBool iSimSessionEndPending; |
|
126 |
|
127 }; |
|
128 |
|
129 #endif // CSIMSESSIONENDHANDLER_H |
|
130 |
|
131 // End of File |
|