1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef __MAGNETIC_H__
- #define __MAGNETIC_H__
- #include <sensrvdatalistener.h>
- class MMagneticReader
- {
- public:
- virtual void DataReceivedL(TInt aAngle, TInt aAccuracyLevel) = 0;
- };
- class CSensorFinder : public CBase, public MSensrvDataListener
- {
- public:
- static CSensorFinder* NewL(MMagneticReader& aReader);
- virtual ~CSensorFinder();
- public: // MSensorDataListener
- void DataReceived( CSensrvChannel& aChannel, TInt aCount, TInt aDataLost );
- void DataError( CSensrvChannel& aChannel, TSensrvErrorSeverity aError );
- void GetDataListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface );
-
- private:
- CSensorFinder(MMagneticReader& aReader);
- void ConstructL();
- private://data
- CSensrvChannel* iMagneticNorthSensor;
- MMagneticReader& iDataObserver;
-
- TInt iMagnetometerCalibrationLevel;
- TInt iMagnetometerAngleFromNorth;
- };
- #endif /* __MAGNETIC_H__ */
|