diff -r 3ab5c078b490 -r 0b3699f6c654 taskswitcher/screenshotplugin/inc/tsorientationmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taskswitcher/screenshotplugin/inc/tsorientationmonitor.h Fri Sep 17 08:32:18 2010 +0300 @@ -0,0 +1,60 @@ +/* +* Copyright (c) 2008 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: +* +*/ +#ifndef TSORIENTATIONMONITOR_H +#define TSORIENTATIONMONITOR_H +#include +#include +#include "tsorientationobserver.h" + +class CRepository; + +class CTsOrientationMonitor: public CActive, + public MSensrvDataListener + { +public: + static CTsOrientationMonitor* NewL( MTsOrientationObserver& aObserver ); + ~CTsOrientationMonitor(); + +private: + CTsOrientationMonitor( MTsOrientationObserver& aObserver ); + void ConstructL(); + void SubscribeL(); + void StartSensorMonitoringL(); + void StopSensorMonitoring(); + +private://from CActive + void DoCancel(); + void RunL(); + TInt RunError(TInt aError); + +public: + void DataReceived( CSensrvChannel& aChannel, + TInt aCount, + TInt aDataLost ); + + void DataError( CSensrvChannel& aChannel, + TSensrvErrorSeverity aError ); + + void GetDataListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ); + +private: + MTsOrientationObserver& iObserver; + CRepository* iRepository; + CSensrvChannel* iChannel; + + }; +#endif //TSORIENTATIONMONITOR_H