mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraserver.h
author Tapani Kanerva <tapani.kanerva@nice.fi>
Tue, 16 Nov 2010 14:11:25 +0200
branchRCL_3
changeset 67 b35006be8823
parent 0 40261b775718
permissions -rw-r--r--
Bug 3673 - Seeking via grabbing the Music Player progress bar does not work.

// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

/**
 @file
 @internalTechnology
*/

#ifndef MMCAMERASERVER_H
#define MMCAMERASERVER_H

#include "mmcameraclientinterface.h"
#include "mmcameraserverpolicymanager.h"

const TInt KECamServMajorVerNumber = 0;
const TInt KECamServMinorVerNumber = 0;
const TInt KECamServBuildVerNumber = KUidMMCameraServerID;

class CMMCameraServerController;
class CMMCameraServerControllerQuery;
class CMMCameraServerShutdown;

/**
 * Standard server class derived from CServer2 to construct the server and manage connecting clients.
 * 
 * Also creates policy manager and camera controller to be used by client sessions.
 */
class CMMCameraServer : CServer2
	{
friend class CMMCameraServerSession;

public:
	static CMMCameraServer* NewLC(); //symbian doc says CServer2 should be returned ???

	~CMMCameraServer();

	void AddSession();
	void DropSession();

	inline CMMCameraServerPolicyManager* PolicyManager() {return iPolicyManager;};

protected:
	virtual TInt RunError(TInt aError);

private:
	CMMCameraServer();   // Named Constructor Idiom concept used

	void ConstructL();

	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
	void PanicClient(const RMessage2& aMessage, TServerPanic aPanic);

	void GetCameraControllerL(TInt aCameraIndex, CMMCameraServerController*& aCameraController);
	void GetCameraControllerQueryL(CMMCameraServerControllerQuery*& aCameraControllerQuery);

private:
	TInt iCamSessionCount;

	TDblQue<CMMCameraServerController> iCamControllerQ;   //Double link list of CMMCameraServerController 
	CMMCameraServerPolicyManager* iPolicyManager;
	CMMCameraServerShutdown* iShutdown;
	};

#endif // MMCAMERASERVER_H