contextframework/cfwplugins/sensorsourceplugin/src/sensorchannelbase.cpp
branchRCL_3
changeset 63 c2c61fdca848
parent 62 924385140d98
equal deleted inserted replaced
62:924385140d98 63:c2c61fdca848
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  CSensorChannelBase class implementation.
    14 * Description:  CSensorChannelBase class implementation.
    15 *
    15 *
       
    16 *  
    16 */
    17 */
    17 
    18 
    18 
    19 
    19 #include <sensrvchannel.h>
    20 #include <sensrvchannel.h>
    20 #include <sensrvchannelfinder.h>
    21 #include <sensrvchannelfinder.h>
   233 void CSensorChannelBase::DataReceived( CSensrvChannel& aChannel,
   234 void CSensorChannelBase::DataReceived( CSensrvChannel& aChannel,
   234     TInt aCount,
   235     TInt aCount,
   235     TInt aDataLost )
   236     TInt aDataLost )
   236     {
   237     {
   237     FUNC_LOG;
   238     FUNC_LOG;
   238 
   239     
   239     TRAP_IGNORE( HandleDataReceivedL( aChannel, aCount, aDataLost ) );
   240     
   240 
       
   241     // If we are fetching initial value, make sure that the channel is closed
   241     // If we are fetching initial value, make sure that the channel is closed
   242     // properly if there are no active connections
   242     // properly if there are no active connections
   243     if( !SensorActive() && iState == EChannelStateInitializing )
   243     if( !SensorActive() && iState == EChannelStateInitializing )
   244         {
   244         {
   245         // Stop data listening and close up channel
   245         // Stop data listening and close up channel
   246         DoStop();
   246         DoStop();
   247         }
   247         }
   248     else
   248     else
   249         {
   249         {
       
   250         TRAP_IGNORE( HandleDataReceivedL( aChannel, aCount, aDataLost ) );
   250         // Active connections received, change state
   251         // Active connections received, change state
   251         ChangeState( EChannelStateActive );
   252         ChangeState( EChannelStateActive );
   252         }
   253         }
   253     }
   254     }
   254 
   255 
   629         client = NULL;
   630         client = NULL;
   630         }
   631         }
   631     }
   632     }
   632 
   633 
   633 // End of file
   634 // End of file
       
   635