Nokia N97 SDK
Example Applications Guide

sensorexampledatalistener.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : sensorexampledatalistener.h
00004 *  Part of     : sensorexample
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2007, 2008 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef SENSOREXAMPLEDATALISTENER_H
00017 #define SENSOREXAMPLEDATALISTENER_H
00018 
00019 #include <sensrvdatalistener.h>
00020 
00021 // FORWARD DECLARATIONS
00022 class CSensorExampleAppView;
00023 
00024 // CLASS DECLARATION
00025 
00026 /**
00027 * Data listener implementation
00028 * Callback interface to indicate when new data is available.
00029 */
00030 class CSensorExampleDataListener : public CBase,
00031                                    public MSensrvDataListener
00032     {
00033 public:
00034 
00035    /**
00036     * Two-phase constructor
00037     */
00038     static CSensorExampleDataListener* NewL( CSensorExampleAppView* aAppView );
00039 
00040    /**
00041     * Destructor.
00042     */
00043     virtual ~CSensorExampleDataListener();
00044 
00045 public://From MSensorDataListener
00046 
00047     void DataReceived( CSensrvChannel& aChannel,
00048                        TInt aCount,
00049                        TInt aDataLost );
00050 
00051     void DataError( CSensrvChannel& aChannel,
00052                     TSensrvErrorSeverity aError );
00053                     
00054     void GetDataListenerInterfaceL( TUid aInterfaceUid, 
00055                                     TAny*& aInterface );
00056 
00057 private:
00058 
00059    /**
00060     * C++ constructor
00061     */
00062     CSensorExampleDataListener( CSensorExampleAppView* aAppView );
00063 
00064 private://data
00065 
00066     CSensorExampleAppView* iAppView; //Not own
00067 
00068     };
00069 
00070 #endif //SENSOREXAMPLEDATALISTENER

© Nokia 2009

Back to top