messagingapp/msgsettings/msginit/src/simscnumberdetector.cpp
branchRCL_3
changeset 57 ebe688cedc25
equal deleted inserted replaced
54:fa1df4b99609 57:ebe688cedc25
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  
       
    15  *     A class which takes care of reading the possible new
       
    16  *     service centres from SIM and adds them to pda-side Sms Settings.
       
    17  *
       
    18  */
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <mtuireg.h>
       
    22 #include <mmlist.h>
       
    23 #include <smutset.h>
       
    24 #include <csmsaccount.h>
       
    25 #include <centralrepository.h>
       
    26 #include <MessagingVariant.hrh>
       
    27 #include <MessagingInternalCRKeys.h>    
       
    28 #include <startupdomainpskeys.h>
       
    29 #include <rcustomerserviceprofilecache.h>
       
    30 
       
    31 #include "coutboxobserver.h"
       
    32 #include "simscnumberdetector.h"
       
    33 #include "startupmonitor.h"
       
    34 
       
    35 #include "debugtraces.h"
       
    36 
       
    37 
       
    38 
       
    39 // ================= MEMBER FUNCTIONS =======================
       
    40 
       
    41 EXPORT_C CMsgSimOperation* CMsgSimOperation::NewL( 
       
    42         MSimOperationObserver& aObserver )
       
    43     {
       
    44     QDEBUG_WRITE("CMsgSimOperation::NewL enter")
       
    45 
       
    46     CMsgSimOperation* self = new (ELeave) CMsgSimOperation(aObserver);
       
    47     CleanupStack::PushL(self);
       
    48     self->ConstructL();
       
    49     CleanupStack::Pop(self);
       
    50 
       
    51     QDEBUG_WRITE("CMsgSimOperation::NewL End")
       
    52     return self;
       
    53 
       
    54 
       
    55     }
       
    56 
       
    57 
       
    58 CMsgSimOperation::CMsgSimOperation(MSimOperationObserver& aObserver) :
       
    59 iRetryCount(0), iObserver(aObserver)
       
    60     {
       
    61     }
       
    62 
       
    63 void CMsgSimOperation::ConstructL()
       
    64     {   
       
    65     QDEBUG_WRITE("CMsgSimOperation::ConstructL enter")
       
    66 
       
    67     iCenRepSession = CRepository::NewL(KCRUidSmum);
       
    68 
       
    69     // initialise
       
    70     iMsvSession = CMsvSession::OpenSyncL(*this);
       
    71    
       
    72     // Observes the OUTBOX for any offline messages...
       
    73     iOutBoxObserver = COutboxObserver::NewL();
       
    74 
       
    75     // Create the SMS Service	
       
    76     TMsvId serviceId = CreateSmsServiceL();
       
    77 
       
    78     // Update the SMS cenrep with the default settings.
       
    79     CreateDefaultSettingsL(serviceId);
       
    80 
       
    81     iClientRegistry = CClientMtmRegistry::NewL(*iMsvSession); 
       
    82     iSmsClientMtm = 
       
    83     STATIC_CAST( CSmsClientMtm*, iClientRegistry->NewMtmL( KUidMsgTypeSMS )); 
       
    84 
       
    85     // Start the System state monitor
       
    86     iStartupMonitor = CStartUpMonitor::NewL(this);
       
    87     
       
    88     // Start the Auto-send AO, to handle offline SMS messages
       
    89     iOutBoxObserver->HandleMsvSessionReadyL(*iMsvSession);
       
    90 
       
    91     QDEBUG_WRITE("CMsgSimOperation::ConstructL exit")
       
    92     }
       
    93 
       
    94 TMsvId CMsgSimOperation::CreateSmsServiceL()
       
    95     {
       
    96     TMsvId serviceEntryId = KMsvNullIndexEntryId;
       
    97     TInt err = KErrNone;
       
    98     TRAP( err, serviceEntryId = ServiceIdL());
       
    99 
       
   100     // If no service, create one
       
   101     if (err == KErrNotFound)
       
   102         {
       
   103         TMsvEntry entry;
       
   104         entry.iMtm = KUidMsgTypeSMS;
       
   105         entry.iType = KUidMsvServiceEntry;
       
   106         entry.SetReadOnly(EFalse);
       
   107         entry.SetVisible(EFalse);
       
   108         entry.iDate.HomeTime();
       
   109         entry.iDetails.Set(KSmsService);
       
   110         CMsvEntry* root = iMsvSession->GetEntryL(KMsvRootIndexEntryId);
       
   111         CleanupStack::PushL(root);
       
   112 
       
   113         // In case no root store, create one...
       
   114         if (!root->HasStoreL())
       
   115             {
       
   116             // --- The entry does not have a store. EditStoreL() will create one ---
       
   117             CMsvStore* store = root->EditStoreL();
       
   118             CleanupStack::PushL(store);
       
   119             store->CommitL();
       
   120             CleanupStack::PopAndDestroy(); // store
       
   121             store = NULL; // destroyed
       
   122             }
       
   123         root->CreateL(entry);
       
   124         CleanupStack::PopAndDestroy(); // root
       
   125         serviceEntryId = entry.Id();
       
   126 
       
   127         }
       
   128     return serviceEntryId;
       
   129     }
       
   130 
       
   131 
       
   132 TMsvId CMsgSimOperation::ServiceIdL()
       
   133     {
       
   134     TMsvId id = KMsvNullIndexEntryId;
       
   135     CMsvEntry* root = iMsvSession->GetEntryL(KMsvRootIndexEntryId);
       
   136     CleanupStack::PushL(root);
       
   137     TSmsUtilities::ServiceIdL(*root, id);
       
   138     CleanupStack::PopAndDestroy(root);
       
   139     return id;
       
   140     }
       
   141 
       
   142 
       
   143 void CMsgSimOperation::CreateDefaultSettingsL(TMsvId aServiceId)
       
   144     {
       
   145     QDEBUG_WRITE("CMsgSimOperation::CreateDefaultSettingsL enter")
       
   146 
       
   147     CSmsSettings* serviceSettings = CSmsSettings::NewL();
       
   148     CleanupStack::PushL(serviceSettings);
       
   149     CSmsAccount* smsAccount = CSmsAccount::NewLC();
       
   150 
       
   151     // Read the RFS related settings from shared data.
       
   152     TInt originalCount = 0;
       
   153     smsAccount->LoadSettingsL(*serviceSettings);
       
   154     originalCount = serviceSettings->ServiceCenterCount();
       
   155 
       
   156     if (!originalCount)
       
   157         {
       
   158         QDEBUG_WRITE("Original count = 0")
       
   159 
       
   160         ReadDefaultSettingsFromSharedDataL(serviceSettings);
       
   161 
       
   162         // Rest of the sms settings, which are fixed.
       
   163         serviceSettings->SetValidityPeriodFormat(TSmsFirstOctet::ESmsVPFInteger); //relative
       
   164         serviceSettings->SetDelivery(ESmsDeliveryImmediately);
       
   165         serviceSettings->SetCanConcatenate(ETrue);
       
   166         serviceSettings->SetStatusReportHandling(CSmsSettings::EMoveReportToInboxInvisible);
       
   167         serviceSettings->SetSpecialMessageHandling(CSmsSettings::EMoveReportToInboxVisible);
       
   168         serviceSettings->SetRejectDuplicate(ETrue);
       
   169         TInt descriptionLength = KSmsDescriptionLength;
       
   170 
       
   171         // Read the value for description length 
       
   172         CRepository* repository = CRepository::NewLC(KCRUidMuiuSettings);
       
   173         if (KErrNone == repository->Get(KMuiuDescriptionLength,
       
   174                 descriptionLength))
       
   175             {
       
   176             //Make sure value is not zero
       
   177             descriptionLength = Max(descriptionLength, KSmsDescriptionLength);
       
   178             }
       
   179         CleanupStack::PopAndDestroy(); // repository
       
   180         serviceSettings->SetDescriptionLength(descriptionLength);
       
   181 
       
   182         // Set saving to commsdb
       
   183         serviceSettings->SetCommDbAction(CSmsSettings::EStoreToCommDb);
       
   184         serviceSettings->SetSmsBearerAction(CSmsSettings::EStoreToCommDb);
       
   185 
       
   186         }
       
   187 
       
   188     // Save settings
       
   189     CMsvEntry* service = iMsvSession->GetEntryL(aServiceId);
       
   190     CleanupStack::PushL(service);
       
   191     CMsvStore* msvstore = service->EditStoreL();
       
   192     CleanupStack::PushL(msvstore);
       
   193 
       
   194     TInt maxTries(5);
       
   195     TBool done(EFalse);
       
   196     while (maxTries && !done)
       
   197         {
       
   198         TRAPD( err, smsAccount->SaveSettingsL( *serviceSettings ) );
       
   199         if (err == KErrNone)
       
   200             {
       
   201             QDEBUG_WRITE("CMsgSimOperation::CreateDefaultSettingsL settings saved")
       
   202 
       
   203             done = ETrue;
       
   204             }
       
   205         else if (err == KErrLocked)
       
   206             {
       
   207             QDEBUG_WRITE("CMsgSimOperation::CreateDefaultSettingsL KErrLocked")
       
   208 
       
   209             // Wait a while and retry.
       
   210             User::After(100000); // 0.1 seconds
       
   211             maxTries--;
       
   212             }
       
   213         else
       
   214             {
       
   215             User::Leave(err);
       
   216             }
       
   217         }
       
   218 
       
   219     msvstore->CommitL();
       
   220     CleanupStack::PopAndDestroy(2); // msvstore, service
       
   221     CleanupStack::PopAndDestroy(2); // serviceSettings, smsAccount
       
   222 
       
   223     QDEBUG_WRITE("CMsgSimOperation::CreateDefaultSettingsL Exit") 
       
   224     }
       
   225 
       
   226 
       
   227 void CMsgSimOperation::
       
   228 ReadDefaultSettingsFromSharedDataL(CSmsSettings* aServiceSettings)
       
   229     {
       
   230     QDEBUG_WRITE("CMsgSimOperation::ReadDefaultSettingsFromSharedDataL Enter") 
       
   231 
       
   232     if ( iCenRepSession )
       
   233         {
       
   234         TInt readedSetting;
       
   235 
       
   236         // Delivery report 
       
   237         if (iCenRepSession->Get(KSmumDeliveryReport, readedSetting) != KErrNone)
       
   238             {
       
   239             readedSetting = KDefDeliveryReport;
       
   240             }
       
   241         aServiceSettings->SetDeliveryReport(readedSetting);
       
   242 
       
   243         // Validity period
       
   244         if (iCenRepSession->Get(KSmumValidityPeriod, readedSetting) != KErrNone)
       
   245             {
       
   246             readedSetting = KDefValidityPeriod;
       
   247             }
       
   248         aServiceSettings->SetValidityPeriod(readedSetting);
       
   249 
       
   250         // Message conversion
       
   251         if (iCenRepSession->Get(KSmumMessageConversion, readedSetting)
       
   252                 != KErrNone)
       
   253             {
       
   254             readedSetting = KDefMessageConversion;
       
   255             }
       
   256         aServiceSettings->SetMessageConversion((TSmsPIDConversion) readedSetting);
       
   257 
       
   258         // Preferred connection
       
   259         if (iCenRepSession->Get(KSmumPreferredConnection, readedSetting)
       
   260                 != KErrNone)
       
   261             {
       
   262             readedSetting = KDefPreferredConnection;
       
   263             }
       
   264         aServiceSettings->SetSmsBearer((CSmsSettings::TMobileSmsBearer) readedSetting);
       
   265 
       
   266         // Check if we need to store SMSC time stamp OR device Time stamp
       
   267         if (iCenRepSession->Get(KSmumShowSMSCTimeStamp, readedSetting) != KErrNone) 
       
   268 					 {
       
   269             readedSetting = 0;
       
   270        		 }
       
   271         aServiceSettings->SetUseServiceCenterTimeStampForDate(readedSetting);
       
   272 
       
   273         // Reply via same centre 
       
   274         if (iCenRepSession->Get(KSmumRemoveReplyViaSameCentre, readedSetting)
       
   275                 != KErrNone)
       
   276             {
       
   277             if (iCenRepSession->Get(KSmumReplyViaSameCentre, readedSetting)
       
   278                     != KErrNone)
       
   279                 {
       
   280                 readedSetting = KDefReplyViaSameCentre;
       
   281                 }
       
   282             }
       
   283         else
       
   284             {
       
   285             if (!readedSetting)
       
   286                 {
       
   287                 if (iCenRepSession->Get(KSmumReplyViaSameCentre, readedSetting)
       
   288                         != KErrNone)
       
   289                     {
       
   290                     readedSetting = KDefReplyViaSameCentre;
       
   291                     }
       
   292                 }
       
   293             }
       
   294         aServiceSettings->SetReplyPath(readedSetting);
       
   295         }
       
   296 
       
   297     QDEBUG_WRITE("CMsgSimOperation::ReadDefaultSettingsFromSharedDataL Exit") 
       
   298 
       
   299     }
       
   300 
       
   301 CMsgSimOperation::~CMsgSimOperation()
       
   302     {
       
   303     QDEBUG_WRITE("CMsgSimOperation::~CMsgSimOperation Enter") 
       
   304     delete iSimOperation;
       
   305     delete iSmsClientMtm;
       
   306     delete iClientRegistry;
       
   307     
       
   308     delete iOutBoxObserver;
       
   309     iOutBoxObserver = NULL;
       
   310     
       
   311     delete iMsvSession;
       
   312     delete iStartupMonitor;
       
   313     iStartupMonitor = NULL;
       
   314     QDEBUG_WRITE("CMsgSimOperation::~CMsgSimOperation Exit") 
       
   315     }
       
   316 
       
   317 void CMsgSimOperation::StartL()
       
   318     {
       
   319 
       
   320     QDEBUG_WRITE("CMsgSimOperation::StartL Enter") 
       
   321 
       
   322     // Retry is used to define the times ReadSimParamsL() is called
       
   323     iRetryCount++;
       
   324 
       
   325     if ( IsSIMPresent() )
       
   326         {
       
   327         if ( HasSIMChanged() || HasNoSmscSettings() )
       
   328             {
       
   329             QDEBUG_WRITE("CMsgSimOperation::StartL Reading sim settings start") 
       
   330 
       
   331             CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC();
       
   332             iSimOperation = iSmsClientMtm->ReadSimParamsL(wait->iStatus);       
       
   333             wait->Start();
       
   334             TInt err = wait->iStatus.Int();
       
   335             StartRunL(err);
       
   336             CleanupStack::PopAndDestroy();
       
   337 						QDEBUG_WRITE("CMsgSimOperation::StartL Reading sim settings end") 
       
   338             }
       
   339         }
       
   340     CompleteClientRequest(0);
       
   341 
       
   342     QDEBUG_WRITE("CMsgSimOperation::StartL Exit")   
       
   343     }
       
   344 
       
   345 void CMsgSimOperation::CompleteClientRequest(TInt /*aValue*/)
       
   346     {
       
   347     iObserver.CompleteOperation();
       
   348     }
       
   349 
       
   350 void CMsgSimOperation::Panic(TSimOperationPanic aPanic)
       
   351     {
       
   352     _LIT(KSimOpPanicCategory, "SIMOP");
       
   353     User::Panic(KSimOpPanicCategory, aPanic);
       
   354     }
       
   355 
       
   356 void CMsgSimOperation::StartRunL(TInt aErr)
       
   357     {
       
   358     QDEBUG_WRITE("CMsgSimOperation::StartRunL Enter") 
       
   359 
       
   360     TInt error = aErr;
       
   361 
       
   362     if (error == KErrNone)
       
   363         { 
       
   364         TRAP( error, DoStartRunL());
       
   365         }
       
   366 
       
   367     // if problems with above; retry 
       
   368     TInt maxRetryCount = KSmumRetryCount;
       
   369     if (error == KErrTimedOut)
       
   370         {
       
   371         QDEBUG_WRITE("CMsgSimOperation::StartRunL ErrorTimed Out")     
       
   372         // no use to retry many times if timed out already
       
   373         maxRetryCount = KSmumRetryCount / 10; 
       
   374         }
       
   375     if (error != KErrNone && iRetryCount <= maxRetryCount)
       
   376         {
       
   377         // first cancel the current simOp if still ongoing
       
   378         if (iSimOperation)
       
   379             {         
       
   380             iSimOperation->Cancel();
       
   381             delete iSimOperation;
       
   382             iSimOperation = NULL;
       
   383             }
       
   384 
       
   385         // wait a bit and actual retry
       
   386         User::After(KSmumRetryDelay);
       
   387         StartL();
       
   388         return;
       
   389         }
       
   390 
       
   391     QDEBUG_WRITE("CMsgSimOperation::StartRunL Exit")     
       
   392     }
       
   393 
       
   394 // ----------------------------------------------------
       
   395 // CCMsgSimOperation::DoRunL
       
   396 //
       
   397 // ----------------------------------------------------
       
   398 void CMsgSimOperation::DoStartRunL()
       
   399     {
       
   400     QDEBUG_WRITE("CMsgSimOperation::DoStartRunL Enter") 
       
   401 
       
   402     TIntBuf progressBuf;
       
   403     progressBuf.Copy(iSimOperation->ProgressL());
       
   404     TInt error = progressBuf();
       
   405 
       
   406     if (error != KErrNone)
       
   407         {
       
   408         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL "
       
   409                 "iSimOperation->ProgressL() error ") 
       
   410                 return;
       
   411         }
       
   412 
       
   413 
       
   414     // Load current settings
       
   415     CSmsSettings* smsSettings = CSmsSettings::NewLC();
       
   416     CSmsAccount* smsAccount = CSmsAccount::NewLC();
       
   417     smsAccount->LoadSettingsL(*smsSettings);
       
   418 
       
   419     // Remove all old SMSC's configured
       
   420     TInt numSCAddresses = smsSettings->ServiceCenterCount();
       
   421 
       
   422     QDEBUG_WRITE_FORMAT("CMsgSimOperation::DoStartRunL numSCAddresses =",numSCAddresses)
       
   423 
       
   424     for (TInt j = numSCAddresses; j > 0; j--)
       
   425         {
       
   426         smsSettings->RemoveServiceCenter(j - 1);
       
   427         }
       
   428 
       
   429     // Add all SMSC's from SIM
       
   430     CMobilePhoneSmspList* centersList = iSimOperation->ServiceCentersLC();
       
   431     TInt count = centersList->Enumerate(); 
       
   432 
       
   433     QDEBUG_WRITE_FORMAT("CMsgSimOperation::DoStartRunL count from sim operation =",count)
       
   434 
       
   435     for ( TInt i = 0; i < count; i++ ) 
       
   436         {
       
   437         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL inside for loop") 
       
   438         
       
   439         RMobileSmsMessaging::TMobileSmspEntryV1 entry;
       
   440         entry = centersList->GetEntryL(i);
       
   441 
       
   442         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL Mobile sms entry read")
       
   443         
       
   444         // If empty tel number field, don't add
       
   445         if (entry.iServiceCentre.iTelNumber == KNullDesC)
       
   446             {
       
   447             continue;
       
   448             }
       
   449 
       
   450         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL create name")
       
   451         
       
   452         TBuf<100> name(KSmscSimDefaultName); 
       
   453         name.AppendNum(i);
       
   454         
       
   455         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL name created")
       
   456         
       
   457         smsSettings->AddServiceCenterL(name, entry.iServiceCentre.iTelNumber);
       
   458         
       
   459         
       
   460         QDEBUG_WRITE("CMsgSimOperation::DoStartRunL AddServiceCenterL completed")
       
   461 
       
   462         if ( i == 0 )
       
   463             {
       
   464             smsSettings->SetDefaultServiceCenter(i);
       
   465             QDEBUG_WRITE("CMsgSimOperation::DoStartRunL SetDefaultServiceCenter completed")
       
   466             }
       
   467         }
       
   468 
       
   469     // save settings
       
   470     smsAccount->SaveSettingsL(*smsSettings);    
       
   471     
       
   472     QDEBUG_WRITE("CMsgSimOperation::DoStartRunL SaveSettingsL completed")
       
   473     
       
   474     CleanupStack::PopAndDestroy(3, smsSettings); // centersList, smsAccount, smsSettings
       
   475 
       
   476     QDEBUG_WRITE("CMsgSimOperation::DoStartRunL Exit") 
       
   477 
       
   478     }
       
   479 
       
   480 void CMsgSimOperation::HandleSessionEventL(TMsvSessionEvent aEvent,
       
   481         TAny* /*aArg1*/, TAny* /*aArg2*/,
       
   482         TAny* /*aArg3*/)
       
   483     {
       
   484     // problem case handling
       
   485     if (aEvent == EMsvServerFailedToStart)
       
   486         {
       
   487         // Nothing to do here 
       
   488         CompleteClientRequest(0);
       
   489         }
       
   490 
       
   491     else if ( (aEvent == EMsvServerTerminated) || (aEvent == EMsvCloseSession))
       
   492         {      
       
   493         delete iSimOperation; // These objects must be deleted first
       
   494         iSimOperation = NULL; // as they can't exist without a MsvSession
       
   495 
       
   496         delete iSmsClientMtm;
       
   497         iSmsClientMtm = NULL;
       
   498 
       
   499         delete iClientRegistry;
       
   500         iClientRegistry = NULL;
       
   501         
       
   502         iOutBoxObserver->HandleMsvSessionClosedL();
       
   503         delete iOutBoxObserver;
       
   504         iOutBoxObserver = NULL;
       
   505         
       
   506         delete iMsvSession;
       
   507         iMsvSession = NULL;
       
   508 
       
   509         CompleteClientRequest(0);
       
   510         }
       
   511     }
       
   512 
       
   513 void CMsgSimOperation::HandleStartupReadyL()
       
   514     {
       
   515     QDEBUG_WRITE("CMsgSimOperation::HandleStartupReadyL Enter") 
       
   516     // Boot ready, start the real SimOperation
       
   517     StartL();
       
   518 
       
   519     QDEBUG_WRITE("CMsgSimOperation::HandleStartupReadyL Exit") 
       
   520     }
       
   521 
       
   522 TBool CMsgSimOperation::IsSIMPresent()
       
   523     {
       
   524     QDEBUG_WRITE("CMsgSimOperation::IsSIMPresent Enter") 
       
   525 
       
   526     TInt status = KErrNone;
       
   527     TInt value = 0;
       
   528 		status = RProperty::Get(KPSUidStartup, KPSSimStatus, value);
       
   529 
       
   530     if (status == KErrNone && value != ESimNotPresent)
       
   531         {
       
   532         QDEBUG_WRITE("CMsgSimOperation::IsSIMPresent returned True")
       
   533 
       
   534         return ETrue;      
       
   535         }
       
   536     
       
   537 		QDEBUG_WRITE("CMsgSimOperation::IsSIMPresent returned False")
       
   538 		return EFalse;
       
   539     }
       
   540 
       
   541 TBool CMsgSimOperation::HasSIMChanged()
       
   542     {
       
   543     QDEBUG_WRITE("CMsgSimOperation::HasSIMChanged Enter") 
       
   544 
       
   545     TInt simValue = 0;
       
   546     TInt status = RProperty::Get(KPSUidStartup, KPSSimChanged, simValue);
       
   547     if (status == KErrNone && simValue == ESimChanged)
       
   548         {
       
   549         QDEBUG_WRITE("CMsgSimOperation::HasSIMChanged  returned True")
       
   550         return ETrue;
       
   551         }
       
   552 
       
   553     QDEBUG_WRITE("CMsgSimOperation::HasSIMChanged  returned False")
       
   554     return EFalse;
       
   555     }
       
   556 
       
   557 
       
   558 TBool CMsgSimOperation::HasNoSmscSettings()
       
   559     {
       
   560     QDEBUG_WRITE("CMsgSimOperation::HasNoSmscSettings Enter") 
       
   561 
       
   562     CSmsSettings &settings = iSmsClientMtm->ServiceSettings();
       
   563     if (settings.ServiceCenterCount() > 0)
       
   564         {
       
   565         QDEBUG_WRITE("CMsgSimOperation::HasNoSmscSettings returned False")
       
   566 
       
   567         return EFalse;
       
   568         }
       
   569 
       
   570     QDEBUG_WRITE("CMsgSimOperation::HasNoSmscSettings returned True")
       
   571     return ETrue;
       
   572     }
       
   573 
       
   574 //  End of File