ipsservices/ipssossettings/src/ipssetdata.cpp
changeset 4 e7aa27f58ae1
parent 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
3:a4d6f1ea0416 4:e7aa27f58ae1
   743         iExtendedSettings->SelectedTimeStart() :
   743         iExtendedSettings->SelectedTimeStart() :
   744         iExtendedSettings->SelectedTimeStop();
   744         iExtendedSettings->SelectedTimeStop();
   745     }
   745     }
   746 
   746 
   747 // ---------------------------------------------------------------------------
   747 // ---------------------------------------------------------------------------
   748 // CIpsSetData::Roaming()
       
   749 // ---------------------------------------------------------------------------
       
   750 //
       
   751 TBool CIpsSetData::Roaming() const
       
   752     {
       
   753     FUNC_LOG;
       
   754     return ( iExtendedSettings->AlwaysOnlineState() == EMailAoHomeOnly ||
       
   755         iExtendedSettings->EmailNotificationState() == EMailEmnHomeOnly );
       
   756     }
       
   757 
       
   758 // ---------------------------------------------------------------------------
       
   759 // CIpsSetData::SetProtocol()
   748 // CIpsSetData::SetProtocol()
   760 // ---------------------------------------------------------------------------
   749 // ---------------------------------------------------------------------------
   761 //
   750 //
   762 void CIpsSetData::SetProtocol( const TUid& aProtocol )
   751 void CIpsSetData::SetProtocol( const TUid& aProtocol )
   763     {
   752     {
  1145         };
  1134         };
  1146         
  1135         
  1147     // Always Online in use        
  1136     // Always Online in use        
  1148     if ( aSchedule >= E5Mins && aSchedule <= E1Day )
  1137     if ( aSchedule >= E5Mins && aSchedule <= E1Day )
  1149         {
  1138         {
  1150         iExtendedSettings->SetAlwaysOnlineState( 
  1139         iExtendedSettings->SetAlwaysOnlineState( EMailAoAlways );
  1151             aRoaming ? EMailAoHomeOnly : EMailAoAlways );
       
  1152         iExtendedSettings->SetInboxRefreshTime( time );
  1140         iExtendedSettings->SetInboxRefreshTime( time );
  1153         iExtendedSettings->SetRoamHomeOnlyFlag( aRoaming );
       
  1154         // set emn off when ao is in use
       
  1155         iExtendedSettings->SetEmailNotificationState( EMailEmnOff );
  1141         iExtendedSettings->SetEmailNotificationState( EMailEmnOff );
  1156         }
  1142         }
  1157     // Set EMN        
  1143     // Set EMN        
  1158     else if ( aSchedule == ENotification )
  1144     else if ( aSchedule == ENotification )
  1159         {
  1145         {
  1160         // set always online state off when emn is on
  1146         // set always online state off when emn is on
  1161         iExtendedSettings->SetAlwaysOnlineState( EMailAoOff );
  1147         iExtendedSettings->SetAlwaysOnlineState( EMailAoOff );
  1162         iExtendedSettings->SetEmailNotificationState( 
  1148         iExtendedSettings->SetEmailNotificationState( EMailEmnAutomatic );
  1163             aRoaming ? EMailEmnHomeOnly : EMailEmnAutomatic );
       
  1164         iExtendedSettings->SetInboxRefreshTime( KErrNotFound );
  1149         iExtendedSettings->SetInboxRefreshTime( KErrNotFound );
  1165         }
  1150         }
  1166     // Manual connection mode        
  1151     // Manual connection mode        
  1167     else
  1152     else
  1168         {
  1153         {