|
1 /* |
|
2 * Copyright (c) 2006-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: Defination for peninput server application UI |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PENINPUTSERVERAPPUI_H |
|
20 #define PENINPUTSERVERAPPUI_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <eikapp.h> |
|
24 #include <eikdoc.h> |
|
25 #include <e32std.h> |
|
26 #include <coeccntx.h> |
|
27 #include <aknappui.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CPeninputServer; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Class CPeninputServerAppUi |
|
37 * Application UI class. |
|
38 * |
|
39 */ |
|
40 class CPeninputServerAppUi : public CAknAppUi |
|
41 { |
|
42 public: // // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * 2nd phase constructor. |
|
46 * |
|
47 * @since S60 v4.0 |
|
48 */ |
|
49 void ConstructL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 * |
|
54 * @since S60 v4.0 |
|
55 */ |
|
56 ~CPeninputServerAppUi(); |
|
57 |
|
58 /** |
|
59 * BackgroundTaskL. CIdle call back function |
|
60 * |
|
61 * @since S60 v4.0 |
|
62 * @param aPtr The parameter passed in by CIdle. |
|
63 * @return ETrue if next step background task needed. Otherwise EFalse |
|
64 */ |
|
65 static TInt BackgroundTaskL(TAny* aPtr); |
|
66 |
|
67 /** |
|
68 * Call back function. To exit the application after gets Exit command. |
|
69 * |
|
70 * @since S60 v4.0 |
|
71 * @param aPtr The parameter passed in by CIdle. |
|
72 * @return ETrue. Will always return ETrue, which indicates we finished the task. |
|
73 */ |
|
74 static TInt ExiterCallback(TAny* aPtr); |
|
75 //from base CAknAppUi |
|
76 /** |
|
77 * From CAknAppUi |
|
78 * Handles a change to the application's resources which |
|
79 * are shared across the environment. |
|
80 * |
|
81 * @param aType The type of resources that have changed. |
|
82 */ |
|
83 void HandleResourceChangeL(TInt aType); |
|
84 |
|
85 void HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination); |
|
86 |
|
87 /** |
|
88 * From CAknAppUi |
|
89 * Handle exit command |
|
90 * |
|
91 * @param aCommand Command code |
|
92 */ |
|
93 void HandleCommandL(TInt aCommand); |
|
94 private: |
|
95 |
|
96 void DoBackgroundTaskL(); |
|
97 |
|
98 /** |
|
99 * Exit server application. |
|
100 * |
|
101 */ |
|
102 void ExitServerApp(); |
|
103 private: //Data |
|
104 /** |
|
105 * Input server |
|
106 */ |
|
107 CPeninputServer* iPeninputServer; |
|
108 |
|
109 /** |
|
110 * Idle for background processing. |
|
111 */ |
|
112 CIdle *iIdle; |
|
113 }; |
|
114 |
|
115 #endif |
|
116 |
|
117 // End of File |