contextframework/cfwplugins/sensorsourceplugin/src/sensorchannelbase.cpp
branchRCL_3
changeset 19 924385140d98
parent 7 fc3225a0ab43
child 20 c2c61fdca848
equal deleted inserted replaced
18:0818dd463d41 19:924385140d98
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  CSensorChannelBase class implementation.
    14 * Description:  CSensorChannelBase class implementation.
    15 *
    15 *
    16 *  
       
    17 */
    16 */
    18 
    17 
    19 
    18 
    20 #include <sensrvchannel.h>
    19 #include <sensrvchannel.h>
    21 #include <sensrvchannelfinder.h>
    20 #include <sensrvchannelfinder.h>
   234 void CSensorChannelBase::DataReceived( CSensrvChannel& aChannel,
   233 void CSensorChannelBase::DataReceived( CSensrvChannel& aChannel,
   235     TInt aCount,
   234     TInt aCount,
   236     TInt aDataLost )
   235     TInt aDataLost )
   237     {
   236     {
   238     FUNC_LOG;
   237     FUNC_LOG;
   239     
   238 
   240     
   239     TRAP_IGNORE( HandleDataReceivedL( aChannel, aCount, aDataLost ) );
       
   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 ) );
       
   251         // Active connections received, change state
   250         // Active connections received, change state
   252         ChangeState( EChannelStateActive );
   251         ChangeState( EChannelStateActive );
   253         }
   252         }
   254     }
   253     }
   255 
   254 
   630         client = NULL;
   629         client = NULL;
   631         }
   630         }
   632     }
   631     }
   633 
   632 
   634 // End of file
   633 // End of file
   635