|
1 // Copyright (c) 2008-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 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef MMCAMERASERVER_H |
|
22 #define MMCAMERASERVER_H |
|
23 |
|
24 #include "mmcameraclientinterface.h" |
|
25 #include "mmcameraserverpolicymanager.h" |
|
26 |
|
27 const TInt KECamServMajorVerNumber = 0; |
|
28 const TInt KECamServMinorVerNumber = 0; |
|
29 const TInt KECamServBuildVerNumber = KUidMMCameraServerID; |
|
30 |
|
31 class CMMCameraServerController; |
|
32 class CMMCameraServerControllerQuery; |
|
33 class CMMCameraServerShutdown; |
|
34 |
|
35 /** |
|
36 * Standard server class derived from CServer2 to construct the server and manage connecting clients. |
|
37 * |
|
38 * Also creates policy manager and camera controller to be used by client sessions. |
|
39 */ |
|
40 class CMMCameraServer : CServer2 |
|
41 { |
|
42 friend class CMMCameraServerSession; |
|
43 |
|
44 public: |
|
45 static CMMCameraServer* NewLC(); //symbian doc says CServer2 should be returned ??? |
|
46 |
|
47 ~CMMCameraServer(); |
|
48 |
|
49 void AddSession(); |
|
50 void DropSession(); |
|
51 |
|
52 inline CMMCameraServerPolicyManager* PolicyManager() {return iPolicyManager;}; |
|
53 |
|
54 protected: |
|
55 virtual TInt RunError(TInt aError); |
|
56 |
|
57 private: |
|
58 CMMCameraServer(); // Named Constructor Idiom concept used |
|
59 |
|
60 void ConstructL(); |
|
61 |
|
62 CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
|
63 void PanicClient(const RMessage2& aMessage, TServerPanic aPanic); |
|
64 |
|
65 void GetCameraControllerL(TInt aCameraIndex, CMMCameraServerController*& aCameraController); |
|
66 void GetCameraControllerQueryL(CMMCameraServerControllerQuery*& aCameraControllerQuery); |
|
67 |
|
68 private: |
|
69 TInt iCamSessionCount; |
|
70 |
|
71 TDblQue<CMMCameraServerController> iCamControllerQ; //Double link list of CMMCameraServerController |
|
72 CMMCameraServerPolicyManager* iPolicyManager; |
|
73 CMMCameraServerShutdown* iShutdown; |
|
74 }; |
|
75 |
|
76 #endif // MMCAMERASERVER_H |