adaptationlayer/tsy/nokiatsy_dll/internal/test/nokiatsy_test_tool/ss/src/ssblocks.cpp
changeset 0 63b37f68c1ce
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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 the License "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:   Specific class for SS tests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <e32svr.h>
       
    23 #include <stifparser.h>
       
    24 #include <stiftestinterface.h>
       
    25 #include <mmlist.h>   // list types
       
    26 #include "ss.h"
       
    27 
       
    28 // CONSTANTS
       
    29 _LIT8( KLine, "---------------------------------" );
       
    30 _LIT( KDontCare, "DONT_CARE");
       
    31 
       
    32 // Indicates what kind IccMessageWaitingIndicators is on going
       
    33 enum TIccMessageWaitingIndicatorsType
       
    34     {
       
    35     EIccIndicationRel4 = 1,
       
    36     EIccIndicationCPHS
       
    37     };
       
    38 
       
    39 // ============================ MEMBER FUNCTIONS ===============================
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CSIM::Delete
       
    43 // Delete here all resources allocated and opened from test methods.
       
    44 // Called from destructor.
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 void CSS::Delete()
       
    48     {
       
    49 
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CSIM::RunMethodL
       
    54 // Run specified method. Contains also table of test methods and their names.
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 TInt CSS::RunMethodL(
       
    58     CStifItemParser& aItem )
       
    59     {
       
    60     _LIT8 (KLog, "SS: RunMethodL" );
       
    61     iSSLog->Log((TDesC8)KLog);
       
    62 
       
    63     static TStifFunctionInfo const KFunctions[] =
       
    64         {
       
    65         // Copy this line for every implemented function.
       
    66         // First string is the function name used in TestScripter script file.
       
    67         // Second is the actual implementation member function.
       
    68         ENTRY( "GetCallBarringStatus",             CSS::GetCallBarringStatus ),
       
    69         ENTRY( "GetCallForwardingStatus",          CSS::GetCallForwardingStatus ),
       
    70         ENTRY( "GetCallWaitingStatus",             CSS::GetCallWaitingStatus),
       
    71         ENTRY( "GetIdentityServiceStatus",         CSS::GetIdentityServiceStatus),
       
    72         ENTRY( "SetCallBarringStatus",             CSS::SetCallBarringStatus),
       
    73         ENTRY( "SetCallForwardingStatus",          CSS::SetCallForwardingStatus),
       
    74         ENTRY( "SetCallWaitingStatus",             CSS::SetCallWaitingStatus),
       
    75         ENTRY( "SetSupplementaryServicesPassword", CSS::SetSupplementaryServicesPassword),
       
    76         ENTRY( "GetCallForwardingNumber",          CSS::GetCallForwardingNumber),
       
    77         ENTRY( "SetIccMessageWaitingIndicators",   CSS::SetIccMessageWaitingIndicators),
       
    78         ENTRY( "GetIccMessageWaitingIndicators",   CSS::GetIccMessageWaitingIndicators),
       
    79         ENTRY( "GetIccCallForwardingStatus",       CSS::GetIccCallForwardingStatus),
       
    80         ENTRY( "SendUSSDMessage",                  CSS::SendUSSDMessage),
       
    81         ENTRY( "RunIscTestCase",                   CCore::RunIscTestCase),
       
    82         ENTRY( "SyncIscTestCase",                  CCore::SyncIscTestCase),
       
    83         ENTRY( "SSServiceFailed",                  CSS::SSServiceFailed),
       
    84         ENTRY( "USSDSendRelease",                  CSS::USSDSendRelease),
       
    85         ENTRY( "SendNetworkServiceRequest",        CSS::SendNetworkServiceRequest),
       
    86         ENTRY( "SendNetworkServiceRequestNoFdnCheck",
       
    87                 CSS::SendNetworkServiceRequestNoFdnCheck),
       
    88         ENTRY( "SendSatNotifyCallControlRequest",  CSS::SendSatNotifyCallControlRequest),
       
    89         ENTRY( "SetSendNetworkServiceRequestTestOngoingFlag",
       
    90                 CSS::SetSendNetworkServiceRequestTestOngoingFlag),
       
    91         ENTRY( "RunIscTestCaseIgnoreXMLsWhenRealCellmoInUseFlagIsDefined",
       
    92                 CCore::RunIscTestCaseIgnoreXMLsWhenRealCellmoInUseFlagIsDefined),
       
    93         ENTRY( "SyncIscTestCaseDoNotSyncIfRealCellmoInUseFlagIsDefined",
       
    94                 CCore::SyncIscTestCaseDoNotSyncIfRealCellmoInUseFlagIsDefined),
       
    95         ENTRY( "HandleSpecifiedRequests", CCore::HandleSpecifiedRequests),
       
    96         ENTRY( "InitializeIPCRequestTable", CCore::InitializeIPCRequestTable),
       
    97         ENTRY( "SetExpectedCompleteIPC", CCore::SetExpectedCompleteIPC),
       
    98         };
       
    99 
       
   100 
       
   101     const TInt count = sizeof( KFunctions ) /
       
   102                         sizeof( TStifFunctionInfo );
       
   103 
       
   104     return RunInternalL( KFunctions, count, aItem );
       
   105 
       
   106     }
       
   107 
       
   108 // -----------------------------------------------------------------------------
       
   109 // CSS::GetCallBarringStatus
       
   110 // Getting call barring status
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 TInt CSS::GetCallBarringStatus( CStifItemParser& aItem )
       
   114     {
       
   115     _LIT8(KPbInit, "SS::GetCallBarringStatus");
       
   116     iSSLog->Log((TDesC8)KPbInit);
       
   117 
       
   118     TInt ret( KErrNotFound );
       
   119     TBool supported( ETrue );
       
   120     TPtrC string;
       
   121     aItem.GetNextString ( string );
       
   122 
       
   123     RMobilePhone::TMobilePhoneCBCondition condition;
       
   124 
       
   125     if ( _L("BarAllIncoming") == string )
       
   126       {
       
   127       condition = RMobilePhone::EBarAllIncoming;
       
   128 
       
   129       if ( iHandleSpecifiedRequests )
       
   130           {
       
   131           aItem.GetNextString ( string );
       
   132           if ( _L("EBarAllIncoming") == string )
       
   133               {
       
   134               iCBInfoEntry.iCondition = RMobilePhone::EBarAllIncoming;
       
   135               }
       
   136 
       
   137           aItem.GetNextString ( string );
       
   138           if ( _L("EShortMessageService") == string )
       
   139               {
       
   140               iCBInfoEntry.iServiceGroup = RMobilePhone::EShortMessageService;
       
   141               }
       
   142 
       
   143           aItem.GetNextString ( string );
       
   144           if ( _L("ECallBarringStatusActive") == string )
       
   145               {
       
   146               iCBInfoEntry.iStatus = RMobilePhone::ECallBarringStatusActive;
       
   147               }
       
   148           }
       
   149       }
       
   150     else if ( _L("BarIncomingRoaming") == string )
       
   151       {
       
   152       condition = RMobilePhone::EBarIncomingRoaming;
       
   153 
       
   154       if ( iHandleSpecifiedRequests )
       
   155           {
       
   156           aItem.GetNextString ( string );
       
   157           if ( _L("EBarIncomingRoaming") == string )
       
   158               {
       
   159               iCBInfoEntry.iCondition = RMobilePhone::EBarIncomingRoaming;
       
   160               }
       
   161 
       
   162           aItem.GetNextString ( string );
       
   163           if ( _L("EAllServices") == string )
       
   164               {
       
   165               iCBInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
   166               }
       
   167 
       
   168           aItem.GetNextString ( string );
       
   169           if ( _L("ECallBarringStatusNotActive") == string )
       
   170               {
       
   171               iCBInfoEntry.iStatus = RMobilePhone::ECallBarringStatusNotActive;
       
   172               }
       
   173           }
       
   174       }
       
   175     else if ( _L("BarAllOutgoing") == string )
       
   176       {
       
   177       condition = RMobilePhone::EBarAllOutgoing;
       
   178 
       
   179       if ( iHandleSpecifiedRequests )
       
   180           {
       
   181           aItem.GetNextString ( string );
       
   182           if ( _L("EBarAllOutgoing") == string )
       
   183               {
       
   184               iCBInfoEntry.iCondition = RMobilePhone::EBarAllOutgoing;
       
   185               }
       
   186 
       
   187           aItem.GetNextString ( string );
       
   188           if ( _L("EAllServices") == string )
       
   189               {
       
   190               iCBInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
   191               }
       
   192 
       
   193           aItem.GetNextString ( string );
       
   194           if ( _L("ECallBarringStatusNotActive") == string )
       
   195               {
       
   196               iCBInfoEntry.iStatus = RMobilePhone::ECallBarringStatusNotActive;
       
   197               }
       
   198           }
       
   199       }
       
   200     else if ( _L("BarOutgoingInternational") == string )
       
   201       {
       
   202       condition = RMobilePhone::EBarOutgoingInternational;
       
   203 
       
   204       if ( iHandleSpecifiedRequests )
       
   205           {
       
   206           aItem.GetNextString ( string );
       
   207           if ( _L("EBarOutgoingInternational") == string )
       
   208               {
       
   209               iCBInfoEntry.iCondition = RMobilePhone::EBarOutgoingInternational;
       
   210               }
       
   211 
       
   212           aItem.GetNextString ( string );
       
   213           if ( _L("EAllServices") == string )
       
   214               {
       
   215               iCBInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
   216               }
       
   217 
       
   218           aItem.GetNextString ( string );
       
   219           if ( _L("ECallBarringStatusNotActive") == string )
       
   220               {
       
   221               iCBInfoEntry.iStatus = RMobilePhone::ECallBarringStatusNotActive;
       
   222               }
       
   223           }
       
   224       }
       
   225     else if ( _L("BarOutgoingInternationalExHC") == string )
       
   226       {
       
   227       condition = RMobilePhone::EBarOutgoingInternationalExHC;
       
   228 
       
   229       if ( iHandleSpecifiedRequests )
       
   230           {
       
   231           aItem.GetNextString ( string );
       
   232           if ( _L("EBarOutgoingInternationalExHC") == string )
       
   233               {
       
   234               iCBInfoEntry.iCondition = RMobilePhone::EBarOutgoingInternationalExHC;
       
   235               }
       
   236 
       
   237           aItem.GetNextString ( string );
       
   238           if ( _L("EAllServices") == string )
       
   239               {
       
   240               iCBInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
   241               }
       
   242 
       
   243           aItem.GetNextString ( string );
       
   244           if ( _L("ECallBarringStatusNotActive") == string )
       
   245               {
       
   246               iCBInfoEntry.iStatus = RMobilePhone::ECallBarringStatusNotActive;
       
   247               }
       
   248           }
       
   249       }
       
   250     else
       
   251       {
       
   252      _LIT8(KNotSupp, "SS::Selected call barring not supported");
       
   253         iSSLog->Log((TDesC8)KNotSupp);
       
   254       supported = EFalse;
       
   255       }
       
   256 
       
   257     if( supported )
       
   258       {
       
   259        //Create package
       
   260       CMmDataPackage package;
       
   261       // Set package data
       
   262       package.PackData( &condition );
       
   263 
       
   264       ret = HandleRequestL( EMobilePhoneGetBarringStatusPhase1,
       
   265                             &package );
       
   266 
       
   267       if ( KErrNone == ret )
       
   268           {
       
   269           _LIT8( KSendOk, "GetCallBarringStatus request send ok" );
       
   270           iSSLog->Log((TDesC8)KSendOk );
       
   271           }
       
   272       else
       
   273           {
       
   274            _LIT8( KSendFailed, "GetCallBarringStatus request send failed: %d" );
       
   275           iSSLog->Log((TDesC8)KSendFailed, ret );
       
   276           }
       
   277       }
       
   278     else
       
   279       {
       
   280       ret = KErrNotSupported;
       
   281       }
       
   282 
       
   283   return ret;
       
   284 
       
   285   }
       
   286 
       
   287 // -----------------------------------------------------------------------------
       
   288 // CSS::CompleteGetCallBarringStatus
       
   289 // Complete GetCallBarringStatus method function.
       
   290 // -----------------------------------------------------------------------------
       
   291 //
       
   292 void CSS::CompleteGetCallBarringStatus
       
   293   (
       
   294   TInt aResult,                // Completion result value
       
   295   CMmDataPackage* aDataPackage // pointer to DataPackage
       
   296   )
       
   297   {
       
   298   CMobilePhoneCBList* callBlockingList = NULL;
       
   299   RMobilePhone::TMobilePhoneCBInfoEntryV1 unpackedCBInfoEntry;
       
   300 
       
   301   _LIT8( KResult, "CompleteGetCallBarringStatus result: %d" );
       
   302   iSSLog->Log((TDesC8)KResult, aResult );
       
   303 
       
   304 
       
   305   if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
   306       {
       
   307       aDataPackage->UnPackData( &callBlockingList );
       
   308       for ( TInt i = 0; i < callBlockingList->Enumerate(); ++i )
       
   309           {
       
   310           unpackedCBInfoEntry = callBlockingList->GetEntryL( i );
       
   311           _LIT8( KStatus,
       
   312               "CompleteGetCallBarringStatus unpackedCBInfoEntry.iStatus: %d" );
       
   313           iSSLog->Log((TDesC8)KStatus, unpackedCBInfoEntry.iStatus );
       
   314 
       
   315           _LIT8( KCondition,
       
   316               "CompleteGetCallBarringStatus unpackedCBInfoEntry.iCondition: %d" );
       
   317           iSSLog->Log((TDesC8)KCondition, unpackedCBInfoEntry.iCondition );
       
   318 
       
   319           _LIT8( KServiceGroup,
       
   320               "CompleteGetCallBarringStatus unpackedCBInfoEntry.iServiceGroup: %d" );
       
   321           iSSLog->Log((TDesC8)KServiceGroup, unpackedCBInfoEntry.iServiceGroup );
       
   322 
       
   323           if ( ( iCBInfoEntry.iStatus != unpackedCBInfoEntry.iStatus ) ||
       
   324                ( iCBInfoEntry.iCondition != unpackedCBInfoEntry.iCondition ) ||
       
   325                ( iCBInfoEntry.iServiceGroup != unpackedCBInfoEntry.iServiceGroup ) )
       
   326               {
       
   327               // Last table element handled and none of elements matched.
       
   328               if ( ( i + 1 ) >= callBlockingList->Enumerate() )
       
   329                   {
       
   330                   aResult = KErrGeneral;
       
   331                   break;
       
   332                   }
       
   333               }
       
   334           }
       
   335       }
       
   336   if ( KErrNone != aResult )
       
   337       {
       
   338       _LIT8( KFail, "CompleteGetCallBarringStatus Failed: %d" );
       
   339       iSSLog->Log((TDesC8)KFail, aResult );
       
   340       }
       
   341 
       
   342   Signal( aResult );
       
   343 
       
   344   }
       
   345 
       
   346 
       
   347 // -----------------------------------------------------------------------------
       
   348 // CSS::GetCallForwardingStatus
       
   349 // Getting call forwarding status
       
   350 // -----------------------------------------------------------------------------
       
   351 //
       
   352 
       
   353 TInt CSS::GetCallForwardingStatus( CStifItemParser& aItem )
       
   354     {
       
   355     _LIT8(KPbInit, "SS::GetCallForwardingStatus");
       
   356     iSSLog->Log((TDesC8)KPbInit);
       
   357 
       
   358     TInt ret( KErrNotFound );
       
   359     TBool supported( ETrue );
       
   360     TPtrC string;
       
   361     TPtrC servicetype;
       
   362 
       
   363 
       
   364     aItem.GetNextString ( string );
       
   365     aItem.GetNextString ( servicetype );
       
   366 
       
   367 
       
   368     RMobilePhone::TMobilePhoneCFCondition condition;
       
   369 
       
   370 
       
   371     if ( _L("CallForwardingUnconditional") == string )
       
   372       {
       
   373       condition = RMobilePhone::ECallForwardingUnconditional;
       
   374 
       
   375       if ( iHandleSpecifiedRequests )
       
   376           {
       
   377           aItem.GetNextString ( string );
       
   378           if ( _L("ECallForwardingUnconditional") == string )
       
   379               {
       
   380               iCFInfoEntry.iCondition = RMobilePhone::ECallForwardingUnconditional;
       
   381               }
       
   382 
       
   383           aItem.GetNextString ( string );
       
   384           if ( _L("EFaxService") == string )
       
   385               {
       
   386               iCFInfoEntry.iServiceGroup = RMobilePhone::EFaxService;
       
   387               }
       
   388           else if ( _L("EAllServices") == string )
       
   389               {
       
   390               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
   391               }
       
   392           else if ( _L("ESyncData") == string )
       
   393               {
       
   394               iCFInfoEntry.iServiceGroup = RMobilePhone::ESyncData;
       
   395               }
       
   396 
       
   397           aItem.GetNextString ( string );
       
   398           if ( _L("ECallForwardingStatusNotRegistered") == string )
       
   399               {
       
   400               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotRegistered;
       
   401               }
       
   402           }
       
   403       }
       
   404     else if ( _L("CallForwardingBusy") == string )
       
   405       {
       
   406       condition = RMobilePhone::ECallForwardingBusy;
       
   407 
       
   408       if ( iHandleSpecifiedRequests )
       
   409           {
       
   410           aItem.GetNextString ( string );
       
   411           if ( _L("ECallForwardingBusy") == string )
       
   412               {
       
   413               iCFInfoEntry.iCondition = RMobilePhone::ECallForwardingBusy;
       
   414               }
       
   415 
       
   416           aItem.GetNextString ( string );
       
   417           if ( _L("ETelephony") == string )
       
   418               {
       
   419               iCFInfoEntry.iServiceGroup = RMobilePhone::ETelephony;
       
   420               }
       
   421           else if ( _L("EAllTele") == string )
       
   422               {
       
   423               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllTele;
       
   424               }
       
   425           else if ( _L("EAllTeleExcSms") == string )
       
   426               {
       
   427               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllTeleExcSms;
       
   428               }
       
   429           else if ( _L("EPlmnTele2") == string )
       
   430               {
       
   431               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele2;
       
   432               }
       
   433           else if ( _L("EPlmnTele3") == string )
       
   434               {
       
   435               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele3;
       
   436               }
       
   437           else if ( _L("EPlmnTele4") == string )
       
   438               {
       
   439               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele4;
       
   440               }
       
   441           else if ( _L("EPlmnTele5") == string )
       
   442               {
       
   443               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele5;
       
   444               }
       
   445           else if ( _L("EPlmnTele7") == string )
       
   446               {
       
   447               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele7;
       
   448               }
       
   449           else if ( _L("EPlmnTele8") == string )
       
   450               {
       
   451               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele8;
       
   452               }
       
   453           else if ( _L("EPlmnTele9") == string )
       
   454               {
       
   455               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele9;
       
   456               }
       
   457           else if ( _L("EPlmnTeleA") == string )
       
   458               {
       
   459               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleA;
       
   460               }
       
   461           else if ( _L("EPlmnTeleB") == string )
       
   462               {
       
   463               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleB;
       
   464               }
       
   465           else if ( _L("EPlmnTeleC") == string )
       
   466               {
       
   467               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleC;
       
   468               }
       
   469           else if ( _L("EPlmnTeleD") == string )
       
   470               {
       
   471               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleD;
       
   472               }
       
   473           else if ( _L("EPlmnTeleE") == string )
       
   474               {
       
   475               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleE;
       
   476               }
       
   477           else if ( _L("EPlmnTeleF") == string )
       
   478               {
       
   479               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTeleF;
       
   480               }
       
   481           else if ( _L("EAllBearer") == string )
       
   482               {
       
   483               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllBearer;
       
   484               }
       
   485           else if ( _L("EAllAsync") == string )
       
   486               {
       
   487               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllAsync;
       
   488               }
       
   489           else if ( _L("EAsyncData") == string )
       
   490               {
       
   491               iCFInfoEntry.iServiceGroup = RMobilePhone::EAsyncData;
       
   492               }
       
   493           else if ( _L("EPlmnBearerServ1") == string )
       
   494               {
       
   495               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ1;
       
   496               }
       
   497           else if ( _L("EPlmnBearerServ2") == string )
       
   498               {
       
   499               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ2;
       
   500               }
       
   501           else if ( _L("EPlmnBearerServ3") == string )
       
   502               {
       
   503               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ3;
       
   504               }
       
   505           else if ( _L("EPlmnBearerServ4") == string )
       
   506               {
       
   507               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ4;
       
   508               }
       
   509           else if ( _L("EPlmnBearerServ5") == string )
       
   510               {
       
   511               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ5;
       
   512               }
       
   513           else if ( _L("EPlmnBearerServ6") == string )
       
   514               {
       
   515               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ6;
       
   516               }
       
   517           else if ( _L("EPlmnBearerServ7") == string )
       
   518               {
       
   519               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ7;
       
   520               }
       
   521           else if ( _L("EPlmnBearerServ8") == string )
       
   522               {
       
   523               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ8;
       
   524               }
       
   525           else if ( _L("EPlmnBearerServ9") == string )
       
   526               {
       
   527               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServ9;
       
   528               }
       
   529           else if ( _L("EPlmnBearerServA") == string )
       
   530               {
       
   531               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServA;
       
   532               }
       
   533           else if ( _L("EPlmnBearerServB") == string )
       
   534               {
       
   535               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServB;
       
   536               }
       
   537           else if ( _L("EPlmnBearerServC") == string )
       
   538               {
       
   539               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServC;
       
   540               }
       
   541           else if ( _L("EPlmnBearerServD") == string )
       
   542               {
       
   543               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServD;
       
   544               }
       
   545           else if ( _L("EPlmnBearerServE") == string )
       
   546               {
       
   547               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServE;
       
   548               }
       
   549           else if ( _L("EPlmnBearerServF") == string )
       
   550               {
       
   551               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnBearerServF;
       
   552               }
       
   553           else if ( _L("EPacketDataService") == string )
       
   554               {
       
   555               iCFInfoEntry.iServiceGroup = RMobilePhone::EPacketDataService;
       
   556               }
       
   557           else if ( _L("EVoiceGroupCall") == string )
       
   558               {
       
   559               iCFInfoEntry.iServiceGroup = RMobilePhone::EVoiceGroupCall;
       
   560               }
       
   561           else if ( _L("EAllPlmnTele") == string )
       
   562               {
       
   563               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllPlmnTele;
       
   564               }
       
   565           else if ( _L("EPadAccess") == string )
       
   566               {
       
   567               iCFInfoEntry.iServiceGroup = RMobilePhone::EPadAccess;
       
   568               }
       
   569           else if ( _L("EAllPlmnBearer") == string )
       
   570               {
       
   571               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllPlmnBearer;
       
   572               }
       
   573           else if ( _L("EAuxVoiceService") == string )
       
   574               {
       
   575               iCFInfoEntry.iServiceGroup = RMobilePhone::EAuxVoiceService;
       
   576               }
       
   577           else if ( _L("EPlmnTele6") == string )
       
   578               {
       
   579               iCFInfoEntry.iServiceGroup = RMobilePhone::EPlmnTele6;
       
   580               }
       
   581           else if ( _L("EServiceUnspecified") == string )
       
   582               {
       
   583               iCFInfoEntry.iServiceGroup = RMobilePhone::EServiceUnspecified;
       
   584               }
       
   585 
       
   586           aItem.GetNextString ( string );
       
   587           if ( _L("ECallForwardingStatusNotRegistered") == string )
       
   588               {
       
   589               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotRegistered;
       
   590               }
       
   591           else if ( _L("ECallForwardingStatusNotProvisioned") == string )
       
   592               {
       
   593               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotProvisioned;
       
   594               }
       
   595           }
       
   596       }
       
   597     else if ( _L("CallForwardingNoReply") == string )
       
   598       {
       
   599       condition = RMobilePhone::ECallForwardingNoReply;
       
   600 
       
   601       if ( iHandleSpecifiedRequests )
       
   602           {
       
   603           aItem.GetNextString ( string );
       
   604           if ( _L("ECallForwardingNoReply") == string )
       
   605               {
       
   606               iCFInfoEntry.iCondition = RMobilePhone::ECallForwardingNoReply;
       
   607               }
       
   608 
       
   609           aItem.GetNextString ( string );
       
   610           if ( _L("ECircuitDataService") == string )
       
   611               {
       
   612               iCFInfoEntry.iServiceGroup = RMobilePhone::ECircuitDataService;
       
   613               }
       
   614           else if ( _L("ETelephony") == string )
       
   615         	  {
       
   616         	  iCFInfoEntry.iServiceGroup = RMobilePhone::ETelephony;
       
   617         	  }
       
   618           else if ( _L("EVoiceService") == string )
       
   619         	  {
       
   620         	  iCFInfoEntry.iServiceGroup = RMobilePhone::EVoiceService;
       
   621         	  }
       
   622           else if ( _L("EAllAsync") == string )
       
   623         	  {
       
   624         	  iCFInfoEntry.iServiceGroup = RMobilePhone::EAllAsync;
       
   625         	  }
       
   626 
       
   627           aItem.GetNextString ( string );
       
   628           if ( _L("ECallForwardingStatusNotRegistered") == string )
       
   629               {
       
   630               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotRegistered;
       
   631               }
       
   632           else if ( _L("ECallForwardingStatusNotProvisioned") == string )
       
   633               {
       
   634               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotProvisioned;
       
   635               }
       
   636           }
       
   637       }
       
   638     else if ( _L("CallForwardingNotReachable") == string )
       
   639       {
       
   640       condition = RMobilePhone::ECallForwardingNotReachable;
       
   641 
       
   642       if ( iHandleSpecifiedRequests )
       
   643           {
       
   644           aItem.GetNextString ( string );
       
   645           if ( _L("ECallForwardingNotReachable") == string )
       
   646               {
       
   647               iCFInfoEntry.iCondition = RMobilePhone::ECallForwardingNotReachable;
       
   648               }
       
   649 
       
   650           aItem.GetNextString ( string );
       
   651           if ( _L("EAllDataTele") == string )
       
   652               {
       
   653               iCFInfoEntry.iServiceGroup = RMobilePhone::EAllDataTele;
       
   654               }
       
   655 
       
   656           else if ( _L("EShortMessageService") == string )
       
   657               {
       
   658               iCFInfoEntry.iServiceGroup = RMobilePhone::EShortMessageService;
       
   659               }
       
   660 
       
   661           else if ( _L("EPlmnTele1") == string )
       
   662               {
       
   663               iCFInfoEntry.iServiceGroup = RMobilePhone:: EPlmnTele1;
       
   664               }
       
   665           else if ( _L("EServiceUnspecified") == string )
       
   666               {
       
   667               iCFInfoEntry.iServiceGroup = RMobilePhone:: EServiceUnspecified;
       
   668               }
       
   669           else if ( _L("EAllSync") == string )
       
   670               {
       
   671               iCFInfoEntry.iServiceGroup = RMobilePhone:: EAllSync;
       
   672               }
       
   673           aItem.GetNextString ( string );
       
   674           if ( _L("ECallForwardingStatusNotRegistered") == string )
       
   675               {
       
   676               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotRegistered;
       
   677               }
       
   678 
       
   679           else if ( _L("ECallForwardingStatusNotProvisioned") == string )
       
   680               {
       
   681               iCFInfoEntry.iStatus = RMobilePhone::ECallForwardingStatusNotProvisioned;
       
   682               }
       
   683           }
       
   684       }
       
   685     else
       
   686       {
       
   687      _LIT8(KNotSupp, "SS::Selected condition for call forwarding not supported");
       
   688         iSSLog->Log((TDesC8)KNotSupp);
       
   689       supported = EFalse;
       
   690       }
       
   691 
       
   692 
       
   693     RMobilePhone::TMobileService servicegroup;
       
   694 
       
   695 
       
   696     if ( _L("ServiceUnspecified") == servicetype )
       
   697       {
       
   698       servicegroup = RMobilePhone::EServiceUnspecified;
       
   699       }
       
   700     else if ( _L("VoiceService") == servicetype )
       
   701       {
       
   702       servicegroup = RMobilePhone::EVoiceService;
       
   703       }
       
   704     else if ( _L("AuxVoiceService") == servicetype )
       
   705       {
       
   706       servicegroup = RMobilePhone::EAuxVoiceService;
       
   707       }
       
   708     else if ( _L("CircuitDataService") == servicetype )
       
   709       {
       
   710       servicegroup = RMobilePhone::ECircuitDataService;
       
   711       }
       
   712     else if ( _L("PacketDataService") == servicetype )
       
   713       {
       
   714       servicegroup = RMobilePhone::EPacketDataService;
       
   715       }
       
   716     else if ( _L("FaxService") == servicetype )
       
   717       {
       
   718       servicegroup = RMobilePhone::EFaxService;
       
   719       }
       
   720     else if ( _L("ShortMessageService") == servicetype )
       
   721       {
       
   722       servicegroup = RMobilePhone::EShortMessageService;
       
   723       }
       
   724     else if ( _L("AllServices") == servicetype )
       
   725       {
       
   726       servicegroup = RMobilePhone::EAllServices;
       
   727       }
       
   728     else if ( _L("AllTele") == servicetype )
       
   729       {
       
   730       servicegroup = RMobilePhone::EAllTele;
       
   731       }
       
   732     else if ( _L("Telephony") == servicetype )
       
   733       {
       
   734       servicegroup = RMobilePhone::ETelephony;
       
   735       }
       
   736     else if ( _L("AllDataTele") == servicetype )
       
   737       {
       
   738       servicegroup = RMobilePhone::EAllDataTele;
       
   739       }
       
   740     else if ( _L("AllDataExSms") == servicetype )
       
   741       {
       
   742       servicegroup = RMobilePhone::EAllDataExSms;
       
   743       }
       
   744     else if ( _L("AllTeleExcSms") == servicetype )
       
   745       {
       
   746       servicegroup = RMobilePhone::EAllTeleExcSms;
       
   747       }
       
   748     else if ( _L("AllPlmnTele") == servicetype )
       
   749       {
       
   750       servicegroup = RMobilePhone::EAllPlmnTele;
       
   751       }
       
   752     else if ( _L("PlmnTele1") == servicetype )
       
   753       {
       
   754       servicegroup = RMobilePhone::EPlmnTele1;
       
   755       }
       
   756     else if ( _L("PlmnTele2") == servicetype )
       
   757       {
       
   758       servicegroup = RMobilePhone::EPlmnTele2;
       
   759       }
       
   760     else if ( _L("PlmnTele3") == servicetype )
       
   761       {
       
   762       servicegroup = RMobilePhone::EPlmnTele3;
       
   763       }
       
   764     else if ( _L("PlmnTele4") == servicetype )
       
   765       {
       
   766       servicegroup = RMobilePhone::EPlmnTele4;
       
   767       }
       
   768     else if ( _L("PlmnTele5") == servicetype )
       
   769       {
       
   770       servicegroup = RMobilePhone::EPlmnTele5;
       
   771       }
       
   772     else if ( _L("PlmnTele6") == servicetype )
       
   773       {
       
   774       servicegroup = RMobilePhone::EPlmnTele6;
       
   775       }
       
   776     else if ( _L("PlmnTele7") == servicetype )
       
   777       {
       
   778       servicegroup = RMobilePhone::EPlmnTele7;
       
   779       }
       
   780     else if ( _L("PlmnTele8") == servicetype )
       
   781       {
       
   782       servicegroup = RMobilePhone::EPlmnTele8;
       
   783       }
       
   784     else if ( _L("PlmnTele9") == servicetype )
       
   785       {
       
   786       servicegroup = RMobilePhone::EPlmnTele9;
       
   787       }
       
   788     else if ( _L("PlmnTeleA") == servicetype )
       
   789       {
       
   790       servicegroup = RMobilePhone::EPlmnTeleA;
       
   791       }
       
   792     else if ( _L("PlmnTeleB") == servicetype )
       
   793       {
       
   794       servicegroup = RMobilePhone::EPlmnTeleB;
       
   795       }
       
   796     else if ( _L("PlmnTeleC") == servicetype )
       
   797       {
       
   798       servicegroup = RMobilePhone::EPlmnTeleC;
       
   799       }
       
   800     else if ( _L("PlmnTeleD") == servicetype )
       
   801       {
       
   802       servicegroup = RMobilePhone::EPlmnTeleD;
       
   803       }
       
   804     else if ( _L("PlmnTeleE") == servicetype )
       
   805       {
       
   806       servicegroup = RMobilePhone::EPlmnTeleE;
       
   807       }
       
   808     else if ( _L("PlmnTeleF") == servicetype )
       
   809       {
       
   810       servicegroup = RMobilePhone::EPlmnTeleF;
       
   811       }
       
   812     else if ( _L("AllBearer") == servicetype )
       
   813       {
       
   814       servicegroup = RMobilePhone::EAllBearer;
       
   815       }
       
   816     else if ( _L("AllAsync") == servicetype )
       
   817       {
       
   818       servicegroup = RMobilePhone::EAllAsync;
       
   819       }
       
   820     else if ( _L("AllSync") == servicetype )
       
   821       {
       
   822       servicegroup = RMobilePhone::EAllSync;
       
   823       }
       
   824     else if ( _L("SyncData") == servicetype )
       
   825       {
       
   826       servicegroup = RMobilePhone::ESyncData;
       
   827       }
       
   828     else if ( _L("AsyncData") == servicetype )
       
   829       {
       
   830       servicegroup = RMobilePhone::EAsyncData;
       
   831       }
       
   832     else if ( _L("PacketData") == servicetype )
       
   833       {
       
   834       servicegroup = RMobilePhone::EPacketData;
       
   835       }
       
   836     else if ( _L("PadAccess") == servicetype )
       
   837       {
       
   838       servicegroup = RMobilePhone::EPadAccess;
       
   839       }
       
   840     else if ( _L("AllPlmnBearer") == servicetype )
       
   841       {
       
   842       servicegroup = RMobilePhone::EAllPlmnBearer;
       
   843       }
       
   844     else if ( _L("PlmnBearerServ1") == servicetype )
       
   845       {
       
   846       servicegroup = RMobilePhone::EPlmnBearerServ1;
       
   847       }
       
   848     else if ( _L("PlmnBearerServ2") == servicetype )
       
   849       {
       
   850       servicegroup = RMobilePhone::EPlmnBearerServ2;
       
   851       }
       
   852     else if ( _L("PlmnBearerServ3") == servicetype )
       
   853       {
       
   854       servicegroup = RMobilePhone::EPlmnBearerServ3;
       
   855       }
       
   856     else if ( _L("PlmnBearerServ4") == servicetype )
       
   857       {
       
   858       servicegroup = RMobilePhone::EPlmnBearerServ4;
       
   859       }
       
   860     else if ( _L("PlmnBearerServ5") == servicetype )
       
   861       {
       
   862       servicegroup = RMobilePhone::EPlmnBearerServ5;
       
   863       }
       
   864     else if ( _L("PlmnBearerServ6") == servicetype )
       
   865       {
       
   866       servicegroup = RMobilePhone::EPlmnBearerServ6;
       
   867       }
       
   868     else if ( _L("PlmnBearerServ7") == servicetype )
       
   869       {
       
   870       servicegroup = RMobilePhone::EPlmnBearerServ7;
       
   871       }
       
   872     else if ( _L("PlmnBearerServ8") == servicetype )
       
   873       {
       
   874       servicegroup = RMobilePhone::EPlmnBearerServ8;
       
   875       }
       
   876     else if ( _L("PlmnBearerServ9") == servicetype )
       
   877       {
       
   878       servicegroup = RMobilePhone::EPlmnBearerServ9;
       
   879       }
       
   880     else if ( _L("PlmnBearerServA") == servicetype )
       
   881       {
       
   882       servicegroup = RMobilePhone::EPlmnBearerServA;
       
   883       }
       
   884     else if ( _L("PlmnBearerServB") == servicetype )
       
   885       {
       
   886       servicegroup = RMobilePhone::EPlmnBearerServB;
       
   887       }
       
   888     else if ( _L("PlmnBearerServC") == servicetype )
       
   889       {
       
   890       servicegroup = RMobilePhone::EPlmnBearerServC;
       
   891       }
       
   892     else if ( _L("PlmnBearerServD") == servicetype )
       
   893       {
       
   894       servicegroup = RMobilePhone::EPlmnBearerServD;
       
   895       }
       
   896     else if ( _L("PlmnBearerServE") == servicetype )
       
   897       {
       
   898       servicegroup = RMobilePhone::EPlmnBearerServE;
       
   899       }
       
   900     else if ( _L("PlmnBearerServF") == servicetype )
       
   901       {
       
   902       servicegroup = RMobilePhone::EPlmnBearerServF;
       
   903       }
       
   904     else if ( _L("AltTele") == servicetype )
       
   905       {
       
   906       servicegroup = RMobilePhone::EAltTele;
       
   907       }
       
   908     else if ( _L("VoiceGroupCall") == servicetype )
       
   909       {
       
   910       servicegroup = RMobilePhone::EVoiceGroupCall;
       
   911       }
       
   912     else if ( _L("VoiceBroadcast") == servicetype )
       
   913       {
       
   914       servicegroup = RMobilePhone::EVoiceBroadcast;
       
   915       }
       
   916     else if ( _L("AllGprsBearer") == servicetype )
       
   917       {
       
   918       servicegroup = RMobilePhone::EAllGprsBearer;
       
   919       }
       
   920     else
       
   921       {
       
   922      _LIT8(KNotSupp, "SS::Selected servicegroup for call forwarding not supported");
       
   923         iSSLog->Log((TDesC8)KNotSupp);
       
   924       supported = EFalse;
       
   925       }
       
   926 
       
   927 
       
   928 
       
   929 
       
   930     if( supported )
       
   931       {
       
   932        //Create package
       
   933      CMmDataPackage package;
       
   934       // Set package data
       
   935       package.PackData( &condition, &servicegroup );
       
   936 
       
   937      ret = HandleRequestL( EMobilePhoneGetCallForwardingStatusPhase1,
       
   938                            &package );
       
   939 
       
   940       if ( KErrNone == ret )
       
   941           {
       
   942           _LIT8( KSendOk, "GetCallForwardingStatus request send ok" );
       
   943           iSSLog->Log((TDesC8)KSendOk );
       
   944           }
       
   945       else
       
   946           {
       
   947            _LIT8( KSendFailed, "GetCallForwardingStatus request send failed: %d" );
       
   948           iSSLog->Log((TDesC8)KSendFailed, ret );
       
   949           }
       
   950       }
       
   951     else
       
   952       {
       
   953       ret = KErrNotSupported;
       
   954       }
       
   955 
       
   956   return ret;
       
   957 
       
   958   }
       
   959 
       
   960 
       
   961 // -----------------------------------------------------------------------------
       
   962 // CSS::CompleteGetCallForwardingStatus
       
   963 // Complete GetCallForwardingStatus method function.
       
   964 // -----------------------------------------------------------------------------
       
   965 //
       
   966 void CSS::CompleteGetCallForwardingStatus
       
   967     (
       
   968     TInt aResult,                // Completion result value
       
   969     CMmDataPackage* aDataPackage // pointer to DataPackage
       
   970     )
       
   971   {
       
   972   _LIT8( KResult, "CompleteGetCallForwardingStatus result: %d" );
       
   973   iSSLog->Log((TDesC8)KResult, aResult );
       
   974 
       
   975   CMobilePhoneCFList* callForwardingList = NULL;
       
   976   RMobilePhone::TMobilePhoneCFInfoEntryV1 unpackedCFInfoEntry;
       
   977 
       
   978 
       
   979   if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
   980       {
       
   981       aDataPackage->UnPackData( &callForwardingList );
       
   982       for ( TInt i = 0; i < callForwardingList->Enumerate(); ++i )
       
   983           {
       
   984           unpackedCFInfoEntry = callForwardingList->GetEntryL( i );
       
   985           _LIT8( KStatus,
       
   986               "CompleteGetCallForwardingStatus unpackedCFInfoEntry.iStatus: %d" );
       
   987           iSSLog->Log((TDesC8)KStatus, unpackedCFInfoEntry.iStatus );
       
   988 
       
   989           _LIT8( KCondition,
       
   990               "CompleteGetCallForwardingStatus unpackedCFInfoEntry.iCondition: %d" );
       
   991           iSSLog->Log((TDesC8)KCondition, unpackedCFInfoEntry.iCondition );
       
   992 
       
   993           _LIT8( KServiceGroup,
       
   994               "CompleteGetCallForwardingStatus unpackedCFInfoEntry.iServiceGroup: %d" );
       
   995           iSSLog->Log((TDesC8)KServiceGroup, unpackedCFInfoEntry.iServiceGroup );
       
   996 
       
   997           if ( ( iCFInfoEntry.iStatus != unpackedCFInfoEntry.iStatus ) ||
       
   998                ( iCFInfoEntry.iCondition != unpackedCFInfoEntry.iCondition ) ||
       
   999                ( iCFInfoEntry.iServiceGroup != unpackedCFInfoEntry.iServiceGroup ) )
       
  1000               {
       
  1001               // Last table element handled and none of elements matched.
       
  1002               if ( ( i + 1 ) >= callForwardingList->Enumerate() )
       
  1003                   {
       
  1004                   aResult = KErrGeneral;
       
  1005                   break;
       
  1006                   }
       
  1007               }
       
  1008               Signal( aResult );
       
  1009           }
       
  1010       }
       
  1011   else
       
  1012       {
       
  1013       if ( KErrNone != aResult )
       
  1014           {
       
  1015           _LIT8( KFail, "CompleteGetCallForwardingStatus Failed: %d" );
       
  1016             iSSLog->Log((TDesC8)KFail, aResult );
       
  1017           }
       
  1018       }
       
  1019 
       
  1020   Signal( aResult );
       
  1021   }
       
  1022 
       
  1023 // -----------------------------------------------------------------------------
       
  1024 // CSS::GetCallWaitingStatus
       
  1025 // Getting call waiting status
       
  1026 // -----------------------------------------------------------------------------
       
  1027 //
       
  1028 
       
  1029 TInt CSS::GetCallWaitingStatus( CStifItemParser& aItem )
       
  1030   {
       
  1031 
       
  1032   _LIT8(KPbInit, "SS::GetCallWaitingStatus");
       
  1033   iSSLog->Log((TDesC8)KPbInit);
       
  1034 
       
  1035   TInt ret( KErrNotFound );
       
  1036   TPtrC string;
       
  1037 
       
  1038   if ( iHandleSpecifiedRequests )
       
  1039       {
       
  1040       aItem.GetNextString ( string );
       
  1041       if ( _L("EAllServices") == string )
       
  1042           {
       
  1043           iCWInfoEntry.iServiceGroup = RMobilePhone::EAllServices;
       
  1044           }
       
  1045 
       
  1046       aItem.GetNextString ( string );
       
  1047       if ( _L("ECallWaitingStatusNotActive") == string )
       
  1048           {
       
  1049           iCWInfoEntry.iStatus = RMobilePhone::ECallWaitingStatusNotActive;
       
  1050           }
       
  1051       }
       
  1052 
       
  1053   ret = HandleRequestL( EMobilePhoneGetWaitingStatusPhase1 );
       
  1054 
       
  1055   if ( KErrNone == ret )
       
  1056       {
       
  1057       _LIT8( KSendOk, "GetCallWaitingStatus request send ok" );
       
  1058       iSSLog->Log((TDesC8)KSendOk );
       
  1059       }
       
  1060   else
       
  1061       {
       
  1062       _LIT8( KSendFailed, "GetCallWaitingStatus request send failed: %d" );
       
  1063       iSSLog->Log((TDesC8)KSendFailed, ret );
       
  1064       }
       
  1065 
       
  1066   return ret;
       
  1067 
       
  1068   }
       
  1069 
       
  1070 // -----------------------------------------------------------------------------
       
  1071 // CSS::CompleteGetCallWaitingStatus
       
  1072 // Complete GetCallWaitingStatus method function.
       
  1073 // -----------------------------------------------------------------------------
       
  1074 //
       
  1075 void CSS::CompleteGetCallWaitingStatus
       
  1076     (
       
  1077     TInt aResult,                // Completion result value
       
  1078     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  1079     )
       
  1080   {
       
  1081   CMobilePhoneCWList* callWaitingList = NULL;
       
  1082   RMobilePhone::TMobilePhoneCWInfoEntryV1 unpackedCWInfoEntry;;
       
  1083 
       
  1084   _LIT8( KResult, "CompleteGetCallWaitingStatus result: %d" );
       
  1085   iSSLog->Log((TDesC8)KResult, aResult );
       
  1086 
       
  1087   if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
  1088       {
       
  1089       aDataPackage->UnPackData( &callWaitingList );
       
  1090       for ( TInt i = 0; i < callWaitingList->Enumerate(); ++i )
       
  1091           {
       
  1092           unpackedCWInfoEntry = callWaitingList->GetEntryL( i );
       
  1093           _LIT8( KStatus,
       
  1094               "CompleteGetCallWaitingStatus unpackedCWInfoEntry.iStatus: %d" );
       
  1095           iSSLog->Log((TDesC8)KStatus, unpackedCWInfoEntry.iStatus );
       
  1096 
       
  1097           _LIT8( KServiceGroup,
       
  1098               "CompleteGetCallWaitingStatus unpackedCWInfoEntry.iServiceGroup: %d" );
       
  1099           iSSLog->Log((TDesC8)KServiceGroup, unpackedCWInfoEntry.iServiceGroup );
       
  1100 
       
  1101           if ( ( iCWInfoEntry.iStatus != unpackedCWInfoEntry.iStatus ) ||
       
  1102                ( iCWInfoEntry.iServiceGroup != unpackedCWInfoEntry.iServiceGroup ) )
       
  1103               {
       
  1104               // Last table element handled and none of elements matched.
       
  1105               if ( ( i + 1 ) >= callWaitingList->Enumerate() )
       
  1106                   {
       
  1107                     aResult = KErrGeneral;
       
  1108                     break;
       
  1109                   }
       
  1110               }
       
  1111           }
       
  1112       }
       
  1113 
       
  1114   if( KErrNone != aResult )
       
  1115       {
       
  1116       _LIT8( KFail, "CompleteGetCallWaitingStatus Failed: %d" );
       
  1117       iSSLog->Log((TDesC8)KFail, aResult );
       
  1118       }
       
  1119 
       
  1120   Signal( aResult );
       
  1121   }
       
  1122 
       
  1123 // -----------------------------------------------------------------------------
       
  1124 // CSS::GetIdentityServiceStatus
       
  1125 // Getting idetity service status
       
  1126 // -----------------------------------------------------------------------------
       
  1127 //
       
  1128 TInt CSS::GetIdentityServiceStatus( CStifItemParser& aItem )
       
  1129     {
       
  1130     _LIT8(KPbInit, "SS::GetIdentityServiceStatus");
       
  1131     iSSLog->Log((TDesC8)KPbInit);
       
  1132 
       
  1133     TInt ret( KErrNotFound );
       
  1134     TBool supported( ETrue );
       
  1135     TPtrC string;
       
  1136     aItem.GetNextString ( string );
       
  1137 
       
  1138     RMobilePhone::TMobilePhoneIdService condition;
       
  1139 
       
  1140     if ( _L("IdServiceCallerPresentation") == string )
       
  1141       {
       
  1142       condition = RMobilePhone::EIdServiceCallerPresentation;
       
  1143       if ( iHandleSpecifiedRequests )
       
  1144           {
       
  1145           aItem.GetNextString ( string );
       
  1146           if ( _L("EIdServiceActivePermanent") == string )
       
  1147               {
       
  1148               iStatusETel = RMobilePhone::EIdServiceActivePermanent;
       
  1149               }
       
  1150           }
       
  1151       }
       
  1152     else if ( _L("IdServiceCallerRestriction") == string )
       
  1153       {
       
  1154       condition = RMobilePhone::EIdServiceCallerRestriction;
       
  1155       if ( iHandleSpecifiedRequests )
       
  1156           {
       
  1157           aItem.GetNextString ( string );
       
  1158           if ( _L("EIdServiceActiveDefaultAllowed") == string )
       
  1159               {
       
  1160               iStatusETel = RMobilePhone::EIdServiceActiveDefaultAllowed;
       
  1161               }
       
  1162           }
       
  1163       }
       
  1164     else if ( _L("IdServiceConnectedPresentation") == string )
       
  1165       {
       
  1166       condition = RMobilePhone::EIdServiceConnectedPresentation;
       
  1167       if ( iHandleSpecifiedRequests )
       
  1168           {
       
  1169           aItem.GetNextString ( string );
       
  1170           if ( _L("EIdServiceNotProvisioned") == string )
       
  1171               {
       
  1172               iStatusETel = RMobilePhone::EIdServiceNotProvisioned;
       
  1173               }
       
  1174           }
       
  1175       }
       
  1176     else if ( _L("IdServiceConnectedRestriction") == string )
       
  1177       {
       
  1178       condition = RMobilePhone::EIdServiceConnectedRestriction;
       
  1179       if ( iHandleSpecifiedRequests )
       
  1180           {
       
  1181           aItem.GetNextString ( string );
       
  1182           if ( _L("EIdServiceNotProvisioned") == string )
       
  1183               {
       
  1184               iStatusETel = RMobilePhone::EIdServiceNotProvisioned;
       
  1185               }
       
  1186           }
       
  1187       }
       
  1188     else if ( _L("IdServiceCallerName") == string )
       
  1189       {
       
  1190       condition = RMobilePhone::EIdServiceCallerName;
       
  1191       if ( iHandleSpecifiedRequests )
       
  1192           {
       
  1193           aItem.GetNextString ( string );
       
  1194           if ( _L("EIdServiceNotProvisioned") == string )
       
  1195               {
       
  1196               iStatusETel = RMobilePhone::EIdServiceNotProvisioned;
       
  1197               }
       
  1198           }
       
  1199       }
       
  1200     else
       
  1201       {
       
  1202      _LIT8(KNotSupp, "SS::Selected identity service status not supported");
       
  1203         iSSLog->Log((TDesC8)KNotSupp);
       
  1204       supported = EFalse;
       
  1205       }
       
  1206 
       
  1207     if( supported )
       
  1208       {
       
  1209        //Create package
       
  1210      CMmDataPackage package;
       
  1211       // Set package data
       
  1212       package.PackData( &condition );
       
  1213 
       
  1214       ret = HandleRequestL( EMobilePhoneGetIdentityServiceStatus,
       
  1215                             &package );
       
  1216 
       
  1217       if ( KErrNone == ret )
       
  1218           {
       
  1219           _LIT8( KSendOk, "GetIdentityServiceStatus request send ok" );
       
  1220           iSSLog->Log((TDesC8)KSendOk );
       
  1221         }
       
  1222       else
       
  1223           {
       
  1224           _LIT8( KSendFailed, "GetIdentityService request send failed: %d" );
       
  1225           iSSLog->Log((TDesC8)KSendFailed, ret );
       
  1226           }
       
  1227       }
       
  1228     else
       
  1229       {
       
  1230       ret = KErrNotSupported;
       
  1231       }
       
  1232 
       
  1233   return ret;
       
  1234 
       
  1235   }
       
  1236 
       
  1237 // -----------------------------------------------------------------------------
       
  1238 // CSS::CompleteGetIdentityServiceStatus
       
  1239 // Complete CompleteGetIdentityServiceStatus method function.
       
  1240 // -----------------------------------------------------------------------------
       
  1241 //
       
  1242 void CSS::CompleteGetIdentityServiceStatus
       
  1243     (
       
  1244     TInt aResult,                // Completion result value
       
  1245     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  1246     )
       
  1247   {
       
  1248   RMobilePhone::TMobilePhoneIdServiceStatus unpackedStatusETel;
       
  1249 
       
  1250   _LIT8( KResult, "CompleteGetIdentityServiceStatus result: %d" );
       
  1251   iSSLog->Log((TDesC8)KResult, aResult );
       
  1252 
       
  1253   if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
  1254       {
       
  1255       aDataPackage->UnPackData( unpackedStatusETel );
       
  1256       _LIT8( KStatusETel,
       
  1257           "CompleteGetIdentityServiceStatus unpackedStatusETel: %d" );
       
  1258       iSSLog->Log((TDesC8)KStatusETel, unpackedStatusETel );
       
  1259 
       
  1260       if ( iStatusETel != unpackedStatusETel )
       
  1261           {
       
  1262           aResult = KErrGeneral;
       
  1263           }
       
  1264       }
       
  1265 
       
  1266   if ( KErrNone != aResult )
       
  1267     {
       
  1268     _LIT8( KFail, "CompleteGetIdentityServiceStatus Failed: %d" );
       
  1269       iSSLog->Log((TDesC8)KFail, aResult );
       
  1270     }
       
  1271 
       
  1272   Signal( aResult );
       
  1273 
       
  1274   }
       
  1275 
       
  1276 // -----------------------------------------------------------------------------
       
  1277 // CSS::GetIccCallForwardingStatus
       
  1278 // Getting call forwarding status
       
  1279 // -----------------------------------------------------------------------------
       
  1280 //
       
  1281 
       
  1282 TInt CSS::GetIccCallForwardingStatus( CStifItemParser& aItem )
       
  1283     {
       
  1284     TPtrC checkForwardings;
       
  1285 
       
  1286     aItem.GetNextString ( checkForwardings );
       
  1287 
       
  1288     if ( ( _L("CHECK_ALL_FORWARDINGS") == checkForwardings ) &&
       
  1289          ( iHandleSpecifiedRequests ) )
       
  1290         {
       
  1291         iAllForwardingsOn = ETrue;
       
  1292         }
       
  1293     else
       
  1294         {
       
  1295         iAllForwardingsOn = EFalse;
       
  1296         }
       
  1297 
       
  1298     _LIT8(KSsInit, "SS::GetIccCallForwardingStatus");
       
  1299     iSSLog->Log((TDesC8)KSsInit);
       
  1300 
       
  1301     TInt ret( KErrNotFound );
       
  1302     ret = HandleRequestL( ECustomGetIccCallForwardingStatusIPC );
       
  1303 
       
  1304     if ( KErrNone == ret )
       
  1305         {
       
  1306         _LIT8( KSendOk, "GetIccCallForwardingStatus request send ok" );
       
  1307         iSSLog->Log((TDesC8)KSendOk );
       
  1308       }
       
  1309     else
       
  1310         {
       
  1311         _LIT8( KSendFailed, "GetIccCallForwardingStatus request send failed: %d" );
       
  1312         iSSLog->Log((TDesC8)KSendFailed, ret );
       
  1313       }
       
  1314 
       
  1315     return ret;
       
  1316 
       
  1317     }
       
  1318 
       
  1319 
       
  1320 // -----------------------------------------------------------------------------
       
  1321 // CSS::CompleteGetIccCallForwardingStatus
       
  1322 // Complete GetIccCallForwardingStatus method function.
       
  1323 // -----------------------------------------------------------------------------
       
  1324 //
       
  1325 void CSS::CompleteGetIccCallForwardingStatus
       
  1326     (
       
  1327     TInt aResult, //Completion result value
       
  1328     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  1329     )
       
  1330   {
       
  1331   _LIT8( KResult, "CompleteGetIccCallForwardingStatus result: %d" );
       
  1332   iSSLog->Log((TDesC8)KResult, aResult );
       
  1333 
       
  1334   // checking results and unpacking message
       
  1335   if ( KErrNone == aResult )
       
  1336       {
       
  1337       RMmCustomAPI::TCFIndicators* tCFIndicators = NULL;
       
  1338       aDataPackage->UnPackData( &tCFIndicators );
       
  1339 
       
  1340       iSSLog->Log( _L("Subscriber Profile ID = 0x%x"), &tCFIndicators->iMultipleSubscriberProfileID );
       
  1341 
       
  1342       iSSLog->Log( _L("CF Number = %S"), &tCFIndicators->iCFNumber );
       
  1343 
       
  1344       if ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorVoice )
       
  1345           {
       
  1346           _LIT8(KResultOk, "CF Voice Indicator status Active" );
       
  1347           iSSLog->Log((TDesC8)KResultOk);
       
  1348           }
       
  1349       if ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorFax )
       
  1350           {
       
  1351           _LIT8(KResultOk, "CF Fax Indicator status Active" );
       
  1352           iSSLog->Log((TDesC8)KResultOk);
       
  1353           }
       
  1354       if ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorData )
       
  1355           {
       
  1356           _LIT8(KResultOk, "CF Data Indicator status Active" );
       
  1357           iSSLog->Log((TDesC8)KResultOk);
       
  1358           }
       
  1359 
       
  1360       if ( ( iAllForwardingsOn ) &&
       
  1361            ( iHandleSpecifiedRequests ) )
       
  1362           {
       
  1363           if ( ( ! ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorVoice ) ) ||
       
  1364                ( ! ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorFax ) ) ||
       
  1365                ( ! ( tCFIndicators->iIndicator & RMobilePhone::KCFUIndicatorData ) ) )
       
  1366               {
       
  1367               aResult = KErrGeneral;
       
  1368               }
       
  1369           }
       
  1370       }
       
  1371   else
       
  1372       {
       
  1373       _LIT8( KFail, "CompleteGetIccCallForwardingStatus Failed: %d" );
       
  1374       iSSLog->Log((TDesC8)KFail, aResult );
       
  1375       }
       
  1376 
       
  1377   iAllForwardingsOn = EFalse;
       
  1378 
       
  1379   Signal( aResult );
       
  1380 
       
  1381   }
       
  1382 
       
  1383 // -----------------------------------------------------------------------------
       
  1384 // CSS::GetIccMessageWaitingIndicators
       
  1385 // Setting call forwarding status
       
  1386 // -----------------------------------------------------------------------------
       
  1387 //
       
  1388 
       
  1389 TInt CSS::GetIccMessageWaitingIndicators( CStifItemParser& aItem )
       
  1390     {
       
  1391 
       
  1392     TPtrC typeString;
       
  1393     TPtrC voiceMailString;
       
  1394     TInt numberOfVoicemails( 0 );
       
  1395     TPtrC faxMailString;
       
  1396     TInt numberOfFaxmails( 0 );
       
  1397     TPtrC emailMailString;
       
  1398     TInt numberOfEmails( 0 );
       
  1399     TInt ret( KErrNotFound );
       
  1400 
       
  1401     _LIT8(KSsInit, "SS::GetIccMessageWaitingIndicators");
       
  1402     iSSLog->Log((TDesC8)KSsInit);
       
  1403 
       
  1404     aItem.GetNextString ( typeString );
       
  1405 
       
  1406     if ( _L("Rel4") == typeString )
       
  1407         {
       
  1408         iIccMessageWaitingIndicatorsType = EIccIndicationRel4;
       
  1409         }
       
  1410     else if ( _L("CPHS") == typeString )
       
  1411         {
       
  1412         iIccMessageWaitingIndicatorsType = EIccIndicationCPHS;
       
  1413         }
       
  1414     else
       
  1415         {
       
  1416         _LIT8( KNotSupported, "GetIccMessageWaitingIndicators - unknown type" );
       
  1417         iSSLog->Log((TDesC8)KNotSupported );
       
  1418         }
       
  1419 
       
  1420     if ( iHandleSpecifiedRequests )
       
  1421         {
       
  1422         aItem.GetNextString ( voiceMailString );
       
  1423         if ( _L("KDisplayVoicemailActive") == voiceMailString )
       
  1424             {
       
  1425             iMSGWaiting.iDisplayStatus
       
  1426                 |= RMobilePhone::KDisplayVoicemailActive;
       
  1427             aItem.GetNextInt ( numberOfVoicemails );
       
  1428             iMSGWaiting.iVoiceMsgs = numberOfVoicemails;
       
  1429             }
       
  1430 
       
  1431         aItem.GetNextString ( faxMailString );
       
  1432         if ( _L("KDisplayFaxActive") == faxMailString )
       
  1433             {
       
  1434             iMSGWaiting.iDisplayStatus |= RMobilePhone::KDisplayFaxActive;
       
  1435             aItem.GetNextInt ( numberOfFaxmails );
       
  1436             iMSGWaiting.iFaxMsgs = numberOfFaxmails;
       
  1437             }
       
  1438 
       
  1439         aItem.GetNextString ( emailMailString );
       
  1440         if ( _L("KDisplayEmailActive") == emailMailString )
       
  1441             {
       
  1442             iMSGWaiting.iDisplayStatus |= RMobilePhone::KDisplayEmailActive;
       
  1443             aItem.GetNextInt ( numberOfEmails );
       
  1444             iMSGWaiting.iEmailMsgs = numberOfEmails;
       
  1445             }
       
  1446         }
       
  1447 
       
  1448     ret = HandleRequestL( EMobilePhoneGetIccMessageWaitingIndicators );
       
  1449 
       
  1450     if ( KErrNone == ret )
       
  1451         {
       
  1452         _LIT8( KSendOk, "GetIccMessageWaitingIndicators request send ok" );
       
  1453         iSSLog->Log((TDesC8)KSendOk );
       
  1454         }
       
  1455     else
       
  1456         {
       
  1457         _LIT8( KSendFailed, "GetIccMessageWaitingIndicators request send failed: %d" );
       
  1458         iSSLog->Log((TDesC8)KSendFailed, ret );
       
  1459         }
       
  1460 
       
  1461   return ret;
       
  1462 
       
  1463   }
       
  1464 
       
  1465 
       
  1466 // -----------------------------------------------------------------------------
       
  1467 // CSS::CompleteGetIccMessageWaitingIndicators
       
  1468 // Complete GetIccMessageWaitingIndicators method function.
       
  1469 // -----------------------------------------------------------------------------
       
  1470 //
       
  1471 void CSS::CompleteGetIccMessageWaitingIndicators
       
  1472     (
       
  1473     TInt aResult, //Completion result value
       
  1474     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  1475     )
       
  1476     {
       
  1477     _LIT8( KResult, "CompleteGetIccMessageWaitingIndicators result: %d" );
       
  1478     iSSLog->Log((TDesC8)KResult, aResult );
       
  1479 
       
  1480     if ( KErrNone == aResult )
       
  1481         {
       
  1482         RMobilePhone::TMobilePhoneMessageWaitingV1* msgWaiting = NULL;
       
  1483 
       
  1484         aDataPackage->UnPackData( &msgWaiting );
       
  1485 
       
  1486         if ( EIccIndicationRel4 == iIccMessageWaitingIndicatorsType )
       
  1487             {
       
  1488 
       
  1489             // Check data returned by Nokia TSY
       
  1490             if ( iHandleSpecifiedRequests )
       
  1491                 {
       
  1492                 if ( iMSGWaiting.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive )
       
  1493                     {
       
  1494                     if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayVoicemailActive )
       
  1495                         {
       
  1496                         if ( iMSGWaiting.iVoiceMsgs != msgWaiting->iVoiceMsgs )
       
  1497                             {
       
  1498                             _LIT8(KVoiceMsgs, "Number of Voice messages incorrect" );
       
  1499                             iSSLog->Log((TDesC8)KVoiceMsgs);
       
  1500                             aResult = KErrGeneral;
       
  1501                             }
       
  1502                         }
       
  1503                     else
       
  1504                         {
       
  1505                         _LIT8(KDisplayVoicemailActive, "Display Status KDisplayVoicemailActive NOT expected" );
       
  1506                         iSSLog->Log((TDesC8)KDisplayVoicemailActive);
       
  1507                         aResult = KErrGeneral;
       
  1508                         }
       
  1509                     }
       
  1510 
       
  1511                 if ( iMSGWaiting.iDisplayStatus & RMobilePhone::KDisplayFaxActive )
       
  1512                     {
       
  1513                     if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayFaxActive )
       
  1514                         {
       
  1515                         if ( iMSGWaiting.iFaxMsgs != msgWaiting->iFaxMsgs )
       
  1516                             {
       
  1517                             _LIT8(KFaxMsgs, "Number of Fax messages incorrect" );
       
  1518                             iSSLog->Log((TDesC8)KFaxMsgs);
       
  1519                             aResult = KErrGeneral;
       
  1520                             }
       
  1521                         }
       
  1522                     else
       
  1523                         {
       
  1524                         _LIT8(KDisplayFaxActive, "Display Status KDisplayFaxActive NOT expected" );
       
  1525                         iSSLog->Log((TDesC8)KDisplayFaxActive);
       
  1526                         aResult = KErrGeneral;
       
  1527                         }
       
  1528                     }
       
  1529 
       
  1530                 if ( iMSGWaiting.iDisplayStatus & RMobilePhone::KDisplayEmailActive )
       
  1531                     {
       
  1532                     if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayEmailActive )
       
  1533                         {
       
  1534                         if ( iMSGWaiting.iEmailMsgs != msgWaiting->iEmailMsgs )
       
  1535                             {
       
  1536                             _LIT8(KMailMsgs, "Number of EMail messages incorrect" );
       
  1537                             iSSLog->Log((TDesC8)KMailMsgs);
       
  1538                             aResult = KErrGeneral;
       
  1539                             }
       
  1540                         }
       
  1541                     else
       
  1542                         {
       
  1543                         _LIT8(KDisplayEmailActive, "Display Status KDisplayEmailActive NOT expected" );
       
  1544                         iSSLog->Log((TDesC8)KDisplayEmailActive);
       
  1545                         aResult = KErrGeneral;
       
  1546                         }
       
  1547                     }
       
  1548                 }
       
  1549 
       
  1550                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayVoicemailActive )
       
  1551                     {
       
  1552                     _LIT8(KResultOk, "Display Voicemail Active" );
       
  1553                     iSSLog->Log((TDesC8)KResultOk);
       
  1554                     if ( msgWaiting->iVoiceMsgs )
       
  1555                         {
       
  1556                         iSSLog->Log( _L("Voice Messages: %d"), msgWaiting->iVoiceMsgs );
       
  1557                         }
       
  1558                     }
       
  1559                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive )
       
  1560                     {
       
  1561                     _LIT8(KResultOk, "Display Aux Voicemail Active" );
       
  1562                     iSSLog->Log((TDesC8)KResultOk);
       
  1563                     if ( msgWaiting->iAuxVoiceMsgs )
       
  1564                         {
       
  1565                         iSSLog->Log( _L("Aux. Voice Messages: %d"), msgWaiting->iAuxVoiceMsgs );
       
  1566                         }
       
  1567                     }
       
  1568                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayFaxActive )
       
  1569                     {
       
  1570                     _LIT8(KResultOk, "Display Fax Active" );
       
  1571                     iSSLog->Log((TDesC8)KResultOk);
       
  1572                     if ( msgWaiting->iFaxMsgs )
       
  1573                         {
       
  1574                         iSSLog->Log( _L("Fax Messages: %d"), msgWaiting->iFaxMsgs );
       
  1575                         }
       
  1576                     }
       
  1577                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayEmailActive )
       
  1578                     {
       
  1579                     _LIT8(KResultOk, "Display Email Active" );
       
  1580                     iSSLog->Log((TDesC8)KResultOk);
       
  1581                     if ( msgWaiting->iEmailMsgs )
       
  1582                         {
       
  1583                         iSSLog->Log( _L("Email Messages: %d"), msgWaiting->iEmailMsgs );
       
  1584                         }
       
  1585                     }
       
  1586                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayOtherActive )
       
  1587                     {
       
  1588                     _LIT8(KResultOk, "Display Other Active" );
       
  1589                     iSSLog->Log((TDesC8)KResultOk);
       
  1590                     if ( msgWaiting->iOtherMsgs )
       
  1591                         {
       
  1592                         iSSLog->Log( _L("Other Messages: %d"), msgWaiting->iOtherMsgs );
       
  1593                         }
       
  1594                     }
       
  1595                 if ( msgWaiting->iDisplayStatus & RMobilePhone::KDisplayDataActive )
       
  1596                     {
       
  1597                     _LIT8(KResultOk, "Display Data Active" );
       
  1598                     iSSLog->Log((TDesC8)KResultOk);
       
  1599                     if ( msgWaiting->iDataMsgs )
       
  1600                         {
       
  1601                         iSSLog->Log( _L("Data Messages: %d"), msgWaiting->iDataMsgs );
       
  1602                         }
       
  1603                     }
       
  1604 
       
  1605                 iSSLog->Log(_L8("CSS::CompleteGetIccMessageWaitingIndicators OK."));
       
  1606             }
       
  1607         else if ( EIccIndicationCPHS == iIccMessageWaitingIndicatorsType )
       
  1608             {
       
  1609             // Check data returned by Nokia TSY
       
  1610             if ( iHandleSpecifiedRequests )
       
  1611                 {
       
  1612                 if ( iMSGWaiting.iDisplayStatus
       
  1613                     & RMobilePhone::KDisplayVoicemailActive )
       
  1614                     {
       
  1615                     if ( !( msgWaiting->iDisplayStatus
       
  1616                         & RMobilePhone::KDisplayVoicemailActive ) )
       
  1617                         {
       
  1618                         _LIT8( KDisplayVoicemailActive, "Display Status KDisplayVoicemailActive NOT expected" );
       
  1619                         iSSLog->Log( ( TDesC8 )KDisplayVoicemailActive );
       
  1620                         aResult = KErrGeneral;
       
  1621                         }
       
  1622                     }
       
  1623 
       
  1624                 if ( iMSGWaiting.iDisplayStatus
       
  1625                     & RMobilePhone::KDisplayFaxActive )
       
  1626                     {
       
  1627                     if ( !( msgWaiting->iDisplayStatus
       
  1628                         & RMobilePhone::KDisplayFaxActive ) )
       
  1629                         {
       
  1630                         _LIT8( KDisplayFaxActive, "Display Status KDisplayFaxActive NOT expected" );
       
  1631                         iSSLog->Log( ( TDesC8 )KDisplayFaxActive );
       
  1632                         aResult = KErrGeneral;
       
  1633                         }
       
  1634                     }
       
  1635 
       
  1636                 if ( iMSGWaiting.iDisplayStatus
       
  1637                     & RMobilePhone::KDisplayEmailActive )
       
  1638                     {
       
  1639                     if ( !( msgWaiting->iDisplayStatus
       
  1640                         & RMobilePhone::KDisplayEmailActive ) )
       
  1641                         {
       
  1642                         _LIT8( KDisplayEmailActive, "Display Status KDisplayEmailActive NOT expected" );
       
  1643                         iSSLog->Log( ( TDesC8 )KDisplayEmailActive );
       
  1644                         aResult = KErrGeneral;
       
  1645                         }
       
  1646                     }
       
  1647                 } // if ( iHandleSpecifiedRequests )
       
  1648                 iSSLog->Log( _L8( "CSS::CompleteGetIccMessageWaitingIndicators OK." ) );
       
  1649             } //  else if ( EIccIndicationCPHS == iIccMessageWaitingIndicatorsType )
       
  1650         } // if ( KErrNone == aResult )
       
  1651 
       
  1652     else
       
  1653         {
       
  1654         _LIT8( KFail, "CompleteGetIccMessageWaitingIndicators Failed: %d" );
       
  1655         iSSLog->Log((TDesC8)KFail, aResult );
       
  1656         }
       
  1657 
       
  1658     Signal( aResult );
       
  1659 
       
  1660     }
       
  1661 
       
  1662 // -----------------------------------------------------------------------------
       
  1663 // CSS::SetIccMessageWaitingIndicators
       
  1664 // Setting call forwarding status
       
  1665 // -----------------------------------------------------------------------------
       
  1666 //
       
  1667 TInt CSS::SetIccMessageWaitingIndicators( CStifItemParser& aItem )
       
  1668     {
       
  1669     _LIT8(KSsInit, "SS::SetIccMessageWaitingIndicators");
       
  1670     iSSLog->Log((TDesC8)KSsInit);
       
  1671 
       
  1672     TInt ret( KErrNotFound );
       
  1673     TBool supported( ETrue );
       
  1674     TInt displayStatus( 0 );
       
  1675     TInt voiceMsgs( 0 );
       
  1676     TInt auxVoiceMsgs( 0 );
       
  1677     TInt dataMsgs( 0 );
       
  1678     TInt faxMsgs( 0 );
       
  1679     TInt emailMsgs( 0 );
       
  1680     TInt otherMsgs( 0 );
       
  1681 
       
  1682     RMobilePhone::TMobilePhoneMessageWaitingV1 displayMsgs;
       
  1683 
       
  1684     aItem.GetNextInt ( displayStatus );
       
  1685     displayMsgs.iDisplayStatus = displayStatus;
       
  1686 
       
  1687     if ( displayStatus > 0 )
       
  1688         {
       
  1689         aItem.GetNextInt ( voiceMsgs );
       
  1690         aItem.GetNextInt ( auxVoiceMsgs );
       
  1691         aItem.GetNextInt ( dataMsgs );
       
  1692         aItem.GetNextInt ( faxMsgs );
       
  1693         aItem.GetNextInt ( emailMsgs );
       
  1694         aItem.GetNextInt ( otherMsgs );
       
  1695 
       
  1696 
       
  1697         displayMsgs.iVoiceMsgs = voiceMsgs;
       
  1698         displayMsgs.iAuxVoiceMsgs = auxVoiceMsgs;
       
  1699         displayMsgs.iDataMsgs = dataMsgs;
       
  1700         displayMsgs.iFaxMsgs = faxMsgs;
       
  1701         displayMsgs.iEmailMsgs = emailMsgs;
       
  1702         displayMsgs.iOtherMsgs = otherMsgs;
       
  1703 
       
  1704         if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive )
       
  1705             {
       
  1706                 _LIT8(KResultOk, "Display Voicemail Set Active" );
       
  1707                 iSSLog->Log((TDesC8)KResultOk);
       
  1708                 if ( displayMsgs.iVoiceMsgs )
       
  1709                     {
       
  1710                     iSSLog->Log( _L("Voice Messages: %d"), displayMsgs.iVoiceMsgs );
       
  1711                     }
       
  1712             }
       
  1713           if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive )
       
  1714             {
       
  1715                 _LIT8(KResultOk, "Display Aux Voicemail Set Active" );
       
  1716                 iSSLog->Log((TDesC8)KResultOk);
       
  1717                 if ( displayMsgs.iAuxVoiceMsgs )
       
  1718                     {
       
  1719                 iSSLog->Log( _L("Aux. Voice Messages: %d"), displayMsgs.iAuxVoiceMsgs );
       
  1720                     }
       
  1721             }
       
  1722         if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayFaxActive )
       
  1723             {
       
  1724                 _LIT8(KResultOk, "Display Fax Set Active" );
       
  1725                 iSSLog->Log((TDesC8)KResultOk);
       
  1726                 if ( displayMsgs.iFaxMsgs )
       
  1727                     {
       
  1728                 iSSLog->Log( _L("Fax Messages: %d"), displayMsgs.iFaxMsgs );
       
  1729                     }
       
  1730             }
       
  1731         if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayEmailActive )
       
  1732             {
       
  1733                 _LIT8(KResultOk, "Display Email Set Active" );
       
  1734                 iSSLog->Log((TDesC8)KResultOk);
       
  1735                 if ( displayMsgs.iEmailMsgs )
       
  1736                     {
       
  1737                 iSSLog->Log( _L("Email Messages: %d"), displayMsgs.iEmailMsgs );
       
  1738                     }
       
  1739             }
       
  1740         if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayOtherActive )
       
  1741             {
       
  1742                 _LIT8(KResultOk, "Display Other Set Active" );
       
  1743                 iSSLog->Log((TDesC8)KResultOk);
       
  1744                 if ( displayMsgs.iOtherMsgs )
       
  1745                     {
       
  1746                 iSSLog->Log( _L("Other Messages: %d"), displayMsgs.iOtherMsgs );
       
  1747                     }
       
  1748             }
       
  1749         if ( displayMsgs.iDisplayStatus & RMobilePhone::KDisplayDataActive )
       
  1750             {
       
  1751                 _LIT8(KResultOk, "Display Data Active" );
       
  1752                 iSSLog->Log((TDesC8)KResultOk);
       
  1753                 if ( displayMsgs.iDataMsgs )
       
  1754                     {
       
  1755                 iSSLog->Log( _L("Data Messages: %d"), displayMsgs.iDataMsgs );
       
  1756                     }
       
  1757             }
       
  1758         }
       
  1759     else
       
  1760         {
       
  1761         _LIT8(KNotSupp, "SS::Selected display status for Icc Message Waiting Indicators not supported");
       
  1762         iSSLog->Log((TDesC8)KNotSupp);
       
  1763         supported = EFalse;
       
  1764         }
       
  1765 
       
  1766     if( supported )
       
  1767         {
       
  1768         //Create package
       
  1769           CMmDataPackage package;
       
  1770         // Set package data
       
  1771         package.PackData( &displayMsgs );
       
  1772 
       
  1773         ret = HandleRequestL( EMobilePhoneSetIccMessageWaitingIndicators,
       
  1774                               &package );
       
  1775 
       
  1776         if ( KErrNone == ret )
       
  1777             {
       
  1778             _LIT8( KSendOk, "SetIccMessageWaitingIndicators request send ok" );
       
  1779             iSSLog->Log((TDesC8)KSendOk );
       
  1780           }
       
  1781         else
       
  1782             {
       
  1783              _LIT8( KSendFailed, "SetIccMessageWaitingIndicators request send failed: %d" );
       
  1784             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  1785             }
       
  1786         }
       
  1787     else
       
  1788         {
       
  1789         ret = KErrNotSupported;
       
  1790         }
       
  1791 
       
  1792   return ret;
       
  1793   }
       
  1794 
       
  1795 // -----------------------------------------------------------------------------
       
  1796 // CSS::CompleteSetIccMessageWaitingIndicators
       
  1797 // Complete SetIccMessageWaitingIndicators method function.
       
  1798 // -----------------------------------------------------------------------------
       
  1799 //
       
  1800 void CSS::CompleteSetIccMessageWaitingIndicators
       
  1801     (
       
  1802     TInt aResult
       
  1803     )
       
  1804   {
       
  1805   _LIT8( KResult, "CompleteSetIccMessageWaitingIndicators result: %d" );
       
  1806   iSSLog->Log((TDesC8)KResult, aResult );
       
  1807 
       
  1808   if( KErrNone != aResult )
       
  1809       {
       
  1810       _LIT8( KFail, "CompleteSetIccMessageWaitingIndicators Failed: %d" );
       
  1811       iSSLog->Log((TDesC8)KFail, aResult );
       
  1812       }
       
  1813 
       
  1814   Signal( aResult );
       
  1815   }
       
  1816 
       
  1817 // -----------------------------------------------------------------------------
       
  1818 // CSS::SetCallBarringStatus
       
  1819 // Setting call barring status
       
  1820 // -----------------------------------------------------------------------------
       
  1821 //
       
  1822 
       
  1823 TInt CSS::SetCallBarringStatus( CStifItemParser& aItem )
       
  1824     {
       
  1825     _LIT8(KPbInit, "SS::SetCallBarringStatus");
       
  1826     iSSLog->Log((TDesC8)KPbInit);
       
  1827 
       
  1828     TInt ret( KErrNotFound );
       
  1829     TBool supported( ETrue );
       
  1830     TPtrC string;
       
  1831     TPtrC groupstring;
       
  1832     TPtrC actionstring;
       
  1833     TPtrC passwordstring;
       
  1834 
       
  1835     aItem.GetNextString ( string );
       
  1836     aItem.GetNextString ( groupstring );
       
  1837     aItem.GetNextString ( actionstring );
       
  1838     aItem.GetNextString ( passwordstring );
       
  1839 
       
  1840 
       
  1841     RMobilePhone::TMobilePhoneCBCondition condition;
       
  1842 
       
  1843 
       
  1844     if ( _L("BarUnspecified") == string )
       
  1845       {
       
  1846       condition = RMobilePhone::EBarUnspecified;
       
  1847       }
       
  1848     else if ( _L("BarAllIncoming") == string )
       
  1849       {
       
  1850       condition = RMobilePhone::EBarAllIncoming;
       
  1851       if ( iHandleSpecifiedRequests )
       
  1852           {
       
  1853           iCBCondition = RMobilePhone::EBarAllIncoming;
       
  1854           }
       
  1855       }
       
  1856     else if ( _L("BarIncomingRoaming") == string )
       
  1857       {
       
  1858       condition = RMobilePhone::EBarIncomingRoaming;
       
  1859       if ( iHandleSpecifiedRequests )
       
  1860           {
       
  1861           iCBCondition = RMobilePhone::EBarIncomingRoaming;
       
  1862           }
       
  1863       }
       
  1864     else if ( _L("BarAllOutgoing") == string )
       
  1865       {
       
  1866       condition = RMobilePhone::EBarAllOutgoing;
       
  1867       if ( iHandleSpecifiedRequests )
       
  1868           {
       
  1869           iCBCondition = RMobilePhone::EBarAllOutgoing;
       
  1870           }
       
  1871       }
       
  1872     else if ( _L("BarOutgoingInternational") == string )
       
  1873       {
       
  1874       condition = RMobilePhone::EBarOutgoingInternational;
       
  1875       if ( iHandleSpecifiedRequests )
       
  1876           {
       
  1877           iCBCondition = RMobilePhone::EBarOutgoingInternational;
       
  1878           }
       
  1879       }
       
  1880     else if ( _L("BarOutgoingInternationalExHC") == string )
       
  1881       {
       
  1882       condition = RMobilePhone::EBarOutgoingInternationalExHC;
       
  1883       if ( iHandleSpecifiedRequests )
       
  1884           {
       
  1885           iCBCondition = RMobilePhone::EBarOutgoingInternationalExHC;
       
  1886           }
       
  1887       }
       
  1888     else if ( _L("BarAllCases") == string )
       
  1889       {
       
  1890       condition = RMobilePhone::EBarAllCases;
       
  1891       if ( iHandleSpecifiedRequests )
       
  1892           {
       
  1893           iCBCondition = RMobilePhone::EBarAllCases;
       
  1894           }
       
  1895       }
       
  1896     else if ( _L("BarAllOutgoingServices") == string )
       
  1897       {
       
  1898       condition = RMobilePhone::EBarAllOutgoingServices;
       
  1899       if ( iHandleSpecifiedRequests )
       
  1900           {
       
  1901           iCBCondition = RMobilePhone::EBarAllOutgoingServices;
       
  1902           }
       
  1903       }
       
  1904     else if ( _L("BarAllIncomingServices") == string )
       
  1905       {
       
  1906       condition = RMobilePhone::EBarAllIncomingServices;
       
  1907       if ( iHandleSpecifiedRequests )
       
  1908           {
       
  1909           iCBCondition = RMobilePhone::EBarAllIncomingServices;
       
  1910           }
       
  1911       }
       
  1912     else
       
  1913       {
       
  1914      _LIT8(KNotSupp, "SS::Selected condition for set call barring not supported");
       
  1915         iSSLog->Log((TDesC8)KNotSupp);
       
  1916       supported = EFalse;
       
  1917       }
       
  1918 
       
  1919 
       
  1920 
       
  1921     RMobilePhone::TMobilePhoneCBChangeV1 group;
       
  1922 
       
  1923     if ( _L("ServiceUnspecified") == groupstring )
       
  1924       {
       
  1925       group.iServiceGroup = RMobilePhone::EServiceUnspecified;
       
  1926       }
       
  1927     else if ( _L("VoiceService") == groupstring )
       
  1928       {
       
  1929       group.iServiceGroup = RMobilePhone::EVoiceService;
       
  1930       }
       
  1931     else if ( _L("AuxVoiceService") == groupstring )
       
  1932       {
       
  1933       group.iServiceGroup = RMobilePhone::EAuxVoiceService;
       
  1934       }
       
  1935     else if ( _L("CircuitDataService") == groupstring )
       
  1936       {
       
  1937       group.iServiceGroup = RMobilePhone::ECircuitDataService;
       
  1938       }
       
  1939     else if ( _L("PacketDataService") == groupstring )
       
  1940       {
       
  1941       group.iServiceGroup = RMobilePhone::EPacketDataService;
       
  1942       }
       
  1943     else if ( _L("FaxService") == groupstring )
       
  1944       {
       
  1945       group.iServiceGroup = RMobilePhone::EFaxService;
       
  1946       }
       
  1947     else if ( _L("ShortMessageService") == groupstring )
       
  1948       {
       
  1949       group.iServiceGroup = RMobilePhone::EShortMessageService;
       
  1950       }
       
  1951     else if ( _L("AllServices") == groupstring )
       
  1952       {
       
  1953       group.iServiceGroup = RMobilePhone::EAllServices;
       
  1954       }
       
  1955     else if ( _L("AllTele") == groupstring )
       
  1956       {
       
  1957       group.iServiceGroup = RMobilePhone::EAllTele;
       
  1958       }
       
  1959     else if ( _L("Telephony") == groupstring )
       
  1960       {
       
  1961       group.iServiceGroup = RMobilePhone::ETelephony;
       
  1962       }
       
  1963     else if ( _L("AllDataTele") == groupstring )
       
  1964       {
       
  1965       group.iServiceGroup = RMobilePhone::EAllDataTele;
       
  1966       }
       
  1967     else if ( _L("AllDataExSms") == groupstring )
       
  1968       {
       
  1969       group.iServiceGroup = RMobilePhone::EAllDataExSms;
       
  1970       }
       
  1971     else if ( _L("AllTeleExcSms") == groupstring )
       
  1972       {
       
  1973       group.iServiceGroup = RMobilePhone::EAllTeleExcSms;
       
  1974       }
       
  1975     else
       
  1976       {
       
  1977      _LIT8(KNotSupp, "SS::Selected set call forwarding servicegroup not supported");
       
  1978         iSSLog->Log((TDesC8)KNotSupp);
       
  1979       supported = EFalse;
       
  1980       }
       
  1981 
       
  1982     if ( _L("ServiceActionRegister") == actionstring )
       
  1983       {
       
  1984       group.iAction = RMobilePhone::EServiceActionRegister;
       
  1985       }
       
  1986     else if ( _L("ServiceActionActivate") == actionstring )
       
  1987       {
       
  1988       group.iAction = RMobilePhone::EServiceActionActivate;
       
  1989       }
       
  1990     else if ( _L("ServiceActionDeactivate") == actionstring )
       
  1991       {
       
  1992       group.iAction = RMobilePhone::EServiceActionDeactivate;
       
  1993       }
       
  1994     else if ( _L("ServiceActionErase") == actionstring )
       
  1995       {
       
  1996       group.iAction = RMobilePhone::EServiceActionErase;
       
  1997       }
       
  1998     else if ( _L("ServiceActionUnspecified") == actionstring )
       
  1999       {
       
  2000       group.iAction = RMobilePhone::EServiceActionUnspecified;
       
  2001       }
       
  2002     else if ( _L("ServiceActionInvoke") == actionstring )
       
  2003       {
       
  2004       group.iAction = RMobilePhone::EServiceActionInvoke;
       
  2005       }
       
  2006     else
       
  2007       {
       
  2008      _LIT8(KNotSupp, "SS::Selected set call barring action not supported");
       
  2009         iSSLog->Log((TDesC8)KNotSupp);
       
  2010       supported = EFalse;
       
  2011       }
       
  2012 
       
  2013 
       
  2014     if ( KDontCare() != passwordstring)
       
  2015         {
       
  2016         group.iPassword.Copy(passwordstring);
       
  2017         }
       
  2018 
       
  2019 
       
  2020     if( supported )
       
  2021         {
       
  2022 
       
  2023           RMobilePhone::TMobilePhoneCBChangeV1* groupPtr = &group;
       
  2024 
       
  2025          //Create package
       
  2026         CMmDataPackage package;
       
  2027         // Set package data
       
  2028         package.PackData( &condition, &groupPtr);
       
  2029 
       
  2030         ret = HandleRequestL( EMobilePhoneSetCallBarringStatus,
       
  2031                               &package );
       
  2032 
       
  2033         if ( KErrNone == ret )
       
  2034             {
       
  2035             _LIT8( KSendOk, "SetCallBarringStatus request send ok" );
       
  2036             iSSLog->Log((TDesC8)KSendOk );
       
  2037           }
       
  2038         else
       
  2039             {
       
  2040              _LIT8( KSendFailed, "SetCallBarringStatus request send failed: %d" );
       
  2041             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2042             }
       
  2043         }
       
  2044     else
       
  2045         {
       
  2046         ret = KErrNotSupported;
       
  2047         }
       
  2048 
       
  2049   return ret;
       
  2050 
       
  2051 
       
  2052   }
       
  2053 
       
  2054 // -----------------------------------------------------------------------------
       
  2055 // CSS::CompleteSetCallBarringStatus
       
  2056 // Complete SetCallBarringStatus method function.
       
  2057 // -----------------------------------------------------------------------------
       
  2058 //
       
  2059 void CSS::CompleteSetCallBarringStatus
       
  2060     (
       
  2061     TInt aResult                // Completion result value
       
  2062     )
       
  2063   {
       
  2064   _LIT8( KResult, "CompleteSetCallBarringStatus result: %d" );
       
  2065   iSSLog->Log((TDesC8)KResult, aResult );
       
  2066 
       
  2067   if( KErrNone != aResult )
       
  2068     {
       
  2069     _LIT8( KFail, "CompleteSetCallBarringStatus Failed: %d" );
       
  2070       iSSLog->Log((TDesC8)KFail, aResult );
       
  2071     }
       
  2072 
       
  2073   Signal( aResult );
       
  2074 
       
  2075   }
       
  2076 
       
  2077 // -----------------------------------------------------------------------------
       
  2078 // CSS::SetCallForwardingStatus
       
  2079 // Setting call forwarding status
       
  2080 // -----------------------------------------------------------------------------
       
  2081 //
       
  2082 
       
  2083 TInt CSS::SetCallForwardingStatus( CStifItemParser& aItem )
       
  2084     {
       
  2085     _LIT8(KPbInit, "SS::SetCallForwardingStatus");
       
  2086     iSSLog->Log((TDesC8)KPbInit);
       
  2087 
       
  2088     TInt ret( KErrNotFound );
       
  2089     TBool supported( ETrue );
       
  2090     TPtrC string;
       
  2091     TPtrC groupstring;
       
  2092     TPtrC actionstring;
       
  2093     TPtrC numberstring;
       
  2094     TPtrC timestring;
       
  2095     TPtrC typestring;
       
  2096     TPtrC planstring;
       
  2097 
       
  2098     aItem.GetNextString ( string );
       
  2099     aItem.GetNextString ( groupstring );
       
  2100     aItem.GetNextString ( actionstring );
       
  2101     aItem.GetNextString ( typestring );
       
  2102     aItem.GetNextString ( planstring );
       
  2103     aItem.GetNextString ( numberstring );
       
  2104     aItem.GetNextString ( timestring );
       
  2105 
       
  2106     RMobilePhone::TMobilePhoneCFCondition condition;
       
  2107 
       
  2108 
       
  2109     if ( _L("CallForwardingUnspecified") == string )
       
  2110         {
       
  2111         condition = RMobilePhone::ECallForwardingUnspecified;
       
  2112         }
       
  2113     else if ( _L("CallForwardingUnconditional") == string )
       
  2114         {
       
  2115         condition = RMobilePhone::ECallForwardingUnconditional;
       
  2116         }
       
  2117     else if ( _L("CallForwardingBusy") == string )
       
  2118         {
       
  2119         condition = RMobilePhone::ECallForwardingBusy;
       
  2120         }
       
  2121     else if ( _L("CallForwardingNoReply") == string )
       
  2122         {
       
  2123         condition = RMobilePhone::ECallForwardingNoReply;
       
  2124         }
       
  2125     else if ( _L("CallForwardingNotReachable") == string )
       
  2126         {
       
  2127         condition = RMobilePhone::ECallForwardingNotReachable;
       
  2128         }
       
  2129     else if ( _L("CallForwardingAllCases") == string )
       
  2130         {
       
  2131         condition = RMobilePhone::ECallForwardingAllCases;
       
  2132         }
       
  2133     else if ( _L("CallForwardingAllConditionalCases") == string )
       
  2134         {
       
  2135         condition = RMobilePhone::ECallForwardingAllConditionalCases;
       
  2136         }
       
  2137     else
       
  2138         {
       
  2139         _LIT8(KNotSupp, "SS::Selected condition for call forwarding not supported");
       
  2140         iSSLog->Log((TDesC8)KNotSupp);
       
  2141         supported = EFalse;
       
  2142         }
       
  2143 
       
  2144     if ( supported && iHandleSpecifiedRequests )
       
  2145         {
       
  2146         iCFCondition = condition;
       
  2147         }
       
  2148 
       
  2149     RMobilePhone::TMobilePhoneCFChangeV1 group;
       
  2150 
       
  2151     if ( _L("ServiceUnspecified") == groupstring )
       
  2152         {
       
  2153         group.iServiceGroup = RMobilePhone::EServiceUnspecified;
       
  2154         }
       
  2155     else if ( _L("VoiceService") == groupstring )
       
  2156         {
       
  2157         group.iServiceGroup = RMobilePhone::EVoiceService;
       
  2158         }
       
  2159     else if ( _L("AuxVoiceService") == groupstring )
       
  2160         {
       
  2161         group.iServiceGroup = RMobilePhone::EAuxVoiceService;
       
  2162         }
       
  2163     else if ( _L("CircuitDataService") == groupstring )
       
  2164         {
       
  2165         group.iServiceGroup = RMobilePhone::ECircuitDataService;
       
  2166         }
       
  2167     else if ( _L("PacketDataService") == groupstring )
       
  2168         {
       
  2169         group.iServiceGroup = RMobilePhone::EPacketDataService;
       
  2170         }
       
  2171     else if ( _L("FaxService") == groupstring )
       
  2172         {
       
  2173         group.iServiceGroup = RMobilePhone::EFaxService;
       
  2174         }
       
  2175     else if ( _L("ShortMessageService") == groupstring )
       
  2176         {
       
  2177         group.iServiceGroup = RMobilePhone::EShortMessageService;
       
  2178         }
       
  2179     else if ( _L("AllServices") == groupstring )
       
  2180         {
       
  2181         group.iServiceGroup = RMobilePhone::EAllServices;
       
  2182         }
       
  2183     else if ( _L("AllTele") == groupstring )
       
  2184         {
       
  2185         group.iServiceGroup = RMobilePhone::EAllTele;
       
  2186         }
       
  2187     else if ( _L("Telephony") == groupstring )
       
  2188         {
       
  2189         group.iServiceGroup = RMobilePhone::ETelephony;
       
  2190         }
       
  2191     else if ( _L("AllDataTele") == groupstring )
       
  2192         {
       
  2193         group.iServiceGroup = RMobilePhone::EAllDataTele;
       
  2194         }
       
  2195      else if ( _L("AllDataExSms") == groupstring )
       
  2196         {
       
  2197         group.iServiceGroup = RMobilePhone::EAllDataExSms;
       
  2198         }
       
  2199     else if ( _L("AllTeleExcSms") == groupstring )
       
  2200         {
       
  2201         group.iServiceGroup = RMobilePhone::EAllTeleExcSms;
       
  2202         }
       
  2203     else
       
  2204         {
       
  2205         _LIT8(KNotSupp, "SS::Selected set call forwarding servicegroup not supported");
       
  2206         iSSLog->Log((TDesC8)KNotSupp);
       
  2207         supported = EFalse;
       
  2208         }
       
  2209 
       
  2210     if ( _L("ServiceActionRegister") == actionstring )
       
  2211         {
       
  2212         group.iAction = RMobilePhone::EServiceActionRegister;
       
  2213         }
       
  2214     else if ( _L("ServiceActionActivate") == actionstring )
       
  2215         {
       
  2216         group.iAction = RMobilePhone::EServiceActionActivate;
       
  2217         }
       
  2218     else if ( _L("ServiceActionDeactivate") == actionstring )
       
  2219         {
       
  2220         group.iAction = RMobilePhone::EServiceActionDeactivate;
       
  2221         }
       
  2222     else if ( _L("ServiceActionErase") == actionstring )
       
  2223         {
       
  2224         group.iAction = RMobilePhone::EServiceActionErase;
       
  2225         }
       
  2226     else
       
  2227         {
       
  2228         _LIT8(KNotSupp, "SS::Selected set call forwarding action not supported");
       
  2229         iSSLog->Log((TDesC8)KNotSupp);
       
  2230         supported = EFalse;
       
  2231         }
       
  2232 
       
  2233     if ( _L("UnknownNumber") == typestring )
       
  2234         {
       
  2235         group.iNumber.iTypeOfNumber = RMobilePhone::EUnknownNumber;
       
  2236         }
       
  2237     else if ( _L("InternationalNumber") == typestring )
       
  2238         {
       
  2239         group.iNumber.iTypeOfNumber = RMobilePhone::EInternationalNumber;
       
  2240         }
       
  2241     else if ( _L("NationalNumber") == typestring )
       
  2242         {
       
  2243         group.iNumber.iTypeOfNumber = RMobilePhone::ENationalNumber;
       
  2244         }
       
  2245     else if ( _L("NetworkSpecificNumber") == typestring )
       
  2246         {
       
  2247         group.iNumber.iTypeOfNumber = RMobilePhone::ENetworkSpecificNumber;
       
  2248         }
       
  2249     else if ( _L("SubscriberNumber") == typestring )
       
  2250         {
       
  2251         group.iNumber.iTypeOfNumber = RMobilePhone::ESubscriberNumber;
       
  2252         }
       
  2253     else if ( _L("AlphanumericNumber") == typestring )
       
  2254         {
       
  2255         group.iNumber.iTypeOfNumber = RMobilePhone::EAlphanumericNumber;
       
  2256         }
       
  2257     else if ( _L("AbbreviatedNumber") == typestring )
       
  2258         {
       
  2259         group.iNumber.iTypeOfNumber = RMobilePhone::EAbbreviatedNumber;
       
  2260         }
       
  2261     else
       
  2262         {
       
  2263         _LIT8(KNotSupp, "SS::Selected set call forwarding type of number not supported");
       
  2264         iSSLog->Log((TDesC8)KNotSupp);
       
  2265         supported = EFalse;
       
  2266         }
       
  2267 
       
  2268     if ( _L("UnknownNumberingPlan") == planstring )
       
  2269         {
       
  2270         group.iNumber.iNumberPlan = RMobilePhone::EUnknownNumberingPlan;
       
  2271         }
       
  2272     else if ( _L("IsdnNumberPlan") == planstring )
       
  2273         {
       
  2274         group.iNumber.iNumberPlan = RMobilePhone::EIsdnNumberPlan;
       
  2275         }
       
  2276     else if ( _L("DataNumberPlan") == planstring )
       
  2277         {
       
  2278         group.iNumber.iNumberPlan = RMobilePhone::EDataNumberPlan;
       
  2279         }
       
  2280     else if ( _L("TelexNumberPlan") == planstring )
       
  2281         {
       
  2282         group.iNumber.iNumberPlan = RMobilePhone::ETelexNumberPlan;
       
  2283         }
       
  2284     else if ( _L("ServiceCentreSpecificPlan1") == planstring )
       
  2285         {
       
  2286         group.iNumber.iNumberPlan = RMobilePhone::EServiceCentreSpecificPlan1;
       
  2287         }
       
  2288     else if ( _L("ServiceCentreSpecificPlan2") == planstring )
       
  2289         {
       
  2290         group.iNumber.iNumberPlan = RMobilePhone::EServiceCentreSpecificPlan2;
       
  2291         }
       
  2292     else if ( _L("NationalNumberPlan") == planstring )
       
  2293         {
       
  2294         group.iNumber.iNumberPlan = RMobilePhone::ENationalNumberPlan;
       
  2295         }
       
  2296     else if ( _L("PrivateNumberPlan") == planstring )
       
  2297         {
       
  2298         group.iNumber.iNumberPlan = RMobilePhone::EPrivateNumberPlan;
       
  2299         }
       
  2300     else if ( _L("ERMESNumberPlan") == planstring )
       
  2301         {
       
  2302         group.iNumber.iNumberPlan = RMobilePhone::EERMESNumberPlan;
       
  2303         }
       
  2304     else
       
  2305         {
       
  2306         _LIT8(KNotSupp, "SS::Selected set call forwarding number plan not supported");
       
  2307         iSSLog->Log((TDesC8)KNotSupp);
       
  2308         supported = EFalse;
       
  2309         }
       
  2310 
       
  2311     group.iNumber.iTelNumber.Copy(numberstring);
       
  2312 
       
  2313     if ( _L("CallForwardingNoReply") == string && _L("ServiceActionRegister") == actionstring)
       
  2314         {
       
  2315 
       
  2316         TLex lex(timestring);
       
  2317 
       
  2318         TInt dataValue = 0;
       
  2319         lex.Val(dataValue);
       
  2320 
       
  2321         for(TInt i = 5; i < 30; i = i+5)
       
  2322             {
       
  2323             if( dataValue == i )
       
  2324                 {
       
  2325                 group.iTimeout = i;
       
  2326                 }
       
  2327 
       
  2328             if( dataValue != i && i == 30 )
       
  2329                 {
       
  2330                 _LIT8(KNotSupp, "SS::Selected timeout is not supported");
       
  2331                     iSSLog->Log((TDesC8)KNotSupp);
       
  2332                 supported = EFalse;
       
  2333                 }
       
  2334             }
       
  2335         }
       
  2336     else
       
  2337         {
       
  2338             group.iTimeout = -1;
       
  2339         }
       
  2340 
       
  2341     if( supported )
       
  2342         {
       
  2343         RMobilePhone::TMobilePhoneCFChangeV1* groupPtr = &group;
       
  2344 
       
  2345          //Create package
       
  2346         CMmDataPackage package;
       
  2347         // Set package data
       
  2348         package.PackData( &condition, &groupPtr);
       
  2349 
       
  2350         ret = HandleRequestL(
       
  2351             EMobilePhoneSetCallForwardingStatus, &package );
       
  2352 
       
  2353         if ( KErrNone == ret )
       
  2354             {
       
  2355             _LIT8( KSendOk, "SetCallForwardingStatus request send ok" );
       
  2356             iSSLog->Log((TDesC8)KSendOk );
       
  2357             }
       
  2358         else
       
  2359             {
       
  2360             _LIT8( KSendFailed, "SetCallForwardingStatus request send failed: %d" );
       
  2361             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2362             }
       
  2363         }
       
  2364     else
       
  2365         {
       
  2366         ret = KErrNotSupported;
       
  2367         }
       
  2368 
       
  2369     return ret;
       
  2370     }
       
  2371 
       
  2372 // -----------------------------------------------------------------------------
       
  2373 // CSS::CompleteSetCallForwardingStatus
       
  2374 // Complete SetCallForwardingStatus method function.
       
  2375 // -----------------------------------------------------------------------------
       
  2376 //
       
  2377 void CSS::CompleteSetCallForwardingStatus
       
  2378     (
       
  2379     TInt aResult                 // Completion result value
       
  2380     )
       
  2381   {
       
  2382 
       
  2383   _LIT8( KResult, "CompleteSetCallForwardingStatus result: %d" );
       
  2384   iSSLog->Log((TDesC8)KResult, aResult );
       
  2385 
       
  2386   if ( KErrNone != aResult )
       
  2387     {
       
  2388     _LIT8( KFail, "CompleteSetCallForwardingStatus Failed: %d" );
       
  2389       iSSLog->Log((TDesC8)KFail, aResult );
       
  2390     }
       
  2391 
       
  2392   Signal( aResult );
       
  2393 
       
  2394   }
       
  2395 
       
  2396 // -----------------------------------------------------------------------------
       
  2397 // CSS::SetCallWaitingStatus
       
  2398 // Setting call waiting status
       
  2399 // -----------------------------------------------------------------------------
       
  2400 //
       
  2401 
       
  2402 TInt CSS::SetCallWaitingStatus( CStifItemParser& aItem )
       
  2403     {
       
  2404     _LIT8(KPbInit, "SS::SetCallWaitingStatus");
       
  2405     iSSLog->Log((TDesC8)KPbInit);
       
  2406 
       
  2407     TInt ret( KErrNotFound );
       
  2408     TBool supported( ETrue );
       
  2409     TPtrC groupstring;
       
  2410     TPtrC conditionstring;
       
  2411 
       
  2412     aItem.GetNextString ( groupstring );
       
  2413     aItem.GetNextString ( conditionstring );
       
  2414 
       
  2415     RMobilePhone::TMobileService group;
       
  2416 
       
  2417     if ( _L("ServiceUnspecified") == groupstring )
       
  2418       {
       
  2419       group = RMobilePhone::EServiceUnspecified;
       
  2420       }
       
  2421     else if ( _L("VoiceService") == groupstring )
       
  2422       {
       
  2423       group = RMobilePhone::EVoiceService;
       
  2424       }
       
  2425     else if ( _L("AuxVoiceService") == groupstring )
       
  2426       {
       
  2427       group = RMobilePhone::EAuxVoiceService;
       
  2428       }
       
  2429     else if ( _L("CircuitDataService") == groupstring )
       
  2430       {
       
  2431       group = RMobilePhone::ECircuitDataService;
       
  2432       }
       
  2433     else if ( _L("PacketDataService") == groupstring )
       
  2434       {
       
  2435       group = RMobilePhone::EPacketDataService;
       
  2436       }
       
  2437     else if ( _L("FaxService") == groupstring )
       
  2438       {
       
  2439       group = RMobilePhone::EFaxService;
       
  2440       if ( iHandleSpecifiedRequests )
       
  2441           {
       
  2442           iCWInfoEntry.iServiceGroup = RMobilePhone::EFaxService;
       
  2443           }
       
  2444       }
       
  2445     else if ( _L("ShortMessageService") == groupstring )
       
  2446       {
       
  2447       group = RMobilePhone::EShortMessageService;
       
  2448       }
       
  2449     else if ( _L("AllServices") == groupstring )
       
  2450       {
       
  2451       group = RMobilePhone::EAllServices;
       
  2452       }
       
  2453     else if ( _L("AllTele") == groupstring )
       
  2454       {
       
  2455       group = RMobilePhone::EAllTele;
       
  2456       if ( iHandleSpecifiedRequests )
       
  2457           {
       
  2458           iCWInfoEntry.iServiceGroup = RMobilePhone::EAllTele;
       
  2459           }
       
  2460       }
       
  2461     else if ( _L("Telephony") == groupstring )
       
  2462       {
       
  2463       group = RMobilePhone::ETelephony;
       
  2464       }
       
  2465     else if ( _L("AllDataTele") == groupstring )
       
  2466       {
       
  2467       group = RMobilePhone::EAllDataTele;
       
  2468       }
       
  2469      else if ( _L("AllDataExSms") == groupstring )
       
  2470       {
       
  2471       group = RMobilePhone::EAllDataExSms;
       
  2472       }
       
  2473     else if ( _L("AllTeleExcSms") == groupstring )
       
  2474       {
       
  2475       group = RMobilePhone::EAllTeleExcSms;
       
  2476       }
       
  2477     else
       
  2478       {
       
  2479      _LIT8(KNotSupp, "SS::Selected set call waiting servicegroup not supported");
       
  2480         iSSLog->Log((TDesC8)KNotSupp);
       
  2481       supported = EFalse;
       
  2482       }
       
  2483 
       
  2484     RMobilePhone::TMobilePhoneServiceAction condition;
       
  2485 
       
  2486     if ( _L("ServiceActionActivate") == conditionstring )
       
  2487         {
       
  2488         condition = RMobilePhone::EServiceActionActivate;
       
  2489         if ( iHandleSpecifiedRequests )
       
  2490             {
       
  2491             iCWInfoEntry.iStatus = RMobilePhone::ECallWaitingStatusActive;
       
  2492             }
       
  2493         }
       
  2494       else if ( _L("ServiceActionDeactivate") == conditionstring )
       
  2495         {
       
  2496         condition = RMobilePhone::EServiceActionDeactivate;
       
  2497         if ( iHandleSpecifiedRequests )
       
  2498             {
       
  2499             iCWInfoEntry.iStatus = RMobilePhone::ECallWaitingStatusNotActive;
       
  2500             }
       
  2501         }
       
  2502       else
       
  2503         {
       
  2504        _LIT8(KNotSupp, "SS::Selected condition for call waiting not supported");
       
  2505           iSSLog->Log((TDesC8)KNotSupp);
       
  2506         supported = EFalse;
       
  2507         }
       
  2508 
       
  2509       if( supported )
       
  2510         {
       
  2511 
       
  2512          //Create package
       
  2513         CMmDataPackage package;
       
  2514         // Set package data
       
  2515         package.PackData( &group, &condition);
       
  2516 
       
  2517       ret = HandleRequestL( EMobilePhoneSetCallWaitingStatus,
       
  2518                            &package );
       
  2519 
       
  2520         if ( KErrNone == ret )
       
  2521             {
       
  2522             _LIT8( KSendOk, "SetCallWaitingStatus request send ok" );
       
  2523             iSSLog->Log((TDesC8)KSendOk );
       
  2524           }
       
  2525         else
       
  2526             {
       
  2527              _LIT8( KSendFailed, "SetCallWaitingStatus request send failed: %d" );
       
  2528             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2529           }
       
  2530         }
       
  2531       else
       
  2532         {
       
  2533         ret = KErrNotSupported;
       
  2534         }
       
  2535 
       
  2536     return ret;
       
  2537 
       
  2538     }
       
  2539 
       
  2540 // -----------------------------------------------------------------------------
       
  2541 // CSS::CompleteSetCallWaitingStatus
       
  2542 // Complete SetCallWaitingStatus method function.
       
  2543 // -----------------------------------------------------------------------------
       
  2544 //
       
  2545 void CSS::CompleteSetCallWaitingStatus
       
  2546     (
       
  2547     TInt aResult
       
  2548     )
       
  2549   {
       
  2550   _LIT8( KResult, "CompleteSetCallWaitingStatus result: %d" );
       
  2551   iSSLog->Log((TDesC8)KResult, aResult );
       
  2552 
       
  2553   if( KErrNone != aResult )
       
  2554     {
       
  2555     _LIT8( KFail, "CompleteSetCallWaitingStatus Failed: %d" );
       
  2556       iSSLog->Log((TDesC8)KFail, aResult );
       
  2557     }
       
  2558 
       
  2559   Signal( aResult );
       
  2560 
       
  2561   }
       
  2562 
       
  2563 // -----------------------------------------------------------------------------
       
  2564 // CSS::SetSupplementaryServicesPassword
       
  2565 // Setting supplementary services password
       
  2566 // -----------------------------------------------------------------------------
       
  2567 //
       
  2568 
       
  2569 TInt CSS::SetSupplementaryServicesPassword( CStifItemParser& aItem )
       
  2570     {
       
  2571     _LIT8(KPbInit, "SS::SetCallBarringStatus");
       
  2572     iSSLog->Log((TDesC8)KPbInit);
       
  2573 
       
  2574     TInt ret( KErrNotFound );
       
  2575     TBool supported( ETrue );
       
  2576     TPtrC oldpassword;
       
  2577     TPtrC newpassword;
       
  2578     TPtrC verifiedpassword;
       
  2579     TPtrC scstring;
       
  2580 
       
  2581     TUint16 servicecode;
       
  2582 
       
  2583     aItem.GetNextString ( oldpassword );
       
  2584     aItem.GetNextString ( newpassword );
       
  2585     aItem.GetNextString ( verifiedpassword );
       
  2586     aItem.GetNextString ( scstring );
       
  2587 
       
  2588     RMobilePhone::TMobilePhonePasswordChangeV2 passwordgroup;
       
  2589 
       
  2590     if ( KDontCare() != oldpassword )
       
  2591         {
       
  2592         passwordgroup.iOldPassword.Copy(oldpassword);
       
  2593         }
       
  2594     if ( KDontCare() != newpassword )
       
  2595         {
       
  2596         passwordgroup.iNewPassword.Copy(newpassword);
       
  2597         }
       
  2598     if ( KDontCare() != verifiedpassword )
       
  2599         {
       
  2600         passwordgroup.iVerifiedPassword.Copy(verifiedpassword);
       
  2601         }
       
  2602 
       
  2603     if ( _L("0") == scstring )
       
  2604       {
       
  2605       servicecode = 0;
       
  2606       }
       
  2607     else if ( _L("330") == scstring )
       
  2608       {
       
  2609       servicecode = 330;
       
  2610       }
       
  2611     else
       
  2612       {
       
  2613      _LIT8(KNotSupp, "SS::Selected service code not supported");
       
  2614         iSSLog->Log((TDesC8)KNotSupp);
       
  2615       supported = EFalse;
       
  2616       }
       
  2617 
       
  2618 
       
  2619 
       
  2620     if( supported )
       
  2621       {
       
  2622 
       
  2623 
       
  2624        //Create package
       
  2625       CMmDataPackage package;
       
  2626       // Set package data
       
  2627       package.PackData( &passwordgroup, &servicecode );
       
  2628 
       
  2629     ret = HandleRequestL( EMobilePhoneSetSSPassword,
       
  2630                          &package );
       
  2631 
       
  2632       if ( KErrNone == ret )
       
  2633           {
       
  2634           _LIT8( KSendOk, "SetSupplementaryServicesPassword request send ok" );
       
  2635           iSSLog->Log((TDesC8)KSendOk );
       
  2636         }
       
  2637       else
       
  2638           {
       
  2639            _LIT8( KSendFailed, "SetSupplementaryServicesPassword request send failed: %d" );
       
  2640           iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2641         }
       
  2642       }
       
  2643     else
       
  2644       {
       
  2645       ret = KErrNotSupported;
       
  2646       }
       
  2647 
       
  2648     return ret;
       
  2649 
       
  2650     }
       
  2651 
       
  2652 // -----------------------------------------------------------------------------
       
  2653 // CSS::CompleteSetSupplementaryServicesPassword
       
  2654 // Complete SetSupplementaryServicesPassword method function.
       
  2655 // -----------------------------------------------------------------------------
       
  2656 //
       
  2657 void CSS::CompleteSetSupplementaryServicesPassword
       
  2658     (
       
  2659     TInt aResult
       
  2660     )
       
  2661   {
       
  2662   _LIT8( KResult, "CompleteSetSupplementaryServicesPassword result: %d" );
       
  2663   iSSLog->Log((TDesC8)KResult, aResult );
       
  2664 
       
  2665   if( KErrNone != aResult )
       
  2666     {
       
  2667     _LIT8( KFail, "CompleteSetSupplementaryServicesPassword Failed: %d" );
       
  2668       iSSLog->Log((TDesC8)KFail, aResult );
       
  2669     }
       
  2670   Signal( aResult );
       
  2671   }
       
  2672 
       
  2673 
       
  2674 // -----------------------------------------------------------------------------
       
  2675 // CSS::PrintStatusInfo
       
  2676 // Printing SS status changes
       
  2677 // -----------------------------------------------------------------------------
       
  2678 //
       
  2679 
       
  2680 void CSS::PrintStatusInfo( CMmDataPackage* aDataPackage, TInt aIpc )
       
  2681   {
       
  2682 
       
  2683   switch(aIpc)
       
  2684       {
       
  2685       case EMobilePhoneGetIdentityServiceStatus:
       
  2686           {
       
  2687           RMobilePhone::TMobilePhoneIdServiceStatus status;
       
  2688           aDataPackage->UnPackData ( status );
       
  2689 
       
  2690           switch(status)
       
  2691               {
       
  2692               case RMobilePhone::EIdServiceActivePermanent:
       
  2693                   {
       
  2694                   _LIT8(KStatus, "CSS::Status is EIdServiceActivePermanent");
       
  2695                   iSSLog->Log((TDesC8)KStatus );
       
  2696                   break;
       
  2697                   }
       
  2698               case RMobilePhone::EIdServiceActiveDefaultAllowed:
       
  2699                   {
       
  2700                   _LIT8(KStatus, "CSS::Status is EIdServiceActiveDefaultAllowed");
       
  2701                   iSSLog->Log((TDesC8)KStatus );
       
  2702                   break;
       
  2703                   }
       
  2704               case RMobilePhone::EIdServiceNotProvisioned:
       
  2705                   {
       
  2706                   _LIT8(KStatus, "CSS::Status is EIdServiceNotProvisioned");
       
  2707                   iSSLog->Log((TDesC8)KStatus );
       
  2708                   break;
       
  2709                   }
       
  2710               case RMobilePhone::EIdServiceUnknown:
       
  2711                  {
       
  2712                  _LIT8(KStatus, "CSS::Status is EIdServiceUnknown");
       
  2713                  iSSLog->Log((TDesC8)KStatus );
       
  2714                  break;
       
  2715                  }
       
  2716               default:
       
  2717                  {
       
  2718                  _LIT8(KStatus, "CSS::Not valid status");
       
  2719                  iSSLog->Log((TDesC8)KStatus );
       
  2720                  break;
       
  2721                  }
       
  2722               }
       
  2723           }
       
  2724       default:
       
  2725             {
       
  2726             break;
       
  2727             }
       
  2728       }
       
  2729 
       
  2730   }
       
  2731 
       
  2732 
       
  2733 
       
  2734 // -----------------------------------------------------------------------------
       
  2735 // CSS::GetCallForwardingNumber
       
  2736 // Getting Call Forwarding Number
       
  2737 // -----------------------------------------------------------------------------
       
  2738 //
       
  2739 
       
  2740 TInt CSS::GetCallForwardingNumber( CStifItemParser& /*aItem*/ )
       
  2741     {
       
  2742     _LIT8(KPbInit, "SS::GetCallForwardingNumber");
       
  2743     iSSLog->Log((TDesC8)KPbInit);
       
  2744 
       
  2745 
       
  2746     TBool supported( ETrue );
       
  2747     TInt ret( KErrNotFound );
       
  2748 
       
  2749     if( supported )
       
  2750         {
       
  2751 
       
  2752         ret = HandleRequestL( EMmTsyGetCallForwardingNumberIPC );
       
  2753 
       
  2754         if ( KErrNone == ret )
       
  2755             {
       
  2756             _LIT8( KSendOk, "GetCallForwardingNumber request send ok" );
       
  2757             iSSLog->Log((TDesC8)KSendOk );
       
  2758             }
       
  2759         else
       
  2760             {
       
  2761              _LIT8( KSendFailed, "GetCallForwardingNumber request send failed: %d" );
       
  2762             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2763             }
       
  2764         }
       
  2765     else
       
  2766         {
       
  2767         ret = KErrNotSupported;
       
  2768         }
       
  2769 
       
  2770     return ret;
       
  2771 
       
  2772 
       
  2773     }
       
  2774 
       
  2775 // -----------------------------------------------------------------------------
       
  2776 // CSS::CompleteGetCallForwardingNumber
       
  2777 // Complete GetCallForwardingNumber method function.
       
  2778 // -----------------------------------------------------------------------------
       
  2779 //
       
  2780 void CSS::CompleteGetCallForwardingNumber
       
  2781     (
       
  2782     TInt aResult, CMmDataPackage* aDataPackage
       
  2783     )
       
  2784   {
       
  2785   _LIT8( KResult, "CompleteGetCallForwardingNumber result: %d" );
       
  2786   iSSLog->Log((TDesC8)KResult, aResult );
       
  2787 
       
  2788   if( KErrNone == aResult )
       
  2789       {
       
  2790       TBuf<255> number;
       
  2791 
       
  2792       aDataPackage->UnPackData( number );
       
  2793 
       
  2794       TBuf8<255> Buffer;
       
  2795       _LIT8(KRowFormatter, "Call forwarding number: %S");
       
  2796       Buffer.Format(KRowFormatter, &number);
       
  2797       }
       
  2798   else
       
  2799       {
       
  2800       _LIT8( KFail, "CompleteGetCallForwardingNumber Failed: %d" );
       
  2801       iSSLog->Log((TDesC8)KFail, aResult );
       
  2802       }
       
  2803 
       
  2804   Signal( aResult );
       
  2805 
       
  2806   }
       
  2807 
       
  2808 
       
  2809 // -----------------------------------------------------------------------------
       
  2810 // CSS::SendUSSDMessage
       
  2811 // Sending USSD Message
       
  2812 // -----------------------------------------------------------------------------
       
  2813 //
       
  2814 
       
  2815 TInt CSS::SendUSSDMessage( CStifItemParser& aItem )
       
  2816     {
       
  2817     _LIT8(KPbInit, "SS::SendUSSDMessage");
       
  2818     iSSLog->Log((TDesC8)KPbInit);
       
  2819 
       
  2820 
       
  2821     TBool supported( ETrue );
       
  2822     TInt ret( KErrNotFound );
       
  2823 
       
  2824     TInt dcs;
       
  2825     TPtrC type;
       
  2826     TPtrC format;
       
  2827     TInt flags;
       
  2828 
       
  2829     aItem.GetNextInt( dcs );
       
  2830     aItem.GetNextString( type );
       
  2831     aItem.GetNextString( format );
       
  2832     aItem.GetNextInt( flags );
       
  2833 
       
  2834 
       
  2835     RMobileUssdMessaging::TMobileUssdAttributesV1 attributes = RMobileUssdMessaging::TMobileUssdAttributesV1();
       
  2836 
       
  2837     if ( _L("UssdUnknown") == type )
       
  2838         {
       
  2839         attributes.iType = RMobileUssdMessaging::EUssdUnknown;
       
  2840         }
       
  2841     else if ( _L("UssdMORequest") == type )
       
  2842         {
       
  2843         attributes.iType = RMobileUssdMessaging::EUssdMORequest;
       
  2844         }
       
  2845     else if ( _L("UssdMOReply") == type )
       
  2846         {
       
  2847         attributes.iType = RMobileUssdMessaging::EUssdMOReply;
       
  2848         }
       
  2849     else if ( _L("UssdMTNotify") == type )
       
  2850         {
       
  2851         attributes.iType = RMobileUssdMessaging::EUssdMTNotify;
       
  2852         }
       
  2853     else if ( _L("UssdMTRequest") == type )
       
  2854         {
       
  2855         attributes.iType = RMobileUssdMessaging::EUssdMTRequest;
       
  2856         }
       
  2857     else if ( _L("UssdMTReply") == type )
       
  2858         {
       
  2859         attributes.iType = RMobileUssdMessaging::EUssdMTReply;
       
  2860         }
       
  2861     else if ( _L("UssdMOAcknowledgement") == type )
       
  2862         {
       
  2863         attributes.iType = RMobileUssdMessaging::EUssdMOAcknowledgement;
       
  2864         }
       
  2865     else
       
  2866         {
       
  2867         _LIT8(KNotSupp, "SS::Selected USSD type not supported");
       
  2868         iSSLog->Log((TDesC8)KNotSupp);
       
  2869         supported = EFalse;
       
  2870         }
       
  2871 
       
  2872     if ( _L("FormatUnspecified") == format )
       
  2873         {
       
  2874         attributes.iFormat = RMobileUssdMessaging::EFormatUnspecified;
       
  2875         }
       
  2876     else if ( _L("FormatPackedString") == format )
       
  2877         {
       
  2878         attributes.iFormat = RMobileUssdMessaging::EFormatPackedString;
       
  2879         }
       
  2880     else
       
  2881         {
       
  2882         _LIT8(KNotSupp, "SS::Selected USSD format not supported");
       
  2883         iSSLog->Log((TDesC8)KNotSupp);
       
  2884         supported = EFalse;
       
  2885         }
       
  2886 
       
  2887 
       
  2888     if ( flags >= 0 && flags <= 7 )
       
  2889         {
       
  2890         attributes.iFlags |= flags;
       
  2891         }
       
  2892     else
       
  2893        {
       
  2894        _LIT8(KNotSupp, "SS::Selected flag not supported");
       
  2895        iSSLog->Log((TDesC8)KNotSupp);
       
  2896        supported = EFalse;
       
  2897        }
       
  2898 
       
  2899     //data coding scheme settings
       
  2900     attributes.iDcs = dcs;
       
  2901 
       
  2902     RMobileUssdMessaging::TGsmUssdMessageData messageData;
       
  2903 
       
  2904     TInt tmp;
       
  2905 
       
  2906     //add message data
       
  2907     while( aItem.GetNextInt(tmp) == KErrNone )
       
  2908         {
       
  2909         messageData.Append(tmp);
       
  2910         }
       
  2911 
       
  2912     RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pckg(attributes);
       
  2913 
       
  2914     RMobileUssdMessaging::TMobileUssdAttributesV1Pckg* ptr = &pckg;
       
  2915 
       
  2916     if( supported )
       
  2917         {
       
  2918          //Create package
       
  2919         CMmDataPackage package;
       
  2920         // Set package data
       
  2921         package.PackData( &messageData, &ptr  );
       
  2922 
       
  2923         ret = HandleRequestL( EMobileUssdMessagingSendMessage, &package );
       
  2924 
       
  2925         if ( KErrNone == ret )
       
  2926             {
       
  2927             _LIT8( KSendOk, "SendUSSDMessageNumber request send ok" );
       
  2928             iSSLog->Log((TDesC8)KSendOk );
       
  2929             }
       
  2930         else
       
  2931             {
       
  2932              _LIT8( KSendFailed, "SendUSSDMessage request send failed: %d" );
       
  2933             iSSLog->Log((TDesC8)KSendFailed, ret );
       
  2934             }
       
  2935         }
       
  2936     else
       
  2937         {
       
  2938         ret = KErrNotSupported;
       
  2939         }
       
  2940 
       
  2941     return ret;
       
  2942 
       
  2943     }
       
  2944 
       
  2945 // -----------------------------------------------------------------------------
       
  2946 // CSS::CompleteSendUSSDMessage
       
  2947 // Complete SendUSSDMessage method function.
       
  2948 // -----------------------------------------------------------------------------
       
  2949 //
       
  2950 void CSS::CompleteSendUSSDMessage
       
  2951     (
       
  2952     TInt aResult, CMmDataPackage* /*aDataPackage*/
       
  2953     )
       
  2954     {
       
  2955     _LIT8( KResult, "CompleteSendUSSDMessage result: %d" );
       
  2956     iSSLog->Log((TDesC8)KResult, aResult );
       
  2957 
       
  2958 
       
  2959     if( KErrNone != aResult )
       
  2960         {
       
  2961         _LIT8( KFail, "CompleteSendUSSDMessage Failed: %d" );
       
  2962         iSSLog->Log((TDesC8)KFail, aResult );
       
  2963         }
       
  2964 
       
  2965     if( ( !iSSFailTestOngoing ) ||
       
  2966         ( iHandleSpecifiedRequests ) )
       
  2967         {
       
  2968         Signal( aResult );
       
  2969         }
       
  2970     }
       
  2971 
       
  2972 
       
  2973 // -----------------------------------------------------------------------------
       
  2974 // CSS::SSServiceFailed
       
  2975 // -----------------------------------------------------------------------------
       
  2976 //
       
  2977 TInt CSS::SSServiceFailed( CStifItemParser& aItem )
       
  2978     {
       
  2979 
       
  2980     TBool supported( ETrue );
       
  2981 
       
  2982     TPtrC whereToComplete;
       
  2983 
       
  2984     aItem.GetNextString( whereToComplete );
       
  2985 
       
  2986     if ( whereToComplete == _L("USSDMessHandler") )
       
  2987       {
       
  2988       iCompleteFailInUSSDHandler = ETrue;
       
  2989       }
       
  2990     else if ( whereToComplete == _L("SupplServMessHandler") )
       
  2991       {
       
  2992       iCompleteFailInUSSDHandler = EFalse;
       
  2993       }
       
  2994     else
       
  2995       {
       
  2996       iSSLog->Log( _L8("Completion place not supported") );
       
  2997       supported = EFalse;
       
  2998       }
       
  2999 
       
  3000     if( supported )
       
  3001         {
       
  3002         iSSLog->Log(_L8("CSS::SSServiceFailed test started"));
       
  3003         iSSFailTestOngoing = ETrue;
       
  3004         return KErrNone;
       
  3005         }
       
  3006       else
       
  3007         {
       
  3008         return KErrNotSupported;
       
  3009         }
       
  3010     }
       
  3011 
       
  3012 // -----------------------------------------------------------------------------
       
  3013 // CSS::CompleteSSServiceFailed
       
  3014 // -----------------------------------------------------------------------------
       
  3015 //
       
  3016 
       
  3017 void CSS::CompleteSSServiceFailed( TInt aResult )
       
  3018     {
       
  3019     iSSLog->Log(_L8("CSS::CompleteSSServiceFailed, err=%d"),aResult);
       
  3020 
       
  3021     if (iSSFailTestOngoing )
       
  3022         {
       
  3023         iSSFailTestOngoing = EFalse;
       
  3024         iSSLog->Log(_L8("CSS::SSServiceFailed test completed"));
       
  3025         Signal( aResult );
       
  3026         }
       
  3027     }
       
  3028 
       
  3029 
       
  3030 // -----------------------------------------------------------------------------
       
  3031 // CSS::USSDSendRelease
       
  3032 // -----------------------------------------------------------------------------
       
  3033 //
       
  3034 TInt CSS::USSDSendRelease( CStifItemParser& /*aItem*/ )
       
  3035     {
       
  3036 
       
  3037     TInt ret( KErrNotFound );
       
  3038 
       
  3039     iUSSDSendReleaseTestOngoing = ETrue;
       
  3040 
       
  3041     ret = HandleRequestL( EMobileUssdMessagingSendRelease );
       
  3042 
       
  3043     if ( KErrNone == ret )
       
  3044         {
       
  3045         _LIT8( KSendOk, "USSDSendRelease request send ok" );
       
  3046         iSSLog->Log( (TDesC8)KSendOk );
       
  3047         }
       
  3048     else
       
  3049         {
       
  3050         _LIT8( KSendFailed, "USSDSendRelease request send failed: %d" );
       
  3051         iSSLog->Log( (TDesC8)KSendFailed, ret );
       
  3052         }
       
  3053 
       
  3054     iSSLog->Log(_L8("CSS::USSDSendRelease test started"));
       
  3055 
       
  3056     return KErrNone;
       
  3057     }
       
  3058 
       
  3059 // -----------------------------------------------------------------------------
       
  3060 // CSS::CompleteUSSDSendRelease
       
  3061 // -----------------------------------------------------------------------------
       
  3062 //
       
  3063 
       
  3064 void CSS::CompleteUSSDSendRelease( TInt aResult )
       
  3065     {
       
  3066     iSSLog->Log(_L8("CSS::CompleteUSSDSendRelease, err=%d"),aResult);
       
  3067 
       
  3068     if( iUSSDSendReleaseTestOngoing )
       
  3069         {
       
  3070         iUSSDSendReleaseTestOngoing = EFalse;
       
  3071         iSSLog->Log( _L8("CSS::USSDSendRelease test completed") );
       
  3072         Signal( aResult );
       
  3073         }
       
  3074     }
       
  3075 
       
  3076 // -----------------------------------------------------------------------------
       
  3077 // CSS::SendNetworkServiceRequest
       
  3078 // Sending network service request
       
  3079 // -----------------------------------------------------------------------------
       
  3080 //
       
  3081 
       
  3082 TInt CSS::SendNetworkServiceRequest( CStifItemParser& aItem )
       
  3083     {
       
  3084     _LIT8(KPbInit, "SS::SendNetworkServiceRequest");
       
  3085     iSSLog->Log((TDesC8)KPbInit);
       
  3086 
       
  3087     TInt ret( KErrNotFound );
       
  3088 
       
  3089     TPtrC messageData;
       
  3090     aItem.GetNextString( messageData );
       
  3091 
       
  3092     TPtrC* messageToSend;
       
  3093 
       
  3094     messageToSend = &messageData;
       
  3095 
       
  3096    //Create package
       
  3097     CMmDataPackage package;
       
  3098     // Set package data
       
  3099     package.PackData( &messageToSend );
       
  3100 
       
  3101     ret = HandleRequestL( EMobilePhoneSendNetworkServiceRequest, &package );
       
  3102 
       
  3103     if ( KErrNone == ret )
       
  3104         {
       
  3105         _LIT8( KSendOk, "SendNetworkServiceRequest request send ok" );
       
  3106         iSSLog->Log( (TDesC8)KSendOk );
       
  3107         }
       
  3108     else
       
  3109         {
       
  3110          _LIT8( KSendFailed, "SendNetworkServiceRequest request send failed: %d" );
       
  3111         iSSLog->Log( (TDesC8)KSendFailed, ret );
       
  3112         }
       
  3113 
       
  3114   return ret;
       
  3115 
       
  3116   }
       
  3117 
       
  3118 // -----------------------------------------------------------------------------
       
  3119 // CSS::CompleteSendNetworkServiceRequest
       
  3120 // Complete SendNetworkServiceRequest
       
  3121 // -----------------------------------------------------------------------------
       
  3122 //
       
  3123 void CSS::CompleteSendNetworkServiceRequest
       
  3124     (
       
  3125     TInt aResult, CMmDataPackage* /*aDataPackage*/
       
  3126     )
       
  3127     {
       
  3128     _LIT8( KResult, "CompleteSendNetworkServiceRequest result: %d" );
       
  3129     iSSLog->Log((TDesC8)KResult, aResult );
       
  3130 
       
  3131     if( KErrNone != aResult )
       
  3132       {
       
  3133       _LIT8( KFail, "CompleteSendNetworkServiceRequest Failed: %d" );
       
  3134         iSSLog->Log( (TDesC8)KFail, aResult );
       
  3135       }
       
  3136 
       
  3137     Signal( aResult );
       
  3138 
       
  3139     }
       
  3140 
       
  3141 // -----------------------------------------------------------------------------
       
  3142 // CSS::SendNetworkServiceRequestNoFdnCheck
       
  3143 // Sending network service request
       
  3144 // -----------------------------------------------------------------------------
       
  3145 //
       
  3146 TInt CSS::SendNetworkServiceRequestNoFdnCheck( CStifItemParser& aItem )
       
  3147     {
       
  3148     _LIT8(KPbInit, "CSS::SendNetworkServiceRequestNoFdnCheck");
       
  3149     iSSLog->Log((TDesC8)KPbInit);
       
  3150 
       
  3151     TInt ret( KErrNotFound );
       
  3152 
       
  3153     TPtrC messageData;
       
  3154     aItem.GetNextString( messageData );
       
  3155 
       
  3156     TPtrC* messageToSend;
       
  3157 
       
  3158     messageToSend = &messageData;
       
  3159 
       
  3160    //Create package
       
  3161     CMmDataPackage package;
       
  3162     // Set package data
       
  3163     package.PackData( &messageToSend );
       
  3164 
       
  3165     ret = HandleRequestL( EMobilePhoneSendNetworkServiceRequestNoFdnCheck, &package );
       
  3166 
       
  3167     if ( KErrNone == ret )
       
  3168         {
       
  3169         _LIT8( KSendOk, "SendNetworkServiceRequestNoFdnCheck request send ok" );
       
  3170         iSSLog->Log( (TDesC8)KSendOk );
       
  3171         }
       
  3172     else
       
  3173         {
       
  3174          _LIT8( KSendFailed, "SendNetworkServiceRequestNoFdnCheck request send failed: %d" );
       
  3175         iSSLog->Log( (TDesC8)KSendFailed, ret );
       
  3176         }
       
  3177 
       
  3178   return ret;
       
  3179 
       
  3180   }
       
  3181 
       
  3182 // -----------------------------------------------------------------------------
       
  3183 // CSS::CompleteSendNetworkServiceRequestNoFdnCheck
       
  3184 // Complete CompleteSendNetworkServiceRequestNoFdnCheck
       
  3185 // -----------------------------------------------------------------------------
       
  3186 //
       
  3187 void CSS::CompleteSendNetworkServiceRequestNoFdnCheck
       
  3188     (
       
  3189     TInt aResult, CMmDataPackage* /*aDataPackage*/
       
  3190     )
       
  3191     {
       
  3192     _LIT8( KResult, "CompleteSendNetworkServiceRequestNoFdnCheck result: %d" );
       
  3193     iSSLog->Log((TDesC8)KResult, aResult );
       
  3194 
       
  3195     if( KErrNone != aResult )
       
  3196       {
       
  3197       _LIT8( KFail, "CompleteSendNetworkServiceRequestNoFdnCheck Failed: %d" );
       
  3198         iSSLog->Log( (TDesC8)KFail, aResult );
       
  3199       }
       
  3200 
       
  3201     Signal( aResult );
       
  3202 
       
  3203     }
       
  3204 
       
  3205 // -----------------------------------------------------------------------------
       
  3206 // CSS::SSServiceCompleted
       
  3207 // -----------------------------------------------------------------------------
       
  3208 //
       
  3209 TInt CSS::SSServiceCompleted( CStifItemParser& /*aItem*/ )
       
  3210     {
       
  3211 
       
  3212     iSSLog->Log( _L8("CSS::SSServiceCompleted test started") );
       
  3213     iSSFailTestOngoing = ETrue;
       
  3214     return KErrNone;
       
  3215     }
       
  3216 
       
  3217 // -----------------------------------------------------------------------------
       
  3218 // CSS::CompleteSSServiceCompleted
       
  3219 // -----------------------------------------------------------------------------
       
  3220 //
       
  3221 void CSS::CompleteSSServiceCompleted
       
  3222     (
       
  3223     TInt aResult                // Completion result value
       
  3224     )
       
  3225     {
       
  3226     iSSLog->Log(_L8("CSS::SSServiceCompleted, err=%d"),aResult);
       
  3227         if (iSSCompleteTestOngoing )
       
  3228             {
       
  3229             iSSFailTestOngoing = EFalse;
       
  3230             iSSLog->Log( _L8("CSS::SSServiceCompleted test completed") );
       
  3231             Signal( aResult );
       
  3232             }
       
  3233     }
       
  3234 
       
  3235 // -----------------------------------------------------------------------------
       
  3236 // CSS::CompleteNotifyCallBarringStatusChange
       
  3237 // Complete NotifyCallBarringStatusChange method function.
       
  3238 // -----------------------------------------------------------------------------
       
  3239 //
       
  3240 void CSS::CompleteNotifyCallBarringStatusChange
       
  3241     (
       
  3242     TInt aResult,                // Completion result value
       
  3243     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  3244     )
       
  3245     {
       
  3246     RMobilePhone::TMobilePhoneCBCondition unpackedCBCondition;
       
  3247 
       
  3248     _LIT8( KResult, "CompleteNotifyCallBarringStatusChange result: %d" );
       
  3249     iSSLog->Log((TDesC8)KResult, aResult );
       
  3250 
       
  3251     if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
  3252         {
       
  3253         aDataPackage->UnPackData( unpackedCBCondition );
       
  3254         _LIT8( KCBCondition,
       
  3255             "CompleteNotifyCallBarringStatusChange unpackedCBCondition: %d" );
       
  3256         iSSLog->Log((TDesC8)KCBCondition, unpackedCBCondition );
       
  3257 
       
  3258         if ( iCBCondition != unpackedCBCondition )
       
  3259             {
       
  3260             aResult = KErrGeneral;
       
  3261             }
       
  3262         }
       
  3263 
       
  3264     if ( KErrNone != aResult )
       
  3265         {
       
  3266         _LIT8( KFail, "CompleteNotifyCallBarringStatusChange Failed: %d" );
       
  3267         iSSLog->Log((TDesC8)KFail, aResult );
       
  3268         }
       
  3269 
       
  3270     Signal( aResult );
       
  3271 
       
  3272     }
       
  3273 
       
  3274 // -----------------------------------------------------------------------------
       
  3275 // CSS::CompleteNotifyCallForwardingStatusChange
       
  3276 // Complete NotifyCallBarringStatusChange method function.
       
  3277 // -----------------------------------------------------------------------------
       
  3278 //
       
  3279 void CSS::CompleteNotifyCallForwardingStatusChange
       
  3280     (
       
  3281     TInt aResult,                // Completion result value
       
  3282     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  3283     )
       
  3284     {
       
  3285     RMobilePhone::TMobilePhoneCFCondition unpackedCFcondition;
       
  3286 
       
  3287     _LIT8( KResult, "CompleteNotifyCallForwardingStatusChange result: %d" );
       
  3288     iSSLog->Log((TDesC8)KResult, aResult );
       
  3289 
       
  3290     if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
  3291         {
       
  3292         aDataPackage->UnPackData( unpackedCFcondition );
       
  3293         _LIT8( KCBCondition,
       
  3294             "CompleteNotifyCallForwardingStatusChange unpackedCFCondition: %d" );
       
  3295         iSSLog->Log((TDesC8)KCBCondition, unpackedCFcondition );
       
  3296 
       
  3297         if ( iCFCondition != unpackedCFcondition )
       
  3298             {
       
  3299             aResult = KErrGeneral;
       
  3300             }
       
  3301         }
       
  3302 
       
  3303     if( KErrNone != aResult )
       
  3304         {
       
  3305         _LIT8( KFail, "CompleteNotifyCallForwardingStatusChange Failed: %d" );
       
  3306         iSSLog->Log((TDesC8)KFail, aResult );
       
  3307         }
       
  3308 
       
  3309     Signal( aResult );
       
  3310 
       
  3311     }
       
  3312 
       
  3313 // -----------------------------------------------------------------------------
       
  3314 // CSS::CompleteNotifyCallWaitingStatusChange
       
  3315 // Complete NotifyCallBarringStatusChange method function.
       
  3316 // -----------------------------------------------------------------------------
       
  3317 //
       
  3318 void CSS::CompleteNotifyCallWaitingStatusChange
       
  3319     (
       
  3320     TInt aResult,                // Completion result value
       
  3321     CMmDataPackage* aDataPackage // pointer to DataPackage
       
  3322     )
       
  3323     {
       
  3324     RMobilePhone::TMobilePhoneCWInfoEntryV1 unpackedCWCondition;
       
  3325 
       
  3326     _LIT8( KResult, "CompleteNotifyCallWaitingStatusChange result: %d" );
       
  3327     iSSLog->Log((TDesC8)KResult, aResult );
       
  3328 
       
  3329     if ( ( iHandleSpecifiedRequests ) && ( KErrNone == aResult ) )
       
  3330         {
       
  3331         aDataPackage->UnPackData( unpackedCWCondition );
       
  3332         _LIT8( KCBCondition,
       
  3333             "CompleteNotifyCallWaitingStatusChange unpackedCWCondition: %d" );
       
  3334         iSSLog->Log((TDesC8)KCBCondition, unpackedCWCondition );
       
  3335 
       
  3336         if ( ( iCWInfoEntry.iStatus != unpackedCWCondition.iStatus ) ||
       
  3337              ( iCWInfoEntry.iServiceGroup != unpackedCWCondition.iServiceGroup ) )
       
  3338             {
       
  3339             aResult = KErrGeneral;
       
  3340             }
       
  3341         }
       
  3342 
       
  3343     if( KErrNone != aResult )
       
  3344         {
       
  3345         _LIT8( KFail, "CompleteNotifyCallWaitingStatusChange Failed: %d" );
       
  3346         iSSLog->Log((TDesC8)KFail, aResult );
       
  3347         }
       
  3348 
       
  3349     Signal( aResult );
       
  3350 
       
  3351     }
       
  3352 
       
  3353 // -----------------------------------------------------------------------------
       
  3354 // CSS::CompleteNotifySendNetworkServiceRequest
       
  3355 // Complete NotifySendNetworkServiceRequest
       
  3356 // -----------------------------------------------------------------------------
       
  3357 //
       
  3358 void CSS::CompleteNotifySendNetworkServiceRequest(
       
  3359         TInt aResult,
       
  3360         CMmDataPackage* /* aDataPackage */
       
  3361         )
       
  3362     {
       
  3363     _LIT8 ( KCompleteNotifySendNetworkServiceRequest, "CSS::CompleteNotifySendNetworkServiceRequest" );
       
  3364     Signal( aResult );
       
  3365     }
       
  3366 
       
  3367 // -----------------------------------------------------------------------------
       
  3368 // CSS::SetSendNetworkServiceRequestTestOngoingFlag
       
  3369 // Complete NotifyCallBarringStatusChange method function.
       
  3370 // -----------------------------------------------------------------------------
       
  3371 //
       
  3372 TInt CSS::SetSendNetworkServiceRequestTestOngoingFlag( CStifItemParser& aItem )
       
  3373     {
       
  3374     _LIT8 ( KSetSendNetworkServiceRequestTestOngoingFlag, "CSS::SetSendNetworkServiceRequestTestOngoingFlag" );
       
  3375     iCoreLog->Log( ( TDesC8 )KSetSendNetworkServiceRequestTestOngoingFlag );
       
  3376 
       
  3377     TPtrC string;
       
  3378     aItem.GetNextString ( string );
       
  3379     if ( _L("YES") == string )
       
  3380         {
       
  3381         iSSSendNetworkServiceRequestTestOngoing = ETrue;
       
  3382         }
       
  3383     return KErrNone;
       
  3384     }
       
  3385 
       
  3386 // -----------------------------------------------------------------------------
       
  3387 // CSS::SendSatNotifyCallControlRequest
       
  3388 // -----------------------------------------------------------------------------
       
  3389 //
       
  3390 TInt CSS::SendSatNotifyCallControlRequest( CStifItemParser& /*aItem*/ )
       
  3391     {
       
  3392 
       
  3393     TInt ret( KErrNotFound );
       
  3394 
       
  3395     ret = HandleRequestL( ESatNotifyCallControlRequest );
       
  3396 
       
  3397     if ( KErrNone == ret )
       
  3398         {
       
  3399         _LIT8( KSendOk, "SendSatNotifyCallControlRequest request send ok" );
       
  3400         iSSLog->Log( (TDesC8)KSendOk );
       
  3401         }
       
  3402     else
       
  3403         {
       
  3404         _LIT8( KSendFailed, "SendSatNotifyCallControlRequest request send failed: %d" );
       
  3405         iSSLog->Log( (TDesC8)KSendFailed, ret );
       
  3406         }
       
  3407 
       
  3408     return KErrNone;
       
  3409     }
       
  3410 
       
  3411 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
  3412 // None
       
  3413 
       
  3414 
       
  3415 //  End of File