|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef MMRCSERVER_H__ |
|
17 #define MMRCSERVER_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <e32base.h> |
|
21 #include <a3f/a3fbase.h> |
|
22 #include <e32msgqueue.h> |
|
23 #include "mmrcclientserver.h" |
|
24 |
|
25 /** |
|
26 * @file |
|
27 * @internalTechnology |
|
28 */ |
|
29 |
|
30 class TServerStart; |
|
31 class CMMRCServerSession; |
|
32 class CMMRCServerController; |
|
33 class MMultimediaResourceControlObserver; |
|
34 class CFourCCConvertor; |
|
35 |
|
36 // reasons for server panic |
|
37 enum TCountServPanic |
|
38 { |
|
39 EBadRequest = 1, |
|
40 EBadDescriptor |
|
41 }; |
|
42 |
|
43 /** |
|
44 @internalComponent |
|
45 |
|
46 This class implements the MMRC Server. |
|
47 The main purpose of this class is to implement the MMRC Server |
|
48 */ |
|
49 NONSHARABLE_CLASS( CMMRCServer ): public CServer2 |
|
50 { |
|
51 public: |
|
52 /** |
|
53 * Constructs, and returns a pointer to, a new CMMRCServer object. |
|
54 * Leaves on failure. |
|
55 * @return CMMRCServer* A pointer to newly created utlitly object. |
|
56 */ |
|
57 static CMMRCServer* NewL(); |
|
58 |
|
59 /** |
|
60 * Constructs, leaves object on the cleanup stack, and returns a pointer |
|
61 * to, a new CMMRCServer object. |
|
62 * Leaves on failure. |
|
63 * @return CMMRCServer* A pointer to newly created utlitly object. |
|
64 */ |
|
65 static CMMRCServer* NewLC(); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 ~CMMRCServer(); |
|
71 |
|
72 public: |
|
73 // The thread function executed by the server |
|
74 static TInt ThreadFunction(TAny* aStarted); |
|
75 |
|
76 // Creates a new session with the server; the function |
|
77 // implements the pure virtutal function |
|
78 // defined in class CServer2 |
|
79 CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const; |
|
80 private : |
|
81 // The thread function executed by the server |
|
82 static TInt ThreadFunctionL(TAny* aStarted); |
|
83 |
|
84 // Function to panic the server |
|
85 static void PanicServer(TInt aPanic); |
|
86 |
|
87 /** |
|
88 * By default Symbian 2nd phase constructor is private. |
|
89 */ |
|
90 CMMRCServer(); |
|
91 |
|
92 /** |
|
93 * By default Symbian 2nd phase constructor is private. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 private: |
|
98 // owned |
|
99 CMMRCServerController* iMMRCServerController; //MMRC Server controller |
|
100 |
|
101 //Not ownwed. |
|
102 CFourCCConvertor* iFourCCConvertor; |
|
103 |
|
104 }; |
|
105 |
|
106 #endif //__MMRCSERVER_H__ |