examples/SFExamples/RecipeEx/inc/SensorListener.h

00001 // Symbian Foundation Example Code
00002 // 
00003 // This software is in the public domain. No copyright is claimed, and you 
00004 // may use it for any purpose without license from the Symbian Foundation.
00005 // No warranty for any purpose is expressed or implied by the authors or
00006 // the Symbian Foundation. 
00007 
00008 
00009 #ifndef __SENSORLISTENER_H__
00010 #define __SENSORLISTENER_H__
00011 
00012 #include <e32base.h>    
00013 #include <e32std.h>     
00014 #include <SensrvDataListener.h> 
00015 
00016 
00017 // Forward declarations
00018 class CLogContainer;
00019 class CSensrvChannelFinder;
00020 class CSensrvChannel;
00021 
00029 class CSensorListener
00030         : public CBase
00031         , private MSensrvDataListener
00032         {
00033 public: // Construction / Destruction
00034 
00038         static CSensorListener* NewL(CLogContainer* aLogView);
00039 
00043         static CSensorListener* NewLC(CLogContainer* aLogView);
00044 
00046         virtual ~CSensorListener();
00047 
00048 private:
00049         
00053         CSensorListener(CLogContainer* aLogView);
00054 
00056         void ConstructL();
00057         
00058 public:
00059         
00061         void StartListeningL();
00062         
00064         void StopListeningL();
00065 
00066 private:  // From MSensrvDataListener
00067 
00084         void DataReceived( CSensrvChannel& aChannel, 
00085                                                            TInt aCount, 
00086                                                            TInt aDataLost );
00087         
00097         void DataError( CSensrvChannel& aChannel, 
00098                                                         TSensrvErrorSeverity aError );
00099         
00108         void GetDataListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface );        
00109 
00110 private:
00111         
00113         CLogContainer* iLogView;
00114         
00116         CSensrvChannelFinder* iSensrvChannelFinder;     
00117         
00119         RSensrvChannelInfoList iChannelInfoList;
00120         
00122         CSensrvChannel* iSensrvChannel;
00123         
00125         TTime iLastTime;
00126         
00127         };
00128 
00129 
00130 #endif // __DEVICECAPABILITIESSCAN_H__
00131 
00132 
00133 // End of File
00134 

Generated by  doxygen 1.6.2