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