sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef MMCAMERASERVER_H sl@0: #define MMCAMERASERVER_H sl@0: sl@0: #include "mmcameraclientinterface.h" sl@0: #include "mmcameraserverpolicymanager.h" sl@0: sl@0: const TInt KECamServMajorVerNumber = 0; sl@0: const TInt KECamServMinorVerNumber = 0; sl@0: const TInt KECamServBuildVerNumber = KUidMMCameraServerID; sl@0: sl@0: class CMMCameraServerController; sl@0: class CMMCameraServerControllerQuery; sl@0: class CMMCameraServerShutdown; sl@0: sl@0: /** sl@0: * Standard server class derived from CServer2 to construct the server and manage connecting clients. sl@0: * sl@0: * Also creates policy manager and camera controller to be used by client sessions. sl@0: */ sl@0: class CMMCameraServer : CServer2 sl@0: { sl@0: friend class CMMCameraServerSession; sl@0: sl@0: public: sl@0: static CMMCameraServer* NewLC(); //symbian doc says CServer2 should be returned ??? sl@0: sl@0: ~CMMCameraServer(); sl@0: sl@0: void AddSession(); sl@0: void DropSession(); sl@0: sl@0: inline CMMCameraServerPolicyManager* PolicyManager() {return iPolicyManager;}; sl@0: sl@0: protected: sl@0: virtual TInt RunError(TInt aError); sl@0: sl@0: private: sl@0: CMMCameraServer(); // Named Constructor Idiom concept used sl@0: sl@0: void ConstructL(); sl@0: sl@0: CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; sl@0: void PanicClient(const RMessage2& aMessage, TServerPanic aPanic); sl@0: sl@0: void GetCameraControllerL(TInt aCameraIndex, CMMCameraServerController*& aCameraController); sl@0: void GetCameraControllerQueryL(CMMCameraServerControllerQuery*& aCameraControllerQuery); sl@0: sl@0: private: sl@0: TInt iCamSessionCount; sl@0: sl@0: TDblQue iCamControllerQ; //Double link list of CMMCameraServerController sl@0: CMMCameraServerPolicyManager* iPolicyManager; sl@0: CMMCameraServerShutdown* iShutdown; sl@0: }; sl@0: sl@0: #endif // MMCAMERASERVER_H