os/mm/mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraserversession.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraserversession.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,110 @@
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 +// mmcamerasession.h
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 + @internalTechnology
1.24 +*/
1.25 +
1.26 +#ifndef MMCAMERASERVERSESSION_H
1.27 +#define MMCAMERASERVERSESSION_H
1.28 +
1.29 +#include "mmcameraserver.h"
1.30 +#include "mmcameraserverpolicymanager.h"
1.31 +
1.32 +
1.33 +class CMMCameraServerSession : public CSession2
1.34 + {
1.35 +friend class CCameraServerController;
1.36 +
1.37 +public:
1.38 + CMMCameraServerSession();
1.39 + ~CMMCameraServerSession(); // Close the camera channel. Remove Session from the server list
1.40 +
1.41 + void ServiceL(const RMessage2& aMessage);
1.42 + void CreateL(); // Add Session to the Server list. Should open the camera channel. Set Handle no.
1.43 +
1.44 + // Expose session parameters for use with policy manager
1.45 + TBool CollaborativeClient() const { return iCollaborativeClient; }
1.46 + TBool MMCapability() const { return iMMCapability; }
1.47 + TInt Handle() const { return iHandle; }
1.48 + TInt Priority() const { return iPriority; }
1.49 + TInt CameraIndex() const { return iCameraIndex; }
1.50 +
1.51 + void SetHandle(TInt aHandle);
1.52 + void SetPriority(TInt aPriority);
1.53 + void SetReserved(TBool aReserved);
1.54 + void SetMMCapability(TBool aMMCapability);
1.55 + void CompleteOverthrow();
1.56 + CMMCameraServerController* CameraController(); // Handle to Camera Controller
1.57 +
1.58 +private:
1.59 + void Disconnect(const RMessage2& aMessage);
1.60 +
1.61 + void CamerasAvailable(const RMessage2& aMessage);
1.62 +
1.63 + void OpenCamera(const RMessage2& aMessage);
1.64 +
1.65 + void Reserve(const RMessage2& aMessage);
1.66 + void Release(const RMessage2& aMessage);
1.67 + void CancelReserve(const RMessage2& aMessage);
1.68 +
1.69 + void PowerOn(const RMessage2& aMessage);
1.70 + void PowerOff();
1.71 + void CancelPowerOn();
1.72 +
1.73 + void PrepareDirectViewFinder(const RMessage2& aMessage);
1.74 + void StartDirectViewFinder(const RMessage2& aMessage);
1.75 + void StopDirectViewFinder(const RMessage2& aMessage);
1.76 + void PauseDirectViewFinder(const RMessage2& aMessage);
1.77 + void ResumeDirectViewFinder(const RMessage2& aMessage);
1.78 + void SetDirectViewFinderMirror(const RMessage2& aMessage);
1.79 + void GetDirectViewFinderMirror(const RMessage2& aMessage);
1.80 + void DirectViewFinderState(const RMessage2& aMessage);
1.81 + void DirectViewFinderProperties(const RMessage2& aMessage);
1.82 +
1.83 + void SetCameraParameter(const RMessage2& aMessage);
1.84 + void GetCameraParameter(const RMessage2& aMessage);
1.85 +
1.86 + void CameraHandle(const RMessage2& aMessage);
1.87 +
1.88 +private:
1.89 + CMMCameraServer* Server(); // Handle to Server
1.90 +
1.91 + void PanicClient(const RMessage2& aMessage, TServerPanic aPanic);
1.92 +
1.93 +public:
1.94 + TDblQueLink iCamSessionLink; // Link Object for Policy manager
1.95 +
1.96 +private:
1.97 + CMMCameraServerController* iCameraController; // Handle to Camera Controller
1.98 + CMMCameraServer* iCameraServer;
1.99 + CMMCameraServerPolicyManager* iPolicyManager;
1.100 +
1.101 + TInt iCameraIndex; // details needed
1.102 + TInt iHandle;
1.103 + TInt iPriority;
1.104 + TBool iMMCapability; // comes packed in RMessage2. Checked in open camera call
1.105 + TBool iCollaborativeClient;
1.106 +
1.107 + TBool iReserved;
1.108 + TBool iPoweredUp;
1.109 +
1.110 + RMessagePtr2 iOverthrowMessage;
1.111 + };
1.112 +
1.113 +#endif // MMCAMERASERVERSESSION_H