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::ProcessStartParamsL() |
102 void CBTPinNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage) |
103 { |
103 { |
104 FLOG(_L("[BTNOTIF]\t CBTPinNotifier::ProcessStartParamsL() >>")); |
104 FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() >>")); |
105 |
105 |
106 CBTNPairNotifierBase::ProcessStartParamsL(); |
106 CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage ); |
107 |
107 |
108 TBTPinCodeEntryNotifierParams param; |
108 TBTPinCodeEntryNotifierParams param; |
109 TPckgC<TBTPinCodeEntryNotifierParams> pckg(param); |
109 TPckgC<TBTPinCodeEntryNotifierParams> pckg(param); |
110 pckg.Set(*iParamBuffer); |
110 pckg.Set(aBuffer); |
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::ProcessStartParamsL() <<")); |
126 FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() <<")); |
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() ); |
|
267 tmpBuf.CleanupClosePushL(); |
266 tmpBuf.CleanupClosePushL(); |
268 tmpBuf.Swap( aRBuf ); |
267 tmpBuf.Swap( aRBuf ); |
269 aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint)); |
268 aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint)); |
270 aRBuf.Zero(); |
269 aRBuf.Zero(); |
271 // Passkey length should be localized, hope StringLoader can make it: |
270 // Passkey length should be localized, hope StringLoader can make it: |