adaptationlayer/tsy/nokiatsy_dll/src/cmmstaticutility.cpp
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 8 6295dc2169f3
equal deleted inserted replaced
6:942573423a60 7:fa67e03b87df
    50 
    50 
    51 // EXTERNAL FUNCTION PROTOTYPES
    51 // EXTERNAL FUNCTION PROTOTYPES
    52     // None
    52     // None
    53 
    53 
    54 // CONSTANTS
    54 // CONSTANTS
    55     // None
    55 const TUint8 KNotAllowed = 0x01;
       
    56 const TUint8 KAllowedWithModifications = 0x02;
    56 
    57 
    57 // MACROS
    58 // MACROS
    58     // None
    59     // None
    59 
    60 
    60 // LOCAL CONSTANTS AND MACROS
    61 // LOCAL CONSTANTS AND MACROS
   257                         }
   258                         }
   258                     case CALL_MODEM_CAUSE_BUSY_USER_REQUEST:
   259                     case CALL_MODEM_CAUSE_BUSY_USER_REQUEST:
   259                         {
   260                         {
   260                         epocError = EpocErrorCode( KErrGeneral,
   261                         epocError = EpocErrorCode( KErrGeneral,
   261                             KErrGsmCallRejected );
   262                             KErrGsmCallRejected );
       
   263                         break;
       
   264                         }
       
   265                     case CALL_MODEM_CAUSE_INCOMPATIBLE_DEST:
       
   266                         {
       
   267                         epocError = EpocErrorCode( KErrGeneral,
       
   268                             KErrGsmCCBearerCapabilityNotAuthorised );
   262                         break;
   269                         break;
   263                         }
   270                         }
   264                     // Not used by GSM ISA Call server: checking of
   271                     // Not used by GSM ISA Call server: checking of
   265                     // parameters has been left to the client's responsibility
   272                     // parameters has been left to the client's responsibility
   266                     case CALL_MODEM_CAUSE_INVALID_ADDRESS:
   273                     case CALL_MODEM_CAUSE_INVALID_ADDRESS:
  2490     return ret;
  2497     return ret;
  2491 
  2498 
  2492 #endif // __WINSCW__
  2499 #endif // __WINSCW__
  2493     }
  2500     }
  2494 
  2501 
       
  2502 // ----------------------------------------------------------------------------
       
  2503 // CMmStaticUtility::ProcessIfIdentityServices
       
  2504 // Checks if this is related to identity services
       
  2505 // -----------------------------------------------------------------------------
       
  2506 //
       
  2507 TInt CMmStaticUtility::MapSw1Sw2ToEpocError( 
       
  2508     const TUint8 aSw1, 
       
  2509     const TUint8 aSw2, 
       
  2510     const TUint8 aResult )
       
  2511     {
       
  2512 TFLOGSTRING4("TSY:CMmSupplServMessHandler::MapSw1Sw2ToEpocError: sw1: 0x%x sw2: 0x%x result: 0x%x", aSw1, aSw2, aResult );
       
  2513 
       
  2514     TInt ret( KErrGeneral );
       
  2515 
       
  2516     //These are the ok responses ( for envelope )
       
  2517     //-90 00 normal ending of the command
       
  2518     //-91 XX normal ending of the command with extra information from the
       
  2519     // proactive SIM containing a command for ME length XX of response data
       
  2520     //-9E XX length XX of the response data given in case of a SIM data
       
  2521 
       
  2522     // download error
       
  2523     //-9F XX length XX of the response data
       
  2524     //This is the busy response
       
  2525     //-93 00 SAT is busy. Command cannot be executed at present, further
       
  2526     // normal commands are allowed
       
  2527     //This is the memory status
       
  2528     //-92 0X command succesful but after using and internal update retry
       
  2529     // routine x times
       
  2530     //-92 40 memory problem
       
  2531     //Application independent errors
       
  2532     //-67 XX incorrect parameter P3
       
  2533     //-6B XX incorrect parameter P1 or P2
       
  2534     //-6E XX wrong instruction class given in the command
       
  2535     //-6F XX technical problem with no diagnostic given.
       
  2536     //Also possible
       
  2537     //-94 02 P1 or P2 is caused by the addressed record being out of range
       
  2538 
       
  2539     switch( aSw1 )
       
  2540         {
       
  2541         case 0x90:
       
  2542         case 0x91:
       
  2543         case 0x9F:
       
  2544             {
       
  2545             if( KNotAllowed == aResult )
       
  2546                 {
       
  2547                 ret = CMmStaticUtility::EpocErrorCode( 
       
  2548                     KErrGeneral,
       
  2549                     KErrGsmCCCallRejected );
       
  2550                 }
       
  2551             else if( KAllowedWithModifications == aResult )
       
  2552                 {
       
  2553                 ret = CMmStaticUtility::EpocErrorCode( 
       
  2554                     KErrAccessDenied,
       
  2555                     KErrSatControl );
       
  2556                 }
       
  2557             break;
       
  2558             }
       
  2559         case 0x93:
       
  2560             {
       
  2561             if( 0x00 == aSw2 )
       
  2562                 {
       
  2563                 ret = CMmStaticUtility::EpocErrorCode( 
       
  2564                     KErrAccessDenied,
       
  2565                     KErrSatBusy );
       
  2566                 }
       
  2567             break;
       
  2568             }
       
  2569         case 0x6F:
       
  2570             {
       
  2571             ret = CMmStaticUtility::EpocErrorCode( 
       
  2572                 KErrGeneral,
       
  2573                 KErrGsmCallControlBase );
       
  2574             break;
       
  2575             }
       
  2576         default:
       
  2577             {
       
  2578 TFLOGSTRING("TSY:CMmSupplServMessHandler::MapSw1Sw2ToEpocError: default");
       
  2579             ret = CMmStaticUtility::EpocErrorCode( 
       
  2580                 KErrGeneral,
       
  2581                 KErrGsmCallControlBase );
       
  2582             break;
       
  2583             }
       
  2584         }
       
  2585 
       
  2586     return ret;
       
  2587     }
       
  2588 
  2495 // -----------------------------------------------------------------------------
  2589 // -----------------------------------------------------------------------------
  2496 // CMmStaticUtility::SetOperinfoApac
  2590 // CMmStaticUtility::SetOperinfoApac
  2497 // Sets internal oper info value. THIS IS ONLY FOR WINSCW USE
  2591 // Sets internal oper info value. THIS IS ONLY FOR WINSCW USE
  2498 // -----------------------------------------------------------------------------
  2592 // -----------------------------------------------------------------------------
  2499 //
  2593 //