--- a/bluetoothengine/btaudioman/inc/basrvacc.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/inc/basrvacc.h Tue Sep 14 21:37:10 2010 +0300
@@ -67,6 +67,11 @@
void OpenAudioL(TAccAudioType aType);
/**
+ * Called when the audio open request is to be cancelled.
+ */
+ void CancelOpenAudio();
+
+ /**
* Called when an audio close request comes from Acc FW.
*/
void CloseAudioL(TAccAudioType aType);
--- a/bluetoothengine/btaudioman/inc/basrvaccstate.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/inc/basrvaccstate.h Tue Sep 14 21:37:10 2010 +0300
@@ -102,7 +102,12 @@
* Called when an audio open request comes from Acc FW.
*/
virtual void OpenAudioL(TAccAudioType aType);
-
+
+ /**
+ * Called when the audio open request is to be cancelled.
+ */
+ virtual void CancelOpenAudio();
+
/**
* Called when an audio close request comes from Acc FW.
*/
--- a/bluetoothengine/btaudioman/inc/basrvaccstateattached.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/inc/basrvaccstateattached.h Tue Sep 14 21:37:10 2010 +0300
@@ -84,6 +84,12 @@
void OpenAudioL(TAccAudioType aType);
/**
+ * Called when the audio open request is to be cancelled.
+ */
+ void CancelOpenAudio();
+
+
+ /**
* Called when an audio close request comes from Acc FW.
*/
void CloseAudioL(TAccAudioType aType);
--- a/bluetoothengine/btaudioman/src/basrvacc.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/src/basrvacc.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -139,6 +139,12 @@
iState->CloseAudioL(aType);
}
+void CBasrvAcc::CancelOpenAudio()
+ {
+ TRACE_FUNC
+ iState->CancelOpenAudio();
+ }
+
const TAccInfo* CBasrvAcc::AccInfo(const TBTDevAddr& aAddr)
{
TRACE_FUNC
--- a/bluetoothengine/btaudioman/src/basrvaccman.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/src/basrvaccman.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Implementation of an accessory management.
-* Version : %version: 14.1.11 %
+* Version : %version: 14.1.12 %
*
*/
@@ -619,27 +619,23 @@
TInt idx = FindAcc(aAddr);
if (idx >= 0)
{
- // Check if another audio link opened already
- TInt audiolinks = AudioLinkStatus();
-
- if ( ( audiolinks && audiolinks != aProfile) ||
- ( iAudioRequests.Count() &&
- iAudioRequests[0].iOngoing &&
- iAudioRequests[0].iAddr == aAddr) )
+ TInt audiolinks = AudioLinkStatus();
+ if ( audiolinks && audiolinks != aProfile)
{
- // another audio type is opened while we have an audio link or pending audio request.
- if (iAudioRequests.Count())
- {
- TRACE_INFO((_L(" [audio link check] existing audio link %x, audio request pending ? %d. Audio should be rejected!"),
- audiolinks, iAudioRequests[0].iOngoing))
- }
- else
- {
- TRACE_INFO((_L(" [audio link check] existing audio link %x. Audio should be rejected!"),
+ TRACE_INFO((_L(" [global audio link check] existing audio link %x. Audio should be rejected!"),
audiolinks))
- }
RejectAudioLink(aAddr, (aProfile == EStereo) ? EAccStereoAudio : EAccMonoAudio);
}
+ else if ( iAudioRequests.Count() &&
+ iAudioRequests[0].iReqType == EOpenReqFromAudioPolicy &&
+ iAudioRequests[0].iAudioType == ((aProfile == EStereo) ? EAccStereoAudio : EAccMonoAudio) &&
+ iAudioRequests[0].iOngoing &&
+ iAudioRequests[0].iAddr == aAddr)
+ {
+ TRACE_INFO((_L(" [device-specific audio request check] audio request pending ? %d. Audio request should be cancelled!"),
+ iAudioRequests[0].iOngoing))
+ iAccs[idx]->CancelOpenAudio();
+ }
else
{
iAccs[idx]->AccOpenedAudio(aProfile);
--- a/bluetoothengine/btaudioman/src/basrvaccstate.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/src/basrvaccstate.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -86,6 +86,11 @@
TRACE_FUNC
}
+void CBasrvAccState::CancelOpenAudio()
+ {
+ TRACE_FUNC
+ }
+
void CBasrvAccState::CloseAudioL(TAccAudioType /*aType*/)
{
TRACE_FUNC
@@ -128,7 +133,7 @@
}
void CBasrvAccState::NewProfileConnection(TProfiles aProfile)
- {
+ {
AccInfo().iConnProfiles |= aProfile;
AccInfo().iSuppProfiles |= aProfile;
if (aProfile == ERemConCT &&
--- a/bluetoothengine/btaudioman/src/basrvaccstateattached.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btaudioman/src/basrvaccstateattached.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Implementation of Connected state.
-* Version : %version: 21 %
+* Version : %version: 22 %
*
*/
@@ -228,6 +228,16 @@
User::RequestComplete( myStatus, KErrNone );
}
+void CBasrvAccStateAttached::CancelOpenAudio()
+ {
+ TRACE_FUNC
+
+ if (iAudioOpener)
+ {
+ iAudioOpener->Cancel();
+ }
+ }
+
void CBasrvAccStateAttached::CloseAudioL(TAccAudioType aType)
{
TRACE_FUNC
--- a/bluetoothengine/btmac/inc/btmac/btmrfcommsock.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btmac/inc/btmac/btmrfcommsock.h Tue Sep 14 21:37:10 2010 +0300
@@ -106,14 +106,6 @@
* @return the BD address
*/
const TBTDevAddr& Remote() const;
-
- /**
- * Requests for master role
- *
- * @since S60 v3.1
- * @return the completion error code
- */
- TInt RequestMasterRole();
/**
* Activates the notification of baseband events
--- a/bluetoothengine/btmac/src/btmac/btmrfcommsock.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btmac/src/btmac/btmrfcommsock.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -170,19 +170,6 @@
return iRemote;
}
-TInt CBtmRfcommSock::RequestMasterRole()
- {
- TRACE_FUNC
- TRACE_ASSERT(iDataSocket, EBTPanicNullPointer)
- TUint32 basebandState = 0;
- TInt err = iDataSocket->PhysicalLinkState( basebandState );
- if (!err && (basebandState & ENotifySlave))
- {
- err = iDataSocket->RequestMasterRole();
- }
- return err;
- }
-
TBool CBtmRfcommSock::IsInSniff() const
{
return iInSniff;
@@ -244,7 +231,8 @@
if (aErr == KErrNone)
{
iInData.ReAllocL(256);
- RequestMasterRole();
+ // Previously a request to become piconet master was made here, for IOP reasons this
+ // was removed (as theoretically being a piconet master is not required for HFP/HSP AG).
TInt err = iAda.Open(iServer, iRemote);
TRACE_INFO((_L("ada.Open err %d"), err))
iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole |
@@ -275,7 +263,8 @@
if (aErr == KErrNone)
{
iInData.ReAllocL(256);
- RequestMasterRole();
+ // Previously a request to become piconet master was made here, for IOP reasons this
+ // was removed (as theoretically being a piconet master is not required for HFP/HSP AG).
TInt err = iAda.Open(iServer, iRemote);
TRACE_INFO((_L("ada.Open err %d"), err))
iDataSocket->ActivateBasebandEventNotifier(ENotifyAnyPowerMode | ENotifyAnyRole |
--- a/bluetoothengine/btnotif/inc/BTNGenericInfoNotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/BTNGenericInfoNotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -58,15 +58,15 @@
TPtrC8 StartL(const TDesC8& aBuffer );
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/BTNGenericQueryNotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/BTNGenericQueryNotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -59,17 +59,16 @@
*/
TPtrC8 StartL(const TDesC8& aBuffer);
- /**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
- * @return None.
- */
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot,
- const RMessagePtr2& aMessage);
+ /**
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
+ * @return None.
+ */
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase Updates a currently active notifier.
--- a/bluetoothengine/btnotif/inc/btnauthnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnauthnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -68,17 +68,16 @@
*/
void Cancel();
-
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/btnenterpriseitsecurityinfonotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnenterpriseitsecurityinfonotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -50,16 +50,16 @@
*/
TPtrC8 StartL(const TDesC8& aBuffer);
- /**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
- * @return None.
- */
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ /**
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
+ * @return None.
+ */
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/btninqnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btninqnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -63,15 +63,15 @@
void Cancel();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
/**
* From MBTNDeviceSearchObserver Called when device search and selection completes.
--- a/bluetoothengine/btnotif/inc/btnobexpinnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnobexpinnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -51,15 +51,15 @@
TNotifierInfo RegisterL();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
private:
--- a/bluetoothengine/btnotif/inc/btnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -89,16 +89,14 @@
virtual void ConstructL();
/**
- * Used in asynchronous notifier launch to store received parameters
- * into members variables and make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- virtual void GetParamsL(const TDesC8& aBuffer,
- TInt aReplySlot,
- const RMessagePtr2& aMessage)=0;
+ virtual void ProcessStartParamsL() = 0;
/**
* A utility function for setting the power status of Bluetooth.
@@ -282,24 +280,28 @@
*/
TBool CheckQueryInterval();
+ static TInt ProcessStartParamsCallBack(TAny* aNotif);
+
protected: // Data
RMessagePtr2 iMessage; // Received message
TInt iReplySlot; // Reply slot
+ HBufC8* iParamBuffer; // Copy of the param buffer received in StartL
+
+ CAsyncCallBack* iProcessStartParamsCallBack;
+
TNotifierInfo iInfo; // Notifier parameters structure
TBTRegistryQueryState iBTRegistryQueryState;
CBTDeviceArray* iDeviceArray; // for getting device from registry
CBTDevice* iDevice; // Current Bluetooth device
TBTDevAddr iBTAddr; // Gotten from PckBuffer, constant no matter how iDevice changes.
CBTNotifUIUtil* iNotifUiUtil; // Utility to show UI notes & queries
+ CBTNotifUIUtil* iAuthoriseDialog; // to show Authorisation dialogs
CBTEngSettings* iBTEngSettings;
TBool iIsCoverUI;
private:
CBTEngDevMan* iDevMan; // for BT registry manipulation
-
-
-
};
#endif
--- a/bluetoothengine/btnotif/inc/btnotifpanic.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnotifpanic.h Tue Sep 14 21:37:10 2010 +0300
@@ -22,7 +22,10 @@
enum TBtNotifPanic
{
- EiDeviceNullWhenCallingGetDeviceFromRegL = 0,
+ EiDeviceNullWhenCallingGetDeviceFromRegL = 0,
+ EiParamBufferLeakedFromPreviousActivation = 1,
+ EiParamBufferNullInProcessStartParams = 2,
+ EiMessageNullInProcessStartParams = 3,
};
template <typename XAny>
--- a/bluetoothengine/btnotif/inc/btnpaireddevsettnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnpaireddevsettnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -58,15 +58,15 @@
void Cancel();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase Updates a currently active notifier.
--- a/bluetoothengine/btnotif/inc/btnpairnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnpairnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -46,15 +46,15 @@
virtual TNotifierInfo RegisterL();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- virtual void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ virtual void ProcessStartParamsL();
virtual void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
--- a/bluetoothengine/btnotif/inc/btnpbappinnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnpbappinnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -51,15 +51,15 @@
TNotifierInfo RegisterL();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
private:
--- a/bluetoothengine/btnotif/inc/btnpinnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnpinnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -53,15 +53,15 @@
TNotifierInfo RegisterL();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/btnpwrnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnpwrnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -55,15 +55,15 @@
TNotifierInfo RegisterL();
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ void ProcessStartParamsL();
private:
--- a/bluetoothengine/btnotif/inc/btnssppasskeyentrynotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnssppasskeyentrynotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -60,15 +60,15 @@
TPtrC8 UpdateL(const TDesC8& aBuffer);
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
- * @return None.
- */
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
+ * @return None.
+ */
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/btnumcmpnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btnumcmpnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -57,15 +57,15 @@
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/inc/btuserconfnotifier.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/inc/btuserconfnotifier.h Tue Sep 14 21:37:10 2010 +0300
@@ -90,15 +90,15 @@
/**
- * From CBTNotifierBase Used in asynchronous notifier launch to
- * store received parameters into members variables and
- * make needed initializations.
- * @param aBuffer A buffer containing received parameters
- * @param aReturnVal The return value to be passed back.
- * @param aMessage Should be completed when the notifier is deactivated.
+ * From CBTNotifierBase
+ * Used in asynchronous notifier launch to start the actual processing
+ * of parameters received in StartL. StartL just stores a copy of the
+ * parameter buffer, schedules a callback to call this method and returns
+ * ASAP, so the actual work begins here, safely outside of the StartL
+ * context so that waiting dialogs can be freely used if need be.
* @return None.
*/
- void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); // Get input parameters
+ void ProcessStartParamsL();
/**
* From CBTNotifierBase
--- a/bluetoothengine/btnotif/src/BTNAuthNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNAuthNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -107,22 +107,14 @@
}
// ----------------------------------------------------------
-// CBTAuthNotifier::GetParamsL
+// CBTAuthNotifier::ProcessStartParamsL
// Initialize parameters and check if device is already
// in registry. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTAuthNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTAuthNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL()"));
-
- if( !iMessage.IsNull())
- {
- User::Leave(KErrInUse);
- }
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
+ FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL()"));
if ( AutoLockOnL() )
{
@@ -134,7 +126,7 @@
TBTAuthorisationParams param;
TPckgC<TBTAuthorisationParams> pckg(param);
- pckg.Set(aBuffer);
+ pckg.Set(*iParamBuffer);
iServiceUid = pckg().iUid.iUid; // Pick up service uid from message
iBTAddr = pckg().iBDAddr;
@@ -171,13 +163,13 @@
}
#ifdef _DEBUG
- FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() Executing authorisation..."));
+ FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL() Executing authorisation..."));
TBuf<12> deviceAddressString;
pckg().iBDAddr.GetReadable(deviceAddressString);
FTRACE(FPrint(_L("[BTNOTIF]\t BT Address: %S"), &deviceAddressString));
- FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL Service Uid: %d = 0x%X"), iServiceUid, iServiceUid ));
+ FTRACE(FPrint(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL Service Uid: %d = 0x%X"), iServiceUid, iServiceUid ));
#endif
- FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -97,22 +97,14 @@
}
// ----------------------------------------------------------
-// CBTGenericInfoNotifier::GetParamsL
+// CBTGenericInfoNotifier::ProcessStartParamsL
// Mandatory for BT Notifiers when using asynchronous launch.
// ----------------------------------------------------------
//
-void CBTGenericInfoNotifier::GetParamsL(const TDesC8& aBuffer,
- TInt /*aReplySlot*/,
- const RMessagePtr2& aMessage )
+void CBTGenericInfoNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::GetParamsL"));
- if (!iMessage.IsNull())
- {
- aMessage.Complete(KErrInUse);
- return;
- }
- iMessage = aMessage;
- ProcessParamBufferL(aBuffer, EFalse);
+ FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::ProcessStartParamsL"));
+ ProcessParamBufferL(*iParamBuffer, EFalse);
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNGenericQueryNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNGenericQueryNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -135,31 +135,20 @@
}
// ----------------------------------------------------------
-// CBTGenericQueryNotifier::GetParamsL
+// CBTGenericQueryNotifier::ProcessStartParamsL
// Mandatory for BT Notifiers when using asynchronous launch.
// This notifier is synchronous so no implementation is needed.
// ----------------------------------------------------------
//
-void CBTGenericQueryNotifier::GetParamsL(const TDesC8& aBuffer,
- TInt aReplySlot,
- const RMessagePtr2& aMessage)
+void CBTGenericQueryNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::GetParamsL"));
+ FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::ProcessStartParamsL"));
- if (iMessage.Handle())
- {
- aMessage.Complete(KErrInUse);
- return;
- }
-
- ProcessParamBufferL(aBuffer);
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
+ ProcessParamBufferL(*iParamBuffer);
ShowQueryAndCompleteL();
- FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::GetParamsL Complete"));
+ FLOG(_L("[BTNOTIF]\t CBTGenericQueryNotifier::ProcessStartParamsL Complete"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNInqNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNInqNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -77,30 +77,21 @@
}
// ----------------------------------------------------------
-// CBTInqNotifier::GetParamsL
+// CBTInqNotifier::ProcessStartParamsL
// Initialize parameters and launch device search.
// ----------------------------------------------------------
//
-void CBTInqNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTInqNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTInqNotifier::GetParamsL()"));
+ FLOG(_L("[BTNOTIF]\t CBTInqNotifier::ProcessStartParamsL()"));
- if( !iMessage.IsNull() )
- {
- aMessage.Complete(KErrInUse);
- return;
- }
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
-
TBTDeviceClass cod;
TBTDeviceSelectionParamsPckg pckg;
- pckg.Copy(aBuffer);
+ pckg.Copy(*iParamBuffer);
LaunchInquiryL(pckg().DeviceClass());
- FLOG(_L("[BTNOTIF]\t CBTInqNotifier::GetParamsL() completed "));
+ FLOG(_L("[BTNOTIF]\t CBTInqNotifier::ProcessStartParamsL() completed "));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNObexPinNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNObexPinNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -72,21 +72,13 @@
}
// ----------------------------------------------------------
-// CBTObexPinNotifier::GetParamsL
+// CBTObexPinNotifier::ProcessStartParamsL
// Initialize parameters. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTObexPinNotifier::GetParamsL(const TDesC8& /* aBuffer */, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTObexPinNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::GetParamsL()"));
-
- if( !iMessage.IsNull())
- {
- User::Leave(KErrInUse);
- }
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
+ FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::ProcessStartParamsL()"));
if ( AutoLockOnL() )
{
@@ -98,7 +90,7 @@
ShowNoteCompleteMessageL();
- FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTObexPinNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNPBAPPinNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNPBAPPinNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -80,22 +80,14 @@
}
// ----------------------------------------------------------
-// CBTPBAPPinNotifier::GetParamsL
+// CBTPBAPPinNotifier::ProcessStartParamsL
// Initialize parameters. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTPBAPPinNotifier::GetParamsL(const TDesC8& /* aBuffer */, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTPBAPPinNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::GetParamsL()"));
+ FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::ProcessStartParamsL()"));
- if( !iMessage.IsNull())
- {
- User::Leave(KErrInUse);
- }
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
-
if ( AutoLockOnL() )
{
// The phone is locked, access denied.
@@ -106,7 +98,7 @@
ShowNoteCompleteMessageL();
- FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTPBAPPinNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNPinNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNPinNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -99,15 +99,15 @@
// in registry. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTPinNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTPinNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() >>"));
+ FLOG(_L("[BTNOTIF]\t CBTPinNotifier::ProcessStartParamsL() >>"));
- CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
+ CBTNPairNotifierBase::ProcessStartParamsL();
TBTPinCodeEntryNotifierParams param;
TPckgC<TBTPinCodeEntryNotifierParams> pckg(param);
- pckg.Set(aBuffer);
+ pckg.Set(*iParamBuffer);
iBTAddr = pckg().DeviceAddress();
if ( OtherOutgoPairing(iBTAddr) )
@@ -123,7 +123,7 @@
iStrongPinRequired = pckg().StrongPinCodeRequired();
ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
- FLOG(_L("[BTNOTIF]\t CBTPinNotifier::GetParamsL() <<"));
+ FLOG(_L("[BTNOTIF]\t CBTPinNotifier::ProcessStartParamsL() <<"));
}
// ----------------------------------------------------------
@@ -263,6 +263,7 @@
aRBuf, R_BT_MIN_PASSKEY_PROMPT, devName, 1 );
RBuf tmpBuf;
+ tmpBuf.CreateL( aRBuf.MaxLength() );
tmpBuf.CleanupClosePushL();
tmpBuf.Swap( aRBuf );
aRBuf.ReAllocL( aRBuf.MaxLength() + sizeof(TUint));
--- a/bluetoothengine/btnotif/src/BTNPwrNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNPwrNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -72,22 +72,16 @@
}
// ----------------------------------------------------------
-// CBTPwrNotifier::GetParamsL
+// CBTPwrNotifier::ProcessStartParamsL
// Initialize parameters. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTPwrNotifier::GetParamsL(const TDesC8& /*aBuffer*/, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTPwrNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::GetParamsL()"));
-
- if( iReplySlot!=NULL || !iMessage.IsNull() )
- User::Leave(KErrInUse);
-
- iMessage = aMessage;
- iReplySlot = aReplySlot;
+ FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::ProcessStartParamsL()"));
ShowNoteAndCompleteMessageL();
- FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTPwrNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/BTNotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/BTNotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -93,6 +93,10 @@
iBTEngSettings = CBTEngSettings::NewL();
iDevMan = CBTEngDevMan::NewL( this );
iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
+ iAuthoriseDialog = CBTNotifUIUtil::NewL( iIsCoverUI );
+
+ TCallBack processParamsCb(ProcessStartParamsCallBack, this);
+ iProcessStartParamsCallBack = new (ELeave) CAsyncCallBack(processParamsCb, CActive::EPriorityHigh);
}
// ----------------------------------------------------------
@@ -103,6 +107,8 @@
{
FLOG(_L("[BTNOTIF]\t CBTNotifierBase::~CBTNotifierBase()"));
Cancel();
+
+ delete iProcessStartParamsCallBack;
FLOG(_L("[BTNOTIF]\t CBTNotifierBase::~CBTNotifierBase() -- Done"));
}
@@ -145,16 +151,31 @@
//
void CBTNotifierBase::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
{
+ if (!iMessage.IsNull())
+ {
+ // We're already active. The notifier server will complete the message if we leave.
+ User::Leave(KErrInUse);
+ }
+
+ __ASSERT_DEBUG(!iParamBuffer, BTNOTIF_PANIC(EiParamBufferLeakedFromPreviousActivation));
+
if( !iNotifUiUtil )
{
iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
}
-
- TRAPD(err, GetParamsL(aBuffer, aReplySlot, aMessage));
- if (err)
+ if( !iAuthoriseDialog )
{
- CompleteMessage(err);
+ iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
}
+
+ iParamBuffer = aBuffer.AllocL(); // ProcessStartParamsCallBack responsible for deallocation
+ iMessage = aMessage;
+ iReplySlot = aReplySlot;
+
+ // Return from StartL as soon as possible - processing the parameters involves displaying
+ // waiting dialogs which would block the notifier server thus preventing other notifiers
+ // from running, were we to do it from here.
+ iProcessStartParamsCallBack->CallBack();
}
// ----------------------------------------------------------
@@ -166,9 +187,23 @@
{
FLOG(_L("[BTNOTIF]\t CBTNotifierBase::Cancel()"));
+ // In case we are being called before ProcessStartParamsCallBack
+ // had a chance to run:
+ delete iParamBuffer;
+ iParamBuffer = NULL;
+
+ if (iProcessStartParamsCallBack)
+ {
+ iProcessStartParamsCallBack->Cancel();
+ // - the callback object is deleted in the destructor.
+ }
+
delete iNotifUiUtil;
iNotifUiUtil = NULL;
+ delete iAuthoriseDialog;
+ iAuthoriseDialog = NULL;
+
delete iBTEngSettings;
iBTEngSettings = NULL;
@@ -199,6 +234,25 @@
return (ret);
}
+TInt CBTNotifierBase::ProcessStartParamsCallBack(TAny* aNotif)
+ {
+ CBTNotifierBase* notif = static_cast<CBTNotifierBase*>(aNotif);
+
+ __ASSERT_DEBUG(notif->iParamBuffer, BTNOTIF_PANIC(EiParamBufferNullInProcessStartParams));
+ __ASSERT_DEBUG(!notif->iMessage.IsNull(), BTNOTIF_PANIC(EiMessageNullInProcessStartParams));
+
+ TRAPD(err, notif->ProcessStartParamsL());
+ if (err)
+ {
+ notif->CompleteMessage(err);
+ }
+
+ delete notif->iParamBuffer;
+ notif->iParamBuffer = NULL;
+
+ return 0;
+ }
+
// ----------------------------------------------------------
// CBTNotifierBase::AutoLockOnL
--- a/bluetoothengine/btnotif/src/btnenterpriseitsecurityinfonotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btnenterpriseitsecurityinfonotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -94,13 +94,11 @@
}
// ----------------------------------------------------------
-// CBTEnterpriseItSecurityInfoNotifier::GetParamsL
+// CBTEnterpriseItSecurityInfoNotifier::ProcessStartParamsL
// Mandatory for BT Notifiers when using asynchronous launch.
// ----------------------------------------------------------
//
-void CBTEnterpriseItSecurityInfoNotifier::GetParamsL(const TDesC8& /*aBuffer*/,
- TInt /*aReplySlot*/,
- const RMessagePtr2& /*aMessage*/)
+void CBTEnterpriseItSecurityInfoNotifier::ProcessStartParamsL()
{
//nothing to do here
}
--- a/bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -86,27 +86,18 @@
// ----------------------------------------------------------
-// CBTPairedDevSettNotifier::GetParamsL
+// CBTPairedDevSettNotifier::ProcessStartParamsL
// Mandatory for BT Notifiers when using asynchronous launch.
// This notifier is synchronous so no implementation is needed.
// ----------------------------------------------------------
//
-void CBTPairedDevSettNotifier::GetParamsL(const TDesC8& aBuffer,
- TInt aReplySlot,
- const RMessagePtr2& aMessage)
+void CBTPairedDevSettNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::GetParamsL"));
+ FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::ProcessStartParamsL"));
- if( iReplySlot != NULL || !iMessage.IsNull())
- {
- User::Leave(KErrInUse);
- }
+ ProcessParamBufferL(*iParamBuffer);
- iMessage = aMessage;
- iReplySlot = aReplySlot;
- ProcessParamBufferL(aBuffer);
-
- FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::GetParamsL Complete"));
+ FLOG(_L("[BTNOTIF]\t CBTPairedDevSettNotifier::ProcessStartParamsL Complete"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/btnpairnotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btnpairnotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -70,27 +70,17 @@
}
// ----------------------------------------------------------
-// CBTNPairNotifierBase::GetParamsL
+// CBTNPairNotifierBase::ProcessStartParamsL
// ----------------------------------------------------------
//
-void CBTNPairNotifierBase::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTNPairNotifierBase::ProcessStartParamsL()
{
- (void)aBuffer;
- if( !iMessage.IsNull() )
- {
- User::Leave(KErrInUse);
- }
-
- iMessage = (RMessage2)aMessage;
- iReplySlot = aReplySlot;
-
if ( AutoLockOnL() )
{
// The phone is locked, access denied.
//
CompleteMessage(KErrCancel);
}
-
}
// ----------------------------------------------------------
@@ -125,13 +115,23 @@
BtNotifNameUtils::SetDeviceNameL(pckg().DeviceName(), *iDevice);
// Finally show new prompt for dialog if it is still on the screen
- // and user has not given a alias for device.
- if( !iNotifUiUtil->IsQueryReleased() && !iDevice->IsValidFriendlyName() )
+ // and user has not given a alias for device.
+ CBTNotifUIUtil* dialog = NULL;
+ if ( !iNotifUiUtil->IsQueryReleased())
+ {
+ dialog = iNotifUiUtil;
+ }
+ else if ( !iAuthoriseDialog->IsQueryReleased())
+ {
+ dialog = iAuthoriseDialog;
+ }
+
+ if( dialog && !iDevice->IsValidFriendlyName() )
{
RBuf prompt;
prompt.CleanupClosePushL();
GenerateQueryPromptL( prompt );
- iNotifUiUtil->UpdateQueryDlgL( prompt );
+ dialog->UpdateQueryDlgL( prompt );
CleanupStack::PopAndDestroy( &prompt );
}
}
@@ -213,8 +213,9 @@
devName.Zero();
// Show query for use to accept/reject incoming pairing request
- TInt keypress = iNotifUiUtil->ShowQueryL( prompt, R_BT_GENERIC_QUERY,
- ECmdBTnotifUnavailable, devName, CAknQueryDialog::EConfirmationTone );
+ TInt keypress = iAuthoriseDialog->ShowQueryL( prompt, R_BT_GENERIC_QUERY,
+ ECmdBTnotifUnavailable, devName, CAknQueryDialog::EConfirmationTone);
+
CleanupStack::PopAndDestroy( &prompt );
if( iMessage.IsNull() ) // cancelled by the stack
--- a/bluetoothengine/btnotif/src/btnssppasskeyentrynotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btnssppasskeyentrynotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -42,6 +42,8 @@
#include <csxhelp/bt.hlp.hrh> // The bt hrh info is needed, for help launching
#endif
+// ================= CONSTANT =======================
+const TInt KMaxPasskeyLength = 16;
// ================= MEMBER FUNCTIONS =======================
@@ -92,19 +94,19 @@
}
// ----------------------------------------------------------
-// CBTSSPPasskeyEntryNotifier::GetParamsL
+// CBTSSPPasskeyEntryNotifier::ProcessStartParamsL
// Initialize parameters and check if device is already
// in registry. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTSSPPasskeyEntryNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTSSPPasskeyEntryNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GetParamsL()"));
+ FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::ProcessStartParamsL()"));
- CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
+ CBTNPairNotifierBase::ProcessStartParamsL();
TBTPasskeyDisplayParamsPckg pckg;
- pckg.Copy(aBuffer);
+ pckg.Copy(*iParamBuffer);
iBTAddr = pckg().DeviceAddress();
if ( OtherOutgoPairing(iBTAddr) )
{
@@ -120,7 +122,7 @@
ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
- FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTSSPPasskeyEntryNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
@@ -135,8 +137,19 @@
TBTPasskeyDisplayUpdateParamsPckg pckg;
pckg.Copy(aBuffer);
-
- if(pckg().Type() != TBTNotifierUpdateParams2::EPasskeyDisplay)
+
+ // Update devicename if needed
+ CBTNPairNotifierBase::UpdateL(aBuffer);
+
+ if(pckg().Type() != TBTNotifierUpdateParams2::EPasskeyDisplay
+ || !iAuthoriseDialog->IsQueryReleased())
+ {
+ TPtrC8 ret(KNullDesC8);
+ return (ret);
+ }
+
+ TInt length = iBuf.Length();
+ if (length > KMaxPasskeyLength )
{
TPtrC8 ret(KNullDesC8);
return (ret);
@@ -160,7 +173,10 @@
case EPasskeyDigitDeleted:
{
// remove an '*' from the tail of iBuf
- iBuf.Delete(iBuf.Length()-1, 1);
+ if ( length )
+ {
+ iBuf.Delete(iBuf.Length()-1, 1);
+ }
break;
}
case EPasskeyCleared:
--- a/bluetoothengine/btnotif/src/btnumcmpnotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btnumcmpnotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -90,19 +90,19 @@
}
// ----------------------------------------------------------
-// CBTNumCmpNotifier::GetParamsL
+// CBTNumCmpNotifier::ProcessStartParamsL
// Initialize parameters and check if device is already
// in registry. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTNumCmpNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTNumCmpNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GetParamsL()"));
+ FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::ProcessStartParamsL()"));
- CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
+ CBTNPairNotifierBase::ProcessStartParamsL();
TBTNumericComparisonParamsPckg pckg;
- pckg.Copy(aBuffer);
+ pckg.Copy(*iParamBuffer);
iBTAddr = pckg().DeviceAddress();
if ( OtherOutgoPairing( iBTAddr) )
{
@@ -120,7 +120,7 @@
// base class
ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
- FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTNumCmpNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btnotif/src/btuserconfnotifier.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btnotif/src/btuserconfnotifier.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -90,19 +90,19 @@
}
// ----------------------------------------------------------
-// CBTUserConfNotifier::GetParamsL
+// CBTUserConfNotifier::ProcessStartParamsL
// Initialize parameters and check if device is already
// in registry. Jump to RunL as soon as possible.
// ----------------------------------------------------------
//
-void CBTUserConfNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
+void CBTUserConfNotifier::ProcessStartParamsL()
{
- FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::GetParamsL()"));
+ FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::ProcessStartParamsL()"));
- CBTNPairNotifierBase::GetParamsL( aBuffer, aReplySlot, aMessage );
+ CBTNPairNotifierBase::ProcessStartParamsL();
TBTUserConfirmationParamsPckgCopy pckg;
- pckg.Copy(aBuffer);
+ pckg.Copy(*iParamBuffer);
iBTAddr = pckg().DeviceAddress();
if ( OtherOutgoPairing( iBTAddr) )
{
@@ -117,7 +117,7 @@
// base class
ProcessParamsGetDeviceL( iBTAddr, pckg().DeviceName() );
- FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::GetParamsL() completed"));
+ FLOG(_L("[BTNOTIF]\t CBTUserConfNotifier::ProcessStartParamsL() completed"));
}
// ----------------------------------------------------------
--- a/bluetoothengine/btsac/btrcc/group/btrcc.mmp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btsac/btrcc/group/btrcc.mmp Tue Sep 14 21:37:10 2010 +0300
@@ -39,7 +39,6 @@
SOURCE btrccLinker.cpp
SOURCE btrccPlugin.cpp
SOURCE btrccAbsoluteVolumeLevelController.cpp
-SOURCE btrccplayerstarter.cpp
SOURCE btrccBrowsingAdapter.cpp
SOURCE btrccLegacyVolumeLevelController.cpp
SOURCE btrccVolumeLevelControllerBase.cpp
--- a/bluetoothengine/btsac/btrcc/inc/btrccLinker.h Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btsac/btrcc/inc/btrccLinker.h Tue Sep 14 21:37:10 2010 +0300
@@ -45,8 +45,6 @@
class CRemConInterfaceSelector;
class CRemConCoreApiController;
class CBTRCCVolumeLevelController;
-class CRemConCoreApiTarget;
-class CPlayerStarter;
class CBTRCCBrowsingAdapter;
// CLASS DECLARATION
@@ -293,10 +291,6 @@
// For receiving the accessory battery status
CRemConBatteryApiTarget *iRemConBatteryTgt;
-
- CRemConCoreApiTarget* iCoreTarget; // not own
-
- CPlayerStarter* iPlayerStarter; // owned
// For handling the browsing commands.
CBTRCCBrowsingAdapter *iBrowsingAdapter;
--- a/bluetoothengine/btsac/btrcc/inc/btrccplayerstarter.h Wed Sep 01 12:20:04 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implements starting Music play
-*
-*
-*/
-
-
-#ifndef BTRCCPLAYERSTATER_H
-#define BTRCCPLAYERSTATER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <remconcoreapitargetobserver.h>
-
-// FORWARD DECLARATIONS
-class CRemConCoreApiTarget;
-
-/**
-* This class listens to AVRCP PLAY command by headset,if music player is not running
-* when such a command is received, it will be launched and requested to start playing.
-* */
-NONSHARABLE_CLASS(CPlayerStarter) :
- public CActive, public MRemConCoreApiTargetObserver
- {
-
-public:
-
- /**
- * Two-phased constructor.
- *
- */
- static CPlayerStarter* NewL();
-
- /**
- * Set the reference for AVRCP Core API command receiving and
- * responses to those command.
- */
- void SetCoreTarget(CRemConCoreApiTarget& aTarget);
-
- /**
- * Destructor.
- */
- ~CPlayerStarter();
-
-private: // From CActive
-
- /**
- * Informs the observer that an accessory has created a control
- * connection to our device.
- * @param None.
- * @return None.
- */
- void RunL();
-
- /**
- * Handles a possible leave from RunL().
- * @param aError The leave code from RunL().
- * @return KErrNone.
- */
- TInt RunError(TInt aError);
-
- /**
- * Cancels the volume change operation.
- * @param None.
- * @return None.
- */
- void DoCancel();
-
- // from base class MRemConCoreApiTargetObserver
-
- /**
- * From MRemConCoreApiTargetObserver
- * A 'play' command has been received.
- *
- * @param aSpeed The playback speed.
- * @param aButtonAct The button action associated with the command.
- */
- void MrccatoPlay(
- TRemConCoreApiPlaybackSpeed aSpeed,
- TRemConCoreApiButtonAction aButtonAct );
-
- /**
- * From MRemConCoreApiTargetObserver
- * A command has been received.
- *
- * @param aOperationId The operation ID of the command.
- * @param aButtonAct The button action associated with the command.
- */
- void MrccatoCommand(
- TRemConCoreApiOperationId aOperationId,
- TRemConCoreApiButtonAction aButtonAct );
-
-private:
-
- /**
- * C++ default constructor.
- */
- CPlayerStarter();
-
- /**
- * Symbian 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Start music player if it is not running yet.
- */
- void StartPlayIfNeeded();
-
- /**
- * Tells if MPX music player is running or not.
- */
- TBool IsMusicPlayerRunning();
-
- /**
- * Tells if Video player is running or not.
- */
- TBool IsVideoPlayerRunning();
-
- /**
- * Launch MPX player.
- */
- void LaunchMusicPlayerL();
-
-private:
- enum TOpState
- {
- EIdle = 0,
- ERespondPlayOk , // responding OK to play command is outstanding
- ERespondPlayNok, // responding NOT OK to play command is outstanding
- EPlayMusicTiming, // scheduling internal PLAY command to player
- };
-
-private: // Data
-
- CRemConCoreApiTarget* iCoreTarget; // not own
-
- RTimer iTimer;
-
- TOpState iState;
- };
-
-#endif // BTRCCACLLINKLISTENER_H
-
-// End of File
--- a/bluetoothengine/btsac/btrcc/src/btrccLinker.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btsac/btrcc/src/btrccLinker.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -21,14 +21,12 @@
#include <btaccObserver.h>
#include <remconinterfaceselector.h>
#include <remconaddress.h>
-#include <remconcoreapitarget.h>
#include <apacmdln.h>
#include <apgcli.h>
#include "btaudioremconpskeys.h"
#include "btrccLegacyVolumeLevelController.h"
#include "btrccAbsoluteVolumeLevelController.h"
#include "btrccLinker.h"
-#include "btrccplayerstarter.h"
#include "btrccBrowsingAdapter.h"
#include "debug.h"
#include <btnotif.h>
@@ -122,10 +120,6 @@
// If volume control is not supported, we'll need another interface selector session for disconnecting.
iInterfaceSelectorForDisconnectingTargetSession = CRemConInterfaceSelector::NewL();
}
-
- iPlayerStarter = CPlayerStarter::NewL();
- iCoreTarget = CRemConCoreApiTarget::NewL(*iInterfaceSelector, *iPlayerStarter);
- iPlayerStarter->SetCoreTarget(*iCoreTarget);
iRemConBatteryTgt = CRemConBatteryApiTarget::NewL(*iInterfaceSelector, *this);
@@ -156,7 +150,6 @@
delete iAbsoluteVolController;
delete iLegacyVolController;
- delete iPlayerStarter;
Cancel();
iStateArray.ResetAndDestroy();
iStateArray.Close();
--- a/bluetoothengine/btsac/btrcc/src/btrccplayerstarter.cpp Wed Sep 01 12:20:04 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class launchs music player, then send play command
-* to the player at 2 seconds timeout.
-*
-*/
-
-
-// INCLUDE FILES
-#include <apacmdln.h>
-#include <apgcli.h>
-#include <e32property.h>
-#include <remconcoreapitarget.h>
-#include "btrccplayerstarter.h"
-#include "btaudioremconpskeys.h"
-#include "debug.h"
-
-// MODULE DATA STRUCTURES
-
-// mpx playeris name is mpx.exe in 5.0.
-// it is musicplayer.exe in 3.2.
-_LIT(KMpxPlayerExeName, "mpx.exe");
-
-_LIT(KMpxPlayerSearchPatternBySID, "*102072c3*");
-_LIT(KVideoPlayerSearchPatternBySID, "*200159B2*");
-
-static const TInt KPlayCmdToPlayerDelay = 6000000; // value will be tuned later
-
-// ================= MEMBER FUNCTIONS =======================
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CPlayerStarter* CPlayerStarter::NewL()
- {
- CPlayerStarter* self = new (ELeave) CPlayerStarter();
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-void CPlayerStarter::SetCoreTarget(CRemConCoreApiTarget& aTarget)
- {
- iCoreTarget = &aTarget;
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::CPlayerStarter
-// C++ constructor.
-// -----------------------------------------------------------------------------
-//
-CPlayerStarter::CPlayerStarter()
- :CActive(EPriorityNormal)
- {
- CActiveScheduler::Add(this);
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::ConstructL
-// Symbian 2nd phase constructor.
-// -----------------------------------------------------------------------------
-//
-void CPlayerStarter::ConstructL()
- {
- TRACE_FUNC
- iTimer.CreateLocal();
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CPlayerStarter::~CPlayerStarter()
- {
- TRACE_FUNC
- // Starting player is not finished yet, send play command. Just wish the player
- // can receive it.
- if (IsActive() && iState != ERespondPlayNok)
- {
- RProperty::Set(KBTAudioRemCon, KBTAudioPlayerControl,
- EBTAudioResumePlayer);
- }
- Cancel();
- iTimer.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::RunL
-// -----------------------------------------------------------------------------
-//
-void CPlayerStarter::RunL()
- {
- TRACE_INFO((_L("CPlayerStarter::RunL() state %d, status %d"), iState, iStatus.Int()));
- if (iStatus != KErrNone)
- {
- iState = EIdle;
- return;
- }
- switch (iState)
- {
- case ERespondPlayOk:
- {
- // Response OK has been sent to the remote device, start timer waiting
- // for player's initialization.
- iTimer.After(iStatus, KPlayCmdToPlayerDelay);
- SetActive();
- iState = EPlayMusicTiming;
- TRACE_INFO(_L("schedule PLAY command ..."));
- break;
- }
- case EPlayMusicTiming:
- {
- // Player should have fully up and running. Send PLAY command to it
- // through our internal Play API.
- RProperty::Set(KBTAudioRemCon, KBTAudioPlayerControl,
- EBTAudioResumePlayer);
- TRACE_INFO(_L("PLAY command sent to btmonobearer"));
- iState = EIdle;
- break;
- }
- default:
- {
- iState = EIdle;
- break;
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::RunError
-// -----------------------------------------------------------------------------
-//
-TInt CPlayerStarter::RunError(TInt aError)
- {
- TRACE_FUNC
- (void) aError;
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CPlayerStarter::DoCancel()
- {
- TRACE_FUNC
- switch (iState)
- {
- case ERespondPlayOk:
- case ERespondPlayNok:
- {
- // This cancel won't cancel the response sending to the remote
- // device. (RemCon FW's cancel mechanism is only completing client's request.
- // the real operation in its server side won't be stopped.)
- iCoreTarget->Cancel();
- break;
- }
- case EPlayMusicTiming:
- {
- iTimer.Cancel();
- break;
- }
- }
- }
-// ---------------------------------------------------------------------------
-// A 'play' command has been received.
-// ---------------------------------------------------------------------------
-//
-void CPlayerStarter::MrccatoPlay(
- TRemConCoreApiPlaybackSpeed /* aSpeed */,
- TRemConCoreApiButtonAction aButtonAct )
- {
- TRACE_FUNC
- if ( ( aButtonAct == ERemConCoreApiButtonClick ) ||
- ( aButtonAct == ERemConCoreApiButtonPress ) )
- {
- StartPlayIfNeeded();
- }
- }
-
-// ---------------------------------------------------------------------------
-// A command has been received.
-// ---------------------------------------------------------------------------
-//
-void CPlayerStarter::MrccatoCommand(
- TRemConCoreApiOperationId aOperationId,
- TRemConCoreApiButtonAction aButtonAct )
- {
- TRACE_INFO((_L("CPlayerStarter::MrccatoCommand opId %d, button %d"),
- aOperationId, aButtonAct));
- switch (aOperationId)
- {
- case ERemConCoreApiPlay:
- {
- if ( ( aButtonAct == ERemConCoreApiButtonClick ) ||
- ( aButtonAct == ERemConCoreApiButtonPress ) )
- {
- StartPlayIfNeeded();
- }
- break;
- }
- case ERemConCoreApiStop:
- case ERemConCoreApiPause:
- {
- if ( ( aButtonAct == ERemConCoreApiButtonClick ) ||
- ( aButtonAct == ERemConCoreApiButtonPress ) )
- {
- // if starting player is ongoing, possibly PLAY command has been scheduled
- // need to abort it.
- Cancel();
- }
- break;
- }
- default:
- {
- break;
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPlayerStarter::StartPlayIfNeeded
-// -----------------------------------------------------------------------------
-//
-void CPlayerStarter::StartPlayIfNeeded()
- {
- TRACE_FUNC
- // unfinished business ongoing, eat the event.
- if (IsActive())
- {
- return;
- }
- if (!IsMusicPlayerRunning() && !IsVideoPlayerRunning())
- {
- TRAPD(err, LaunchMusicPlayerL());
- // Send the response of play command to remote device
- iCoreTarget->PlayResponse(iStatus, err);
- SetActive();
- iState = (err) ? ERespondPlayNok : ERespondPlayOk;
- }
- }
-
-TBool CPlayerStarter::IsMusicPlayerRunning()
- {
- TRACE_FUNC
- // Music player is running if we can find a thread whose name contains
- // S60 Music Player's SID.
- TFindThread findt(KMpxPlayerSearchPatternBySID);
- TFullName result;
- TBool running(EFalse);
- if (!findt.Next(result))
- {
- TRACE_INFO((_L("Thread '%S'is found"), &result));
- running = ETrue;
- }
- return running;
- }
-
-TBool CPlayerStarter::IsVideoPlayerRunning()
- {
- TRACE_FUNC
- // Video player is running if we can find a thread whose name contains
- // Video Player's SID.
- TFindThread findt(KVideoPlayerSearchPatternBySID);
- TFullName result;
- TBool running(EFalse);
- if (!findt.Next(result))
- {
- TRACE_INFO((_L("Thread '%S'is found"), &result));
- running = ETrue;
- }
- return running;
- }
-
-void CPlayerStarter::LaunchMusicPlayerL()
- {
- RApaLsSession ls;
- User::LeaveIfError(ls.Connect());
- CleanupClosePushL(ls);
- CApaCommandLine* cmd = CApaCommandLine::NewL();
- CleanupStack::PushL(cmd);
- cmd->SetExecutableNameL( KMpxPlayerExeName );
- cmd->SetCommandL( EApaCommandOpen );
- User::LeaveIfError(ls.StartApp( *cmd ));
- CleanupStack::PopAndDestroy(2); // cmd, ls
- }
-
-
-// End of File
--- a/bluetoothengine/btui/Ecom/src/BTUIDeviceContainer.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/bluetoothengine/btui/Ecom/src/BTUIDeviceContainer.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -426,14 +426,6 @@
return EKeyWasConsumed;
}
- // Show popup commands window if selection or enter key is pressed.
- // It should not go to here, unless | EAknEnableMSK is not set
- if ((aKeyEvent.iCode == EKeyDevice3) || (aKeyEvent.iCode == EKeyEnter))
- {
- iView->ProcessCommandL(EAknSoftkeyContextOptions);
- return EKeyWasConsumed;
- }
-
if ((aKeyEvent.iCode != EKeyLeftArrow) &&
(aKeyEvent.iCode != EKeyRightArrow))
{
--- a/cbsatplugin/atmisccmdplugin/data/2002C3BA.rss Wed Sep 01 12:20:04 2010 +0100
+++ b/cbsatplugin/atmisccmdplugin/data/2002C3BA.rss Tue Sep 14 21:37:10 2010 +0300
@@ -31,7 +31,7 @@
implementation_uid = 0x2002DC6B;// KUidATMiscCmdEcomImpl;
version_no = 1;
display_name = "Miscellaneous AT commands Implementation";
- default_data = "MAT+CLCK|MAT+CPWD|MAT+CUSD|MAT+CPIN|MAT+CNUM|MAT+CFUN|MAT+CBC|OAT+CMEE";
+ default_data = "MAT+CLCK|MAT+CPWD|MAT+CUSD|MAT+CPIN|MAT+CNUM|MAT+CFUN|MAT+CBC|OAT+CMEE|MAT+CGSN|MAT+CGMR|MAT+CGMI|MAT+GMI|MAT+GMR|MAT+GSN|MAT+CGMM|MAT+GMM|MATI|MATI0|MATI1|MATI2|MATI3|MATI4";
opaque_data = "";
}
};
--- a/cbsatplugin/atmisccmdplugin/data/2002C3BA_TDSCDMA.rss Wed Sep 01 12:20:04 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-// Contributors:
-//
-
-#include "../inc/atmisccmdpluginuids.hrh"
-#include <ecom/registryinfo.rh>
-#include <atext_interfaceuid.h>
-
-RESOURCE REGISTRY_INFO theInfo
- {
- // UID for the DLL
- dll_uid = 0x2002C3BA;//KUidATCFunEcomDll;
- // Declare array of interface info
- interfaces =
- {
- INTERFACE_INFO
- {
- // UID of interface that is implemented
- interface_uid = 0x2001CBEE; // ATEXT_INTERFACE_DUN_UID;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x2002DC6B;// KUidATMiscCmdEcomImpl;
- version_no = 1;
- display_name = "Miscellaneous AT commands Implementation";
- default_data = "MAT+CLCK|MAT+CPWD|MAT+CUSD|MAT+CPIN|MAT+CNUM|MAT+CFUN|MAT+CBC|OAT+CMEE|MAT^HVER|MAT+CGSN|MAT+CGMR|MAT+CGMI|MAT+CMGD|OAT+CMGF|MAT+GMI|MAT+GMR|MAT+GSN|MAT+CGMM|MAT+GMM|MATI|MATI0|MATI1|MATI2|MATI3|MATI4|MAT^SCPBR|MAT^SCPBW";
- opaque_data = "";
- }
- };
- }
- };
- }
-
-// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbsatplugin/atmisccmdplugin/data/2002DCE5_TDSCDMA.rss Tue Sep 14 21:37:10 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+// Contributors:
+//
+
+#include "../inc/atmisccmdpluginuids.hrh"
+#include <ecom/registryinfo.rh>
+#include <atext_interfaceuid.h>
+
+RESOURCE REGISTRY_INFO theInfo
+ {
+ // UID for the DLL
+ dll_uid = 0x2002DCE5;//KUidATCFunEcomDll;
+ // Declare array of interface info
+ interfaces =
+ {
+ INTERFACE_INFO
+ {
+ // UID of interface that is implemented
+ interface_uid = 0x2001CBEE; // ATEXT_INTERFACE_DUN_UID;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x2002DC6B;// KUidATMiscCmdEcomImpl;
+ version_no = 1;
+ display_name = "Miscellaneous AT commands Implementation";
+ default_data = "MAT+CLCK|MAT+CPWD|MAT+CUSD|MAT+CPIN|MAT+CNUM|MAT+CFUN|MAT+CBC|OAT+CMEE|MAT^HVER|MAT+CGSN|MAT+CGMR|MAT+CGMI|MAT+CMGD|OAT+CMGF|MAT+GMI|MAT+GMR|MAT+GSN|MAT+CGMM|MAT+GMM|MATI|MATI0|MATI1|MATI2|MATI3|MATI4|MAT^SCPBR|MAT^SCPBW";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+ }
+
+// End of file
--- a/cbsatplugin/atmisccmdplugin/group/atmisccmdplugin.mmp Wed Sep 01 12:20:04 2010 +0100
+++ b/cbsatplugin/atmisccmdplugin/group/atmisccmdplugin.mmp Tue Sep 14 21:37:10 2010 +0300
@@ -13,19 +13,13 @@
*
*/
-FEATUREVARIANT
-
#include <platform_paths.hrh>
#include <data_caging_paths.hrh>
#include "../inc/atmisccmdpluginuids.hrh"
CAPABILITY CAP_ECOM_PLUGIN
VENDORID VID_DEFAULT
-#ifdef PROTOCOL_TDSCDMA
-TARGET atmisccmdplugin_td.dll
-#else
TARGET atmisccmdplugin.dll
-#endif
TARGETTYPE PLUGIN
UID 0x10009D8D 0x2002C3BA
@@ -47,8 +41,6 @@
SOURCE cbccommandhandler.cpp
SOURCE ussdreadmessageimpl.cpp
SOURCE ussdsendmessageimpl.cpp
-
-#ifdef PROTOCOL_TDSCDMA
SOURCE hvercommandhandler.cpp
SOURCE cgsncommandhandler.cpp
SOURCE cgmrcommandhandler.cpp
@@ -59,21 +51,16 @@
SOURCE cgmmcommandhandler.cpp
SOURCE scpbrcommandhandler.cpp
SOURCE scpbwcommandhandler.cpp
-#endif
USERINCLUDE ../inc
MW_LAYER_SYSTEMINCLUDE
-// Resources - inclusion controlled by iby
+// Resources
START RESOURCE ../data/2002C3BA.rss
TARGET atmisccmdplugin.rsc
END
-START RESOURCE ../data/2002C3BA_TDSCDMA.rss
-TARGET atmisccmdplugin_td.rsc
-END
-
LIBRARY ecom.lib
LIBRARY euser.lib
@@ -88,10 +75,7 @@
LIBRARY etel3rdparty.lib
LIBRARY sysutil.lib
-
-#ifdef PROTOCOL_TDSCDMA
LIBRARY customapi.lib
-#endif
DEBUGLIBRARY flogger.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbsatplugin/atmisccmdplugin/group/atmisccmdplugin_td.mmp Tue Sep 14 21:37:10 2010 +0300
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ * Description :
+ *
+ */
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+#include "../inc/atmisccmdpluginuids.hrh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGET atmisccmdplugin_td.dll
+TARGETTYPE PLUGIN
+UID 0x10009D8D 0x2002DCE5
+
+SOURCEPATH ../src
+SOURCE main.cpp
+SOURCE atmisccmdplugin.cpp
+SOURCE atcmdasyncbase.cpp
+SOURCE atcmdsyncbase.cpp
+SOURCE atcommandparser.cpp
+SOURCE clckcommandhandler.cpp
+SOURCE securitycodeverifier.cpp
+SOURCE securityeventhandler.cpp
+SOURCE cbsettinghandler.cpp
+SOURCE cpwdcommandhandler.cpp
+SOURCE cpincommandhandler.cpp
+SOURCE cusdcommandhandler.cpp
+SOURCE cnumcommandhandler.cpp
+SOURCE cfuncommandhandler.cpp
+SOURCE cbccommandhandler.cpp
+SOURCE ussdreadmessageimpl.cpp
+SOURCE ussdsendmessageimpl.cpp
+SOURCE hvercommandhandler.cpp
+SOURCE cgsncommandhandler.cpp
+SOURCE cgmrcommandhandler.cpp
+SOURCE cmgwcommandhandler.cpp
+SOURCE cgmicommandhandler.cpp
+SOURCE cmgdcommandhandler.cpp
+SOURCE telephonywrapper.cpp
+SOURCE cgmmcommandhandler.cpp
+SOURCE scpbrcommandhandler.cpp
+SOURCE scpbwcommandhandler.cpp
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+// Resources
+START RESOURCE ../data/2002DCE5_TDSCDMA.rss
+ TARGET atmisccmdplugin_td.rsc
+END
+
+
+LIBRARY ecom.lib
+LIBRARY euser.lib
+LIBRARY atextpluginbase.lib
+LIBRARY bafl.lib
+LIBRARY etelmm.lib
+LIBRARY etel.lib
+LIBRARY hash.lib
+
+LIBRARY ProfileEng.lib
+LIBRARY StarterClient.lib
+
+LIBRARY etel3rdparty.lib
+LIBRARY sysutil.lib
+LIBRARY customapi.lib
+
+DEBUGLIBRARY flogger.lib
+
+// End of File
--- a/cbsatplugin/atmisccmdplugin/group/bld.inf Wed Sep 01 12:20:04 2010 +0100
+++ b/cbsatplugin/atmisccmdplugin/group/bld.inf Tue Sep 14 21:37:10 2010 +0300
@@ -27,6 +27,7 @@
PRJ_MMPFILES
atmisccmdplugin.mmp
+atmisccmdplugin_td.mmp
PRJ_TESTMMPFILES
--- a/cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -59,7 +59,6 @@
_LIT8(KAtCusd, "AT+CUSD");
_LIT8(KAtCnum, "AT+CNUM");
_LIT8(KAtCmee, "AT+CMEE");
-#ifdef PROTOCOL_TDSCDMA
_LIT8(KAtHver, "AT^HVER");
_LIT8(KAtCgsn, "AT+CGSN");
_LIT8(KAtCgmr, "AT+CGMR");
@@ -80,7 +79,6 @@
_LIT8(KAtGmm, "AT+GMM");
_LIT8(KAtScpbr, "AT^SCPBR");
_LIT8(KAtScpbw, "AT^SCPBW");
-#endif
Trace(KDebugPrintS, "token: ", &token);
// Determine the AT command type
@@ -116,7 +114,6 @@
{
iCmdType = ECmdAtCmee;
}
-#ifdef PROTOCOL_TDSCDMA
else if(!token.CompareF(KAtHver))
{
iCmdType = ECmdAtHver;
@@ -197,7 +194,6 @@
{
iCmdType = ECmdAtScpbw;
}
-#endif
else
{
iCmdType = EUnknown;
@@ -268,14 +264,12 @@
// Extract the token at this point
TPtrC8 retVal = iCmd.MarkedToken();
- // Skip the first delimiter and any further space and control chars
- do
- {
- iCmd.Inc();
- chr = iCmd.Peek();
- }
- while(!iCmd.Eos() && (chr.IsSpace() || chr.IsControl()));
-
+ // Skip comma, space and control chars
+ while(!iCmd.Eos() && (chr == ',' || chr.IsSpace() || chr.IsControl()))
+ {
+ iCmd.Inc();
+ chr = iCmd.Peek();
+ }
TRACE_FUNC_EXIT
return retVal;
}
--- a/cbsatplugin/atmisccmdplugin/src/atmisccmdplugin.cpp Wed Sep 01 12:20:04 2010 +0100
+++ b/cbsatplugin/atmisccmdplugin/src/atmisccmdplugin.cpp Tue Sep 14 21:37:10 2010 +0300
@@ -24,7 +24,6 @@
#include "cnumcommandhandler.h"
#include "cfuncommandhandler.h"
#include "cbccommandhandler.h"
-#ifdef PROTOCOL_TDSCDMA
#include "hvercommandhandler.h"
#include "cgsncommandhandler.h"
#include "cgmrcommandhandler.h"
@@ -35,8 +34,6 @@
#include "cgmmcommandhandler.h"
#include "scpbrcommandhandler.h"
#include "scpbwcommandhandler.h"
-#endif
-
#include "atmisccmdpluginconsts.h"
#include "cmserror.h"
@@ -86,7 +83,6 @@
delete iCNUMHandler;
delete iCFUNHandler;
delete iCBCHandler;
-#ifdef PROTOCOL_TDSCDMA
delete iHVERHandler;
delete iCGSNHandler;
delete iCGMRHandler;
@@ -95,8 +91,7 @@
delete iCMGDHandler;
delete iCGMMHandler;
delete iSCPBRHandler;
- delete iSCPBWHandler;
-#endif
+ delete iSCPBWHandler;
iPhone.Close();
iTelServer.Close();
@@ -119,8 +114,6 @@
iCNUMHandler = CCNUMCommandHandler::NewL(this, iCommandParser, iPhone, iTelServer);
iCFUNHandler = CCFUNCommandHandler::NewL(this, iCommandParser, iPhone);
iCBCHandler = CCBCCommandHandler::NewL(this, iCommandParser, iPhone);
-
-#ifdef PROTOCOL_TDSCDMA
iHVERHandler = CHVERCommandHandler::NewL(this, iCommandParser, iPhone);
iCGSNHandler = CCGSNCommandHandler::NewL(this, iCommandParser, iPhone);
iCGMRHandler = CCGMRCommandHandler::NewL(this, iCommandParser, iPhone);
@@ -152,7 +145,6 @@
static_cast<CCGMMCommandHandler*>(iCGMMHandler)->SetTelephonyError(result);
}
delete telephonyWrapper;
-#endif
TRACE_FUNC_EXIT
}
@@ -226,7 +218,6 @@
iCurrentHandler = NULL;
break;
}
-#ifdef PROTOCOL_TDSCDMA
case (TAtCommandParser::ECmdAtHver):
{
iCurrentHandler = iHVERHandler;
@@ -287,7 +278,6 @@
iCurrentHandler = iSCPBWHandler;
break;
}
-#endif
case (TAtCommandParser::EUnknown):
default:
{
@@ -314,13 +304,11 @@
HandleCMEECommand();
HandleCommandCompleted( KErrNone, EReplyTypeOk);
}
-#ifdef PROTOCOL_TDSCDMA
else if (iCommandParser.Command() == TAtCommandParser::ECmdAtCmgf)
{
HandleCMGFCommand();
HandleCommandCompleted( KErrNone, EReplyTypeOk);
}
-#endif
else if (iCurrentHandler != NULL)
{
iHcCmd = &aCmd;
@@ -489,11 +477,9 @@
{
case EReplyTypeOther:
break;
-#ifdef PROTOCOL_TDSCDMA
case EReplyTypeEditor:
CreateEditModeBuffer( iReplyBuffer );
break;
-#endif
case EReplyTypeOk:
CreateOkOrErrorReply( iReplyBuffer, ETrue );
break;
@@ -877,7 +863,6 @@
{
TRACE_FUNC_ENTRY
-#ifdef PROTOCOL_TDSCDMA
TAtCommandParser::TCommandHandlerType cmdHandlerType = iCommandParser.CommandHandlerType();
if (cmdHandlerType == TAtCommandParser::ECmdHandlerTypeSet)
@@ -889,7 +874,6 @@
static_cast<CCMGWCommandHandler*> (iCMGWHandler)->SetMessageFormat(msgFormat);
}
}
-#endif
TRACE_FUNC_EXIT
}