bluetoothengine/btnotif/src/BTNPinNotifier.cpp
branchRCL_3
changeset 61 269724087bed
parent 56 9386f31cc85b
child 72 4b59561a31c0
equal deleted inserted replaced
56:9386f31cc85b 61:269724087bed
    97 // CBTPinNotifier::GetParamsL
    97 // CBTPinNotifier::GetParamsL
    98 // Initialize parameters and check if device is already
    98 // Initialize parameters and check if device is already
    99 // in registry. Jump to RunL as soon as possible.
    99 // in registry. Jump to RunL as soon as possible.
   100 // ----------------------------------------------------------
   100 // ----------------------------------------------------------
   101 //
   101 //
   102 void CBTPinNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
   102 void CBTPinNotifier::ProcessStartParamsL()
   103     {
   103     {
   104     FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() >>"));
   104     FLOG(_L("[BTNOTIF]\t CBTPinNotifier::ProcessStartParamsL() >>"));
   105 
   105 
   106     CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
   106     CBTNPairNotifierBase::ProcessStartParamsL();
   107 
   107 
   108     TBTPinCodeEntryNotifierParams param;
   108     TBTPinCodeEntryNotifierParams param;
   109  	TPckgC<TBTPinCodeEntryNotifierParams> pckg(param);
   109  	TPckgC<TBTPinCodeEntryNotifierParams> pckg(param);
   110  	pckg.Set(aBuffer);
   110  	pckg.Set(*iParamBuffer);
   111 
   111 
   112     iBTAddr = pckg().DeviceAddress();
   112     iBTAddr = pckg().DeviceAddress();
   113     if ( OtherOutgoPairing(iBTAddr) )
   113     if ( OtherOutgoPairing(iBTAddr) )
   114         {
   114         {
   115         // We won't allow incoming pairing during outgoing pairing:
   115         // We won't allow incoming pairing during outgoing pairing:
   121  	iLocallyInitiated = pckg().LocallyInitiated();
   121  	iLocallyInitiated = pckg().LocallyInitiated();
   122     iPasskeyLength = pckg().PinCodeMinLength();
   122     iPasskeyLength = pckg().PinCodeMinLength();
   123     iStrongPinRequired = pckg().StrongPinCodeRequired();
   123     iStrongPinRequired = pckg().StrongPinCodeRequired();
   124     ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
   124     ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
   125     
   125     
   126     FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() <<"));
   126     FLOG(_L("[BTNOTIF]\t CBTPinNotifier::ProcessStartParamsL() <<"));
   127     }
   127     }
   128 
   128 
   129 // ----------------------------------------------------------
   129 // ----------------------------------------------------------
   130 // CBTPinNotifier::HandleGetDeviceCompletedL
   130 // CBTPinNotifier::HandleGetDeviceCompletedL
   131 // Ask user response and return it to caller.
   131 // Ask user response and return it to caller.
   261         {
   261         {
   262         BluetoothUiUtil::LoadResourceAndSubstringL( 
   262         BluetoothUiUtil::LoadResourceAndSubstringL( 
   263                 aRBuf, R_BT_MIN_PASSKEY_PROMPT, devName, 1 );
   263                 aRBuf, R_BT_MIN_PASSKEY_PROMPT, devName, 1 );
   264 
   264 
   265         RBuf tmpBuf;
   265         RBuf tmpBuf;
       
   266         tmpBuf.CreateL( aRBuf.MaxLength() );
   266         tmpBuf.CleanupClosePushL();
   267         tmpBuf.CleanupClosePushL();
   267         tmpBuf.Swap( aRBuf );
   268         tmpBuf.Swap( aRBuf );
   268         aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint));
   269         aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint));
   269         aRBuf.Zero();
   270         aRBuf.Zero();
   270         // Passkey length should be localized, hope StringLoader can make it:
   271         // Passkey length should be localized, hope StringLoader can make it: