coreapplicationuis/SysAp/Src/SysApSimChanged.cpp
branchRCL_3
changeset 63 c2c61fdca848
parent 62 924385140d98
equal deleted inserted replaced
62:924385140d98 63:c2c61fdca848
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include "SysApSimChanged.h"
    20 #include "SysApSimChanged.h"
    21 #include "SysApAppUi.h"
    21 #include "SysApAppUi.h"
    22 #include <settingsinternalcrkeys.h>
    22 #include <settingsinternalcrkeys.h>
    23 //#include <LogsDomainCRKeys.h>
    23 #include <LogsDomainCRKeys.h>
    24 #include <logcli.h>
    24 #include <logcli.h>
    25 #include <centralrepository.h>
    25 #include <centralrepository.h>
    26 const TInt KPSetDefaultCFTimer = 30;
    26 const TInt KPSetDefaultCFTimer = 30;
    27 #include <rsssettings.h>
    27 #include <RSSSettings.h>
    28 #include <startupdomainpskeys.h>
    28 #include <startupdomainpskeys.h>
    29 #include <PSVariables.h>
    29 #include <PSVariables.h>
    30 #include "SysAp.hrh"
    30 #include "SysAp.hrh"
    31 //  LOCAL CONSTANTS AND MACROS  
    31 //  LOCAL CONSTANTS AND MACROS  
    32 
    32 
    69 // CSysApSimChanged::ClearRepositoriesL()
    69 // CSysApSimChanged::ClearRepositoriesL()
    70 // -----------------------------------------------------------------------------
    70 // -----------------------------------------------------------------------------
    71 
    71 
    72 void CSysApSimChanged::ClearRepositoriesL()
    72 void CSysApSimChanged::ClearRepositoriesL()
    73     {
    73     {
    74     const TUid KCRUidLogs = {0x101F874E};
       
    75     /**
       
    76     * Informs the Logs application about the amount of new missed calls.
       
    77     * Integer type
       
    78     **/
       
    79     const TUint32 KLogsNewMissedCalls = 0x00000006;
       
    80     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearRepositoriesL(): opening KCRUidCallForwarding") ) );
    74     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearRepositoriesL(): opening KCRUidCallForwarding") ) );
    81     
    75     
    82     CRepository* repository = CRepository::NewL( KCRUidCallForwarding );
    76     CRepository* repository = CRepository::NewL( KCRUidCallForwarding );
    83     
    77     
    84     repository->Set( KSettingsCFDefaultNumber1, KNullDesC );
    78     repository->Set( KSettingsCFDefaultNumber1, KNullDesC );
   115     
   109     
   116     TDateTime dateTime;
   110     TDateTime dateTime;
   117     dateTime.Set( 2100, EJanuary, 1, 0, 0, 0, 0 );
   111     dateTime.Set( 2100, EJanuary, 1, 0, 0, 0, 0 );
   118     TTime date(dateTime);
   112     TTime date(dateTime);
   119     
   113     
   120 /*    TRACES( RDebug::Print( _L("CSysApSimChanged::ClearLogsL(): trying CLogClient::NewL") ) );
   114     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearLogsL(): trying CLogClient::NewL") ) );
   121     CLogClient* logClient = CLogClient::NewL( iFs );    
   115     CLogClient* logClient = CLogClient::NewL( iFs );    
   122     logClient->ClearLog( date, active->iStatus );
   116     logClient->ClearLog( date, active->iStatus );
   123 */    
   117     
   124     CActiveScheduler::Start();
   118     CActiveScheduler::Start();
   125 
   119 
   126 //    delete logClient;
   120     delete logClient;
   127     CleanupStack::PopAndDestroy( active );
   121     CleanupStack::PopAndDestroy( active );
   128     }
   122     }
   129     
   123     
   130 // -----------------------------------------------------------------------------
   124 // -----------------------------------------------------------------------------
   131 // CSysApSimChanged::ClearSsSettingsL()
   125 // CSysApSimChanged::ClearSsSettingsL()
   134 void CSysApSimChanged::ClearSsSettingsL()
   128 void CSysApSimChanged::ClearSsSettingsL()
   135     {
   129     {
   136     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearSsSettingsL()") ) );
   130     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearSsSettingsL()") ) );
   137     
   131     
   138     // Reset SSSettings values
   132     // Reset SSSettings values
   139 /*    RSSSettings ssSettings;
   133     RSSSettings ssSettings;
   140     User::LeaveIfError( ssSettings.Open( iSysApAppUi.GetTelServer() ) );
   134     User::LeaveIfError( ssSettings.Open( iSysApAppUi.GetTelServer() ) );
   141     
   135     
   142     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearSsSettingsL(): trying RSSSettings::HandleSIMChanged") ) );
   136     TRACES( RDebug::Print( _L("CSysApSimChanged::ClearSsSettingsL(): trying RSSSettings::HandleSIMChanged") ) );
   143     TInt err = ssSettings.HandleSIMChanged();
   137     TInt err = ssSettings.HandleSIMChanged();
   144     ssSettings.Close();    
   138     ssSettings.Close();    
   145     
   139     
   146     User::LeaveIfError( err );
   140     User::LeaveIfError( err );
   147 */
       
   148     }
   141     }
   149 
   142 
   150 // -----------------------------------------------------------------------------
   143 // -----------------------------------------------------------------------------
   151 // CSysApSimChanged::HandleSimChangedL()
   144 // CSysApSimChanged::HandleSimChangedL()
   152 // -----------------------------------------------------------------------------
   145 // -----------------------------------------------------------------------------
   169     
   162     
   170     // Other repositories are cleared only if an unknown SIM has been inserted    
   163     // Other repositories are cleared only if an unknown SIM has been inserted    
   171     if ( simNotOwned )
   164     if ( simNotOwned )
   172         {
   165         {
   173         ClearRepositoriesL();
   166         ClearRepositoriesL();
   174 //        ClearLogsL();
   167         ClearLogsL();
   175         }
   168         }
   176     }
   169     }
   177 // =============== CShareActive MEMBER FUNCTIONS ===============================
   170 // =============== CShareActive MEMBER FUNCTIONS ===============================
   178 
   171 
   179 // -----------------------------------------------------------------------------
   172 // -----------------------------------------------------------------------------