os/mm/mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,76 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @internalTechnology
    1.22 +*/
    1.23 +
    1.24 +#ifndef MMCAMERASERVER_H
    1.25 +#define MMCAMERASERVER_H
    1.26 +
    1.27 +#include "mmcameraclientinterface.h"
    1.28 +#include "mmcameraserverpolicymanager.h"
    1.29 +
    1.30 +const TInt KECamServMajorVerNumber = 0;
    1.31 +const TInt KECamServMinorVerNumber = 0;
    1.32 +const TInt KECamServBuildVerNumber = KUidMMCameraServerID;
    1.33 +
    1.34 +class CMMCameraServerController;
    1.35 +class CMMCameraServerControllerQuery;
    1.36 +class CMMCameraServerShutdown;
    1.37 +
    1.38 +/**
    1.39 + * Standard server class derived from CServer2 to construct the server and manage connecting clients.
    1.40 + * 
    1.41 + * Also creates policy manager and camera controller to be used by client sessions.
    1.42 + */
    1.43 +class CMMCameraServer : CServer2
    1.44 +	{
    1.45 +friend class CMMCameraServerSession;
    1.46 +
    1.47 +public:
    1.48 +	static CMMCameraServer* NewLC(); //symbian doc says CServer2 should be returned ???
    1.49 +
    1.50 +	~CMMCameraServer();
    1.51 +
    1.52 +	void AddSession();
    1.53 +	void DropSession();
    1.54 +
    1.55 +	inline CMMCameraServerPolicyManager* PolicyManager() {return iPolicyManager;};
    1.56 +
    1.57 +protected:
    1.58 +	virtual TInt RunError(TInt aError);
    1.59 +
    1.60 +private:
    1.61 +	CMMCameraServer();   // Named Constructor Idiom concept used
    1.62 +
    1.63 +	void ConstructL();
    1.64 +
    1.65 +	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
    1.66 +	void PanicClient(const RMessage2& aMessage, TServerPanic aPanic);
    1.67 +
    1.68 +	void GetCameraControllerL(TInt aCameraIndex, CMMCameraServerController*& aCameraController);
    1.69 +	void GetCameraControllerQueryL(CMMCameraServerControllerQuery*& aCameraControllerQuery);
    1.70 +
    1.71 +private:
    1.72 +	TInt iCamSessionCount;
    1.73 +
    1.74 +	TDblQue<CMMCameraServerController> iCamControllerQ;   //Double link list of CMMCameraServerController 
    1.75 +	CMMCameraServerPolicyManager* iPolicyManager;
    1.76 +	CMMCameraServerShutdown* iShutdown;
    1.77 +	};
    1.78 +
    1.79 +#endif // MMCAMERASERVER_H