adaptationlayer/tsy/simatktsy_dll/src/satcc.cpp
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 8 6295dc2169f3
equal deleted inserted replaced
6:942573423a60 7:fa67e03b87df
    63     252 +   //CALL_MODEM_SB_BC
    63     252 +   //CALL_MODEM_SB_BC
    64     4 +     //CALL_MODEM_SB_CAUSE
    64     4 +     //CALL_MODEM_SB_CAUSE
    65     4;      //CALL_MODEM_SB_CAUSE
    65     4;      //CALL_MODEM_SB_CAUSE
    66 
    66 
    67 const TUint8 KMSBMask = 0x80;
    67 const TUint8 KMSBMask = 0x80;
       
    68 const TUint8 KSw1Sw2Unknown = 0;
    68 
    69 
    69 
    70 
    70 // ==================== MEMBER FUNCTIONS ====================================
    71 // ==================== MEMBER FUNCTIONS ====================================
    71 
    72 
    72 // -----------------------------------------------------------------------------
    73 // -----------------------------------------------------------------------------
   415             {
   416             {
   416             // SIM does not support USSD and converting it to SS was
   417             // SIM does not support USSD and converting it to SS was
   417             // impossible. Remove the created CcStruct from the CC array and
   418             // impossible. Remove the created CcStruct from the CC array and
   418             // send CC event response.
   419             // send CC event response.
   419             TPtrC8 atkData;
   420             TPtrC8 atkData;
   420             SendSsResourceControlReq( aCcstruct, KError, atkData );
   421             SendSsResourceControlReq( 
       
   422                 aCcstruct, 
       
   423                 KSw1Sw2Unknown, 
       
   424                 KSw1Sw2Unknown, 
       
   425                 KError, 
       
   426                 atkData );
   421 
   427 
   422             TInt index( GetArrayIndexById( aCcstruct.iTransId ) );
   428             TInt index( GetArrayIndexById( aCcstruct.iTransId ) );
   423             if ( index != KErrNotFound )
   429             if ( index != KErrNotFound )
   424                 {
   430                 {
   425                 iCallControlArray->Remove( index );
   431                 iCallControlArray->Remove( index );
   586                         }
   592                         }
   587                     case PN_SS:
   593                     case PN_SS:
   588                         {
   594                         {
   589                         SendSsResourceControlReq(
   595                         SendSsResourceControlReq(
   590                             ( *iCallControlArray )[ccIndex],
   596                             ( *iCallControlArray )[ccIndex],
       
   597                             sw1,
       
   598                             sw2,
   591                             result,
   599                             result,
   592                             apduData );
   600                             apduData );
   593                         break;
   601                         break;
   594                         }
   602                         }
   595                     case PN_GPDS:
   603                     case PN_GPDS:
  1450 // Creates resource control response for modem SS server
  1458 // Creates resource control response for modem SS server
  1451 // -----------------------------------------------------------------------------
  1459 // -----------------------------------------------------------------------------
  1452 //
  1460 //
  1453 void CSatCC::SendSsResourceControlReq(
  1461 void CSatCC::SendSsResourceControlReq(
  1454         const TCallControl& aTcc,
  1462         const TCallControl& aTcc,
       
  1463         const TUint8 aSw1,
       
  1464         const TUint8 aSw2,
  1455         const TUint8 aResult,
  1465         const TUint8 aResult,
  1456         TPtrC8 aApduData )
  1466         TPtrC8 aApduData )
  1457     {
  1467     {
  1458     TFLOGSTRING("TSY: CSatCC::SendSsResourceControlReq");
  1468     TFLOGSTRING("TSY: CSatCC::SendSsResourceControlReq");
  1459     OstTrace0( TRACE_NORMAL, CSATCC_SENDSSRESOURCECONTROLREQ, "CSatCC::SendSsResourceControlReq" );
  1469     OstTrace0( TRACE_NORMAL, CSATCC_SENDSSRESOURCECONTROLREQ, "CSatCC::SendSsResourceControlReq" );
  1652                 sbcount++;
  1662                 sbcount++;
  1653                 }
  1663                 }
  1654             }
  1664             }
  1655         }
  1665         }
  1656 
  1666 
       
  1667     // SS_SB_RESOURCE_CONTROL_INFO [O] with sw1, sw2 and result 
       
  1668     TIsiSubBlock resourceCtrlInfo(
       
  1669         isiMessage,
       
  1670         SS_SB_RESOURCE_CONTROL_INFO,
       
  1671         EIsiSubBlockTypeId8Len8 );
       
  1672     isiMessage.Append( 3 ); // data size is 3 (sw1 + sw2 + result)
       
  1673     isiMessage.Append( aSw1 );
       
  1674     isiMessage.Append( aSw2 );
       
  1675     isiMessage.Append( ccresult );
       
  1676     sbcount++;
       
  1677     resourceCtrlInfo.CompleteSubBlock();
       
  1678 
  1657     TBuf8<1> numOfSubblocks;
  1679     TBuf8<1> numOfSubblocks;
  1658     numOfSubblocks.Append( sbcount);
  1680     numOfSubblocks.Append( sbcount);
  1659     isiMessage.Insert( 1, numOfSubblocks );
  1681     isiMessage.Insert( 1, numOfSubblocks );
  1660     // send request
  1682     // send request
  1661     iSatMessHandler->SsResourceControlReq( aTcc.iTransId, isiMessage );
  1683     iSatMessHandler->SsResourceControlReq( aTcc.iTransId, isiMessage );