|
1 /* |
|
2 * Copyright (c) 2005-2009 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 |
|
19 |
|
20 |
|
21 #ifndef CPOSSERVER_H |
|
22 #define CPOSSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <connect/sbdefs.h> |
|
27 #include "epos_mposmodulesettingslistener.h" |
|
28 |
|
29 #include "EPos_CPosBackupListener.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSession2; |
|
33 class CPosModuleSettings; |
|
34 class CPosModulesStatus; |
|
35 class CPosServerDelayedShutdown; |
|
36 class CPosLocMonitorReqHandlerHub; |
|
37 class CPosBackupListener; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 |
|
42 /** |
|
43 * The main server side class. |
|
44 */ |
|
45 class CPosServer : public CPolicyServer, |
|
46 public MPosModuleSettingsListener, |
|
47 public MPosBackupEventCallback |
|
48 { |
|
49 private: |
|
50 CPosServer(TInt aPriority, const TPolicy &aPolicy, TServerType aServerType = ESharableSessions); |
|
51 void ConstructL(); |
|
52 CPosServer( const CPosServer& ); |
|
53 CPosServer& operator= ( const CPosServer& ); |
|
54 |
|
55 CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
|
56 TBool FindRootProcess(); |
|
57 |
|
58 public: // Constructors and destructor |
|
59 static CPosServer* NewL(); |
|
60 ~CPosServer(); |
|
61 |
|
62 // Functions from base classes |
|
63 void HandleModuleSettingsChangedL(TPosModulesEvent aEvent); |
|
64 void HandleBackupOperationEventL(); |
|
65 |
|
66 // New functions |
|
67 /** |
|
68 * This magic number has its origin in Symbian development. |
|
69 * It is they have some explaining to do, not us. |
|
70 */ |
|
71 enum |
|
72 { |
|
73 EPriority=950 |
|
74 }; |
|
75 |
|
76 void IncrementSessions(); |
|
77 void DecrementSessions(); |
|
78 |
|
79 |
|
80 protected: |
|
81 CPolicyServer::TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing); |
|
82 |
|
83 private: // Data |
|
84 CPosServerDelayedShutdown* iShutdown; |
|
85 CPosModuleSettings* iModuleSettings; |
|
86 TInt iNumSessions; |
|
87 TTimeIntervalMicroSeconds32 iServerShutdownDelay; |
|
88 CPosModulesStatus* iModulesStatus; |
|
89 CPosBackupListener* iBackupListener; |
|
90 CPosLocMonitorReqHandlerHub* iLocMonitorReqHandlerHub; |
|
91 }; |
|
92 |
|
93 #endif // CPOSSERVER_H |
|
94 |
|
95 // End of File |
|
96 |