|
1 /* |
|
2 * =========================================================================== |
|
3 * Name : hgfswserver.h |
|
4 * Part of : Huriganes / Fast Swap Server |
|
5 * Description : server class |
|
6 * Version : %version: 6 % |
|
7 * |
|
8 * Copyright © 2008 Nokia Corporation. |
|
9 * This material, including documentation and any related |
|
10 * computer programs, is protected by copyright controlled by |
|
11 * Nokia Corporation. All rights are reserved. Copying, |
|
12 * including reproducing, storing, adapting or translating, any |
|
13 * or all of this material requires the prior written consent of |
|
14 * Nokia Corporation. This material also contains confidential |
|
15 * information which may not be disclosed to others without the |
|
16 * prior written consent of Nokia Corporation. |
|
17 * =========================================================================== |
|
18 */ |
|
19 |
|
20 #ifndef __HGFSWSERVER_H |
|
21 #define __HGFSWSERVER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "hgfswcommon.h" |
|
25 #include "hgfswobservers.h" |
|
26 |
|
27 /** |
|
28 * Possible panic reasons. |
|
29 */ |
|
30 enum THgFswPanic |
|
31 { |
|
32 EPanicBadDescriptor, |
|
33 EPanicIllegalFunction, |
|
34 EPanicAccessDenied |
|
35 }; |
|
36 |
|
37 /** |
|
38 * Panic name. |
|
39 */ |
|
40 _LIT( KHgFswPanicName, "hgfsw" ); |
|
41 |
|
42 class CHgFswEngine; |
|
43 class CHgFswAppUi; |
|
44 |
|
45 /** |
|
46 * Hg FastSwap Server. |
|
47 */ |
|
48 class CHgFswServer : public CServer2, public MHgFswEngineObserver |
|
49 { |
|
50 public: |
|
51 static CHgFswServer* NewLC( CHgFswAppUi& aAppUi ); |
|
52 ~CHgFswServer(); |
|
53 void AddSession(); |
|
54 void DropSession(); |
|
55 |
|
56 void SerializeAndGetBufferSizeL( const RMessage2& aMessage ); |
|
57 void GetBufferL( const RMessage2& aMessage ); |
|
58 void CloseAppL( TInt aWgId ); |
|
59 void SwitchToAppL( TInt aWgId ); |
|
60 void ForegroundAppUidL( const RMessage2& aMessage ); |
|
61 |
|
62 private: |
|
63 CHgFswServer( TInt aPriority, CHgFswAppUi& aAppUi ); |
|
64 void ConstructL(); |
|
65 CSession2* NewSessionL( const TVersion& aVersion, |
|
66 const RMessage2& aMessage ) const; |
|
67 |
|
68 // from MHgFswEngineObserver |
|
69 void FswDataChanged(); |
|
70 TInt FswDataListenerCount(); |
|
71 |
|
72 private: |
|
73 TInt iSessionCount; |
|
74 CHgFswEngine* iEngine; |
|
75 CBufFlat* iBuffer; |
|
76 CHgFswAppUi& iAppUi; |
|
77 }; |
|
78 |
|
79 #endif |