equal
deleted
inserted
replaced
68 { |
68 { |
69 return iInfo; |
69 return iInfo; |
70 } |
70 } |
71 |
71 |
72 // ---------------------------------------------------------- |
72 // ---------------------------------------------------------- |
73 // CBTNPairNotifierBase::GetParamsL |
73 // CBTNPairNotifierBase::ProcessStartParamsL |
74 // ---------------------------------------------------------- |
74 // ---------------------------------------------------------- |
75 // |
75 // |
76 void CBTNPairNotifierBase::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage) |
76 void CBTNPairNotifierBase::ProcessStartParamsL() |
77 { |
77 { |
78 (void)aBuffer; |
|
79 if( !iMessage.IsNull() ) |
|
80 { |
|
81 User::Leave(KErrInUse); |
|
82 } |
|
83 |
|
84 iMessage = (RMessage2)aMessage; |
|
85 iReplySlot = aReplySlot; |
|
86 |
|
87 if ( AutoLockOnL() ) |
78 if ( AutoLockOnL() ) |
88 { |
79 { |
89 // The phone is locked, access denied. |
80 // The phone is locked, access denied. |
90 // |
81 // |
91 CompleteMessage(KErrCancel); |
82 CompleteMessage(KErrCancel); |
92 } |
83 } |
93 |
|
94 } |
84 } |
95 |
85 |
96 // ---------------------------------------------------------- |
86 // ---------------------------------------------------------- |
97 // CBTNPairNotifierBase::UpdateL |
87 // CBTNPairNotifierBase::UpdateL |
98 // ---------------------------------------------------------- |
88 // ---------------------------------------------------------- |
123 if (pckg().Result() == KErrNone) |
113 if (pckg().Result() == KErrNone) |
124 { |
114 { |
125 BtNotifNameUtils::SetDeviceNameL(pckg().DeviceName(), *iDevice); |
115 BtNotifNameUtils::SetDeviceNameL(pckg().DeviceName(), *iDevice); |
126 |
116 |
127 // Finally show new prompt for dialog if it is still on the screen |
117 // Finally show new prompt for dialog if it is still on the screen |
128 // and user has not given a alias for device. |
118 // and user has not given a alias for device. |
129 if( !iNotifUiUtil->IsQueryReleased() && !iDevice->IsValidFriendlyName() ) |
119 CBTNotifUIUtil* dialog = NULL; |
|
120 if ( !iNotifUiUtil->IsQueryReleased()) |
|
121 { |
|
122 dialog = iNotifUiUtil; |
|
123 } |
|
124 else if ( !iAuthoriseDialog->IsQueryReleased()) |
|
125 { |
|
126 dialog = iAuthoriseDialog; |
|
127 } |
|
128 |
|
129 if( dialog && !iDevice->IsValidFriendlyName() ) |
130 { |
130 { |
131 RBuf prompt; |
131 RBuf prompt; |
132 prompt.CleanupClosePushL(); |
132 prompt.CleanupClosePushL(); |
133 GenerateQueryPromptL( prompt ); |
133 GenerateQueryPromptL( prompt ); |
134 iNotifUiUtil->UpdateQueryDlgL( prompt ); |
134 dialog->UpdateQueryDlgL( prompt ); |
135 CleanupStack::PopAndDestroy( &prompt ); |
135 CleanupStack::PopAndDestroy( &prompt ); |
136 } |
136 } |
137 } |
137 } |
138 |
138 |
139 FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::UpdateL() completed")); |
139 FLOG(_L("[BTNOTIF]\t CBTNPairNotifierBase::UpdateL() completed")); |
211 BluetoothUiUtil::LoadResourceAndSubstringL( |
211 BluetoothUiUtil::LoadResourceAndSubstringL( |
212 prompt, R_BT_ACCEPT_PAIRING_REQUEST, devName, 0 ); |
212 prompt, R_BT_ACCEPT_PAIRING_REQUEST, devName, 0 ); |
213 |
213 |
214 devName.Zero(); |
214 devName.Zero(); |
215 // Show query for use to accept/reject incoming pairing request |
215 // Show query for use to accept/reject incoming pairing request |
216 TInt keypress = iNotifUiUtil->ShowQueryL( prompt, R_BT_GENERIC_QUERY, |
216 TInt keypress = iAuthoriseDialog->ShowQueryL( prompt, R_BT_GENERIC_QUERY, |
217 ECmdBTnotifUnavailable, devName, CAknQueryDialog::EConfirmationTone ); |
217 ECmdBTnotifUnavailable, devName, CAknQueryDialog::EConfirmationTone); |
|
218 |
218 CleanupStack::PopAndDestroy( &prompt ); |
219 CleanupStack::PopAndDestroy( &prompt ); |
219 |
220 |
220 if( iMessage.IsNull() ) // cancelled by the stack |
221 if( iMessage.IsNull() ) // cancelled by the stack |
221 { |
222 { |
222 return EFalse; |
223 return EFalse; |