sensorservices/orientationssy/src/SsyProperty.cpp
branchRCL_3
changeset 22 8cb079868133
parent 21 ccb4f6b3db21
equal deleted inserted replaced
21:ccb4f6b3db21 22:8cb079868133
    50     {
    50     {
    51     SSY_TRACE_IN();
    51     SSY_TRACE_IN();
    52 
    52 
    53     for ( TInt index = 0; index < aNumberOfProperties ; index++ )
    53     for ( TInt index = 0; index < aNumberOfProperties ; index++ )
    54         {
    54         {
    55         if(iChannelProperties.Append( aProperties[ index ])!= KErrNone )
    55         iChannelProperties.Append( aProperties[ index ] );
    56         {
       
    57          iChannelProperties.Reset();
       
    58          break;
       
    59         }
       
    60         }
    56         }
    61 
    57 
    62     SSY_TRACE_OUT();
    58     SSY_TRACE_OUT();
    63     }
    59     }
    64 
    60 
   299         returnValue = KErrGeneral;
   295         returnValue = KErrGeneral;
   300         }
   296         }
   301 
   297 
   302     else if ( aProperty.GetPropertyId() == KSensrvPropIdDataRate )
   298     else if ( aProperty.GetPropertyId() == KSensrvPropIdDataRate )
   303         {
   299         {
   304         // Since Orientation is an event, the data rate property is made readonly.
   300         SSY_TRACE( EExtended, "ORIENTATIONSSY: Updating data rate property" );
   305         // In ssyconfiguration.h file, the datarate property is defined as writable,
   301         // Data rate property is replaced in a different way than others.
   306         // it is not modified due to backward compatibility. 
   302         // Note that this can be done only once as this property is set to read only.
   307         // Now it is changed and the orientation channel property is made readonly always.
   303         aProperty.GetValue( intValue );
   308         
   304         // Leave value to 0, update only max value because that is the only value we can provide
   309         if( iChannelProperties.Count() >= index )
   305         if( iChannelProperties.Count() >= index )
   310             {
   306             {
       
   307             iChannelProperties[index].iIntMaxValue = intValue;
   311             iChannelProperties[index].iReadOnly = ETrue;
   308             iChannelProperties[index].iReadOnly = ETrue;
   312             }
   309             }
   313         
   310         
   314         // No need to get data rate anymore as it's already got
   311         // No need to get data rate anymore as it's already got
   315         iDataRateUpdate = ETrue;
   312         iDataRateUpdate = ETrue;