|
1 /* |
|
2 * Copyright (c) 2004-2007 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: Notifier server app wrapper implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __AKNNOTIFIERSERVERAPPLICATION__ |
|
19 #define __AKNNOTIFIERSERVERAPPLICATION__ |
|
20 |
|
21 #include <AknDoc.h> |
|
22 #include <aknapp.h> |
|
23 #include <aknappui.h> |
|
24 #include <aknappui.h> |
|
25 |
|
26 class CAknNotifierManagerExtension; |
|
27 class MEikSrvNotifierManager; |
|
28 class CAknNotifierControllerUtility; |
|
29 |
|
30 //---------------------------------- |
|
31 // Application |
|
32 //---------------------------------- |
|
33 class CAknNotifierAppServerApplication : public CAknApplication |
|
34 { |
|
35 public: |
|
36 IMPORT_C CAknNotifierAppServerApplication(); |
|
37 IMPORT_C ~CAknNotifierAppServerApplication(); |
|
38 |
|
39 public: // CAknApplication |
|
40 IMPORT_C void NewAppServerL(CApaAppServer*& aAppServer); |
|
41 IMPORT_C CApaDocument* CreateDocumentL(); |
|
42 }; |
|
43 |
|
44 //---------------------------------- |
|
45 // Document |
|
46 //---------------------------------- |
|
47 class CAknNotifierAppServerDocument : public CAknDocument |
|
48 { |
|
49 public: |
|
50 CAknNotifierAppServerDocument(CEikApplication& aApp):CAknDocument(aApp){}; |
|
51 |
|
52 private: // from CAknDocument |
|
53 CEikAppUi* CreateAppUiL(); |
|
54 }; |
|
55 |
|
56 //---------------------------------- |
|
57 // AppUi |
|
58 //---------------------------------- |
|
59 class CAknNotifierAppServerAppUi : public CAknAppUi |
|
60 { |
|
61 public: |
|
62 IMPORT_C CAknNotifierAppServerAppUi(); |
|
63 IMPORT_C ~CAknNotifierAppServerAppUi(); |
|
64 |
|
65 public: //from CAknAppUi |
|
66 IMPORT_C void ConstructL(); |
|
67 IMPORT_C void HandleCommandL(TInt aCommand); |
|
68 IMPORT_C TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
69 IMPORT_C void SetFadedL(TBool aFade); |
|
70 |
|
71 IMPORT_C TErrorHandlerResponse HandleError( |
|
72 TInt aError, |
|
73 const SExtendedError& aExtErr, |
|
74 TDes& aErrorText, |
|
75 TDes& aContextText); |
|
76 |
|
77 IMPORT_C void HandleSystemEventL(const TWsEvent& aEvent); |
|
78 |
|
79 public: // new methods |
|
80 /** |
|
81 * Command AppUi to suppress appskey, ie. prevent app switch and FSW. |
|
82 * Method is synchronous. |
|
83 * @since 3.0 |
|
84 * @param aSupress Set AppsKey blocked |
|
85 * @return Return KErrNone on success, otherwise system wide error code. |
|
86 */ |
|
87 IMPORT_C TInt SuppressAppSwitching(TBool aSuppress); |
|
88 |
|
89 /** |
|
90 * Set non-standard notifier manager, see Manager(). |
|
91 * Does not take ownership. |
|
92 * @since 3.0 |
|
93 * @param aManager Instance which implements MEikSrvNotifierManager. |
|
94 */ |
|
95 IMPORT_C void SetManager(MEikSrvNotifierManager* aManager); |
|
96 |
|
97 /** |
|
98 * Returns pointer to instance implemeting MEikSrvNotifierManager. |
|
99 * If manager is not set by SetManager() defaults to CEikEnv::AppServer(). |
|
100 * @since 3.0 |
|
101 * @return Pointer instance which acts as MEikSrvNotifierManager in this process. |
|
102 */ |
|
103 IMPORT_C MEikSrvNotifierManager* Manager(); |
|
104 |
|
105 IMPORT_C TBool& EikSrvBlocked(); |
|
106 |
|
107 public: //for internal use |
|
108 void BaseCallFadeL(TBool aFade); |
|
109 CAknNotifierControllerUtility* NotifierControllerUtility(); |
|
110 |
|
111 protected: |
|
112 /** |
|
113 * Sets ordinal position of this application window group (using priority |
|
114 * ECoeAlwaysAtFront). |
|
115 * @since 3.0 |
|
116 */ |
|
117 IMPORT_C void SetOrdinalPositionL(TInt aPosition); |
|
118 |
|
119 private: |
|
120 CAknNotifierManagerExtension* iExtension; |
|
121 }; |
|
122 |
|
123 #endif |
|
124 |
|
125 // End of file |
|
126 |