mmshplugins/mmshsettingsuiplugin/src/mussettingsplugin.cpp
branchRCL_3
changeset 16 ce86b6d44a6d
parent 10 a184f3d659e6
child 22 73a1feb507fb
equal deleted inserted replaced
15:95754dcd27ad 16:ce86b6d44a6d
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  MUSSettingsPlugin implementation.
    14 * Description:  MUSSettingsPlugin implementation.
    15 *  Version     : %version: 36 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: be1sipx1#38 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
    20 
   612                         if( enabled ) //currently enabled => disable
   612                         if( enabled ) //currently enabled => disable
   613                             {
   613                             {
   614                             TRAPD( error, iHandler->DisableProfileL() );
   614                             TRAPD( error, iHandler->DisableProfileL() );
   615                             MUS_LOG1( "[MUSSET]   VS is off (err=%d)", error )
   615                             MUS_LOG1( "[MUSSET]   VS is off (err=%d)", error )
   616                             //activation disabled = true
   616                             //activation disabled = true
   617                             //to remove warning :)
       
   618                             enabled = error != KErrNone ? ETrue : ETrue;
       
   619                             iModel->SetActivationItem( enabled );
   617                             iModel->SetActivationItem( enabled );
       
   618                             
       
   619                             if ( error == KErrNone )
       
   620                             	{
       
   621 								MUS_LOG( "[MUSSET]    Activation setting set off" )
       
   622 								//MusSettingsKeys::ENever = 2 can not be used anymore
       
   623 								//EActiveInHomeNetworks = 1 is used instead -> off
       
   624 								MultimediaSharingSettings::SetActivationSettingL(
       
   625 												MusSettingsKeys::EActiveInHomeNetworks );
       
   626 								}
   620                             }
   627                             }
   621                         else//currently disabled => enable
   628                         else//currently disabled => enable
   622                             {
   629                             {
   623                             TRAPD( error, iHandler->EnableProfileL() );
   630                             TRAPD( error, iHandler->EnableProfileL() );
   624                             MUS_LOG1( "[MUSSET]   VS is on (err=%d)", error )
   631                             MUS_LOG1( "[MUSSET]   VS is on (err=%d)", error )
   625                             //if failed activation disabled = true
   632                             //if failed activation disabled = true
   626                             enabled = error != KErrNone;
   633                             enabled = error != KErrNone;
   627                             //activation disabled = false/true(if failed)
   634                             //activation disabled = false/true(if failed)
   628                             iModel->SetActivationItem( enabled );
   635                             iModel->SetActivationItem( enabled );
   629                             }
   636 
       
   637                             if ( error == KErrNone )
       
   638                             	{
       
   639 								MUS_LOG( "[MUSSET]    Activation setting set on" )
       
   640 								MultimediaSharingSettings::SetActivationSettingL(
       
   641 													MusSettingsKeys::EAlwaysActive );
       
   642 								}                            
       
   643                             }             
   630                         }
   644                         }
   631                     }
   645                     }
   632                 }
   646                 }
   633             else
   647             else
   634                 {
   648                 {