105 iInfo.iPriority=ENotifierPriorityVHigh; |
105 iInfo.iPriority=ENotifierPriorityVHigh; |
106 return iInfo; |
106 return iInfo; |
107 } |
107 } |
108 |
108 |
109 // ---------------------------------------------------------- |
109 // ---------------------------------------------------------- |
110 // CBTAuthNotifier::GetParamsL |
110 // CBTAuthNotifier::ProcessStartParamsL |
111 // Initialize parameters and check if device is already |
111 // Initialize parameters and check if device is already |
112 // in registry. Jump to RunL as soon as possible. |
112 // in registry. Jump to RunL as soon as possible. |
113 // ---------------------------------------------------------- |
113 // ---------------------------------------------------------- |
114 // |
114 // |
115 void CBTAuthNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage) |
115 void CBTAuthNotifier::ProcessStartParamsL() |
116 { |
116 { |
117 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL()")); |
117 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL()")); |
118 |
|
119 if( !iMessage.IsNull()) |
|
120 { |
|
121 User::Leave(KErrInUse); |
|
122 } |
|
123 |
|
124 iMessage = aMessage; |
|
125 iReplySlot = aReplySlot; |
|
126 |
118 |
127 if ( AutoLockOnL() ) |
119 if ( AutoLockOnL() ) |
128 { |
120 { |
129 // The phone is locked, access denied. |
121 // The phone is locked, access denied. |
130 // Write results back to caller and complete message. |
122 // Write results back to caller and complete message. |
132 return; |
124 return; |
133 } |
125 } |
134 |
126 |
135 TBTAuthorisationParams param; |
127 TBTAuthorisationParams param; |
136 TPckgC<TBTAuthorisationParams> pckg(param); |
128 TPckgC<TBTAuthorisationParams> pckg(param); |
137 pckg.Set(aBuffer); |
129 pckg.Set(*iParamBuffer); |
138 |
130 |
139 iServiceUid = pckg().iUid.iUid; // Pick up service uid from message |
131 iServiceUid = pckg().iUid.iUid; // Pick up service uid from message |
140 iBTAddr = pckg().iBDAddr; |
132 iBTAddr = pckg().iBDAddr; |
141 if ( OtherOutgoPairing( iBTAddr ) ) |
133 if ( OtherOutgoPairing( iBTAddr ) ) |
142 { |
134 { |
169 // Check if device is in the registry, function of notifier base |
161 // Check if device is in the registry, function of notifier base |
170 GetDeviceFromRegL( iBTAddr ); |
162 GetDeviceFromRegL( iBTAddr ); |
171 } |
163 } |
172 |
164 |
173 #ifdef _DEBUG |
165 #ifdef _DEBUG |
174 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() Executing authorisation...")); |
166 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL() Executing authorisation...")); |
175 TBuf<12> deviceAddressString; |
167 TBuf<12> deviceAddressString; |
176 pckg().iBDAddr.GetReadable(deviceAddressString); |
168 pckg().iBDAddr.GetReadable(deviceAddressString); |
177 FTRACE(FPrint(_L("[BTNOTIF]\t BT Address: %S"), &deviceAddressString)); |
169 FTRACE(FPrint(_L("[BTNOTIF]\t BT Address: %S"), &deviceAddressString)); |
178 FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL Service Uid: %d = 0x%X"), iServiceUid, iServiceUid )); |
170 FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL Service Uid: %d = 0x%X"), iServiceUid, iServiceUid )); |
179 #endif |
171 #endif |
180 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() completed")); |
172 FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL() completed")); |
181 } |
173 } |
182 |
174 |
183 // ---------------------------------------------------------- |
175 // ---------------------------------------------------------- |
184 // CBTAuthNotifier::UpdateL |
176 // CBTAuthNotifier::UpdateL |
185 // Notifier update. Stores the received bluetooth |
177 // Notifier update. Stores the received bluetooth |