|
1 /* |
|
2 * Copyright (c) 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSMANAGERSERVER_H |
|
20 #define MUSMANAGERSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "musmanagerserverpanics.h" |
|
24 #include "musmanagerservercoreobserver.h" |
|
25 #include "musunittesting.h" |
|
26 |
|
27 class CMusManagerServerCloseTimer; |
|
28 class CMusManagerServerCore; |
|
29 |
|
30 /** |
|
31 * This static class contains the very essential starting functions |
|
32 * of MusManagerServer |
|
33 * |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 class CMusManagerServer |
|
37 : public CPolicyServer, |
|
38 public MMusManagerServerCoreObserver |
|
39 { |
|
40 MUS_UNITTEST( UT_CMusManagerServerSession ) |
|
41 |
|
42 public : |
|
43 |
|
44 // TODO: comments |
|
45 |
|
46 static CMusManagerServer* NewL(); |
|
47 static CMusManagerServer* NewLC(); |
|
48 ~CMusManagerServer(); |
|
49 |
|
50 void IncrementSessions(); |
|
51 void DecrementSessions(); |
|
52 |
|
53 public: // from MMusManagerServerCoreObserver |
|
54 |
|
55 void StopServer(); |
|
56 |
|
57 TUint SessionCount(); |
|
58 |
|
59 protected: // From CActive |
|
60 |
|
61 TInt RunError( TInt aError ); |
|
62 |
|
63 private: // From CServer2 |
|
64 |
|
65 CSession2* NewSessionL( const TVersion &aVersion, |
|
66 const RMessage2& aMessage ) const; |
|
67 |
|
68 private: // Second phase constructors |
|
69 |
|
70 CMusManagerServer( TInt aPriority ); |
|
71 void ConstructL(); |
|
72 |
|
73 private: // Data |
|
74 |
|
75 TUint iSessionCount; |
|
76 |
|
77 CMusManagerServerCloseTimer* iCloseTimer; |
|
78 |
|
79 CActiveScheduler* iActiveScheduler; |
|
80 |
|
81 CMusManagerServerCore* iServerCore; |
|
82 |
|
83 }; |
|
84 |
|
85 #endif // MUSMANAGERSERVER_H |