# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1265062842 -7200 # Node ID 0b192a3a05a41332fea1d70e7c6ea8f5d4ffb854 # Parent 6a1fe72036e33a028196aab23efd8c90072a74ef Revision: 201003 Kit: 201005 diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/expinc/BTAccObserver.h --- a/bluetoothengine/btaudioman/expinc/BTAccObserver.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/expinc/BTAccObserver.h Tue Feb 02 00:20:42 2010 +0200 @@ -93,6 +93,13 @@ virtual TBool IsAvrcpVolCTSupported() = 0; virtual TBool IsAbsoluteVolumeSupported(const TBTDevAddr& aAddr) = 0; + /** + * Get the supported features of a profile in a device. + * @param aAddr The address of the device. + * @param aType the profile identifier + * @return the supported features value. + */ + virtual TInt SupportedFeature( const TBTDevAddr& aAddr, TProfiles aType ) const = 0; }; #endif // BTACC_OBSERVER_H diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/expinc/BTAccTypes.h --- a/bluetoothengine/btaudioman/expinc/BTAccTypes.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/expinc/BTAccTypes.h Tue Feb 02 00:20:42 2010 +0200 @@ -22,6 +22,12 @@ #include +/** + * This value indicates the HSP of a headset/carkit supports Remote + * volume control. + */ +const TInt KHspRemoteVolumeControlSupport = 0x10; + enum TProfiles { ERemConCT = 0x10, // AVRCP Controller diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/inc/BTAccInfo.h --- a/bluetoothengine/btaudioman/inc/BTAccInfo.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/inc/BTAccInfo.h Tue Feb 02 00:20:42 2010 +0200 @@ -21,7 +21,7 @@ // INCLUDES #include // TBTDevAddr - +#include // DATA TYPES // CLASS DECLARATION @@ -125,10 +125,11 @@ void SetSupportedFeature(TUint16 aSupportedFeature, TInt aPosition); /** - * Accessor for the - * @return + * Accessor for the supported feature of a profile + * @return the supported features of this profile. 0 is returned if the profile is not + * found in this storage. */ - TUint16 SupportedFeatureL(TInt aPosition) const; + TUint16 SupportedFeature(TProfiles aProfile) const; public: TBTDevAddr iAddr; diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/inc/basrvacc.h --- a/bluetoothengine/btaudioman/inc/basrvacc.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/inc/basrvacc.h Tue Feb 02 00:20:42 2010 +0200 @@ -89,6 +89,13 @@ void AllowLowPowerMode(); + /** + * Get the supported features of a profile in this device. + * @param aProfile the profile identifier + * @return the supported features value. + */ + TInt SupportedFeature( TProfiles aProfile ); + protected: /** diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/inc/basrvaccman.h --- a/bluetoothengine/btaudioman/inc/basrvaccman.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/inc/basrvaccman.h Tue Feb 02 00:20:42 2010 +0200 @@ -16,7 +16,7 @@ * Name : basrvaccman.h * Part of : BTEng / Bluetooth Accessory Server * Description : -* Version : %version: 3.1.4.1.2.2.10 % +* Version : %version: 3.1.4.1.2.2.11 % * */ @@ -123,6 +123,14 @@ TInt ConnectionStatus(const TBTDevAddr& aAddr); + /** + * Get the supported features of a profile in a device. + * @param aAddr The address of the device. + * @param aProfile the profile identifier + * @return the supported features value. + */ + TInt SupportedFeature( const TBTDevAddr& aAddr, TProfiles aProfile ) const; + //TCleanupOperation callback function for TCleanupItem static void CleanupLastItemFromClientRequestsArray(TAny* aPtr); @@ -159,7 +167,7 @@ void DestructVariant(); - TInt FindAcc(const TBTDevAddr& aRemote); + TInt FindAcc(const TBTDevAddr& aRemote) const; TInt AudioLinkStatus(); diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/src/BTAccInfo.cpp --- a/bluetoothengine/btaudioman/src/BTAccInfo.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/src/BTAccInfo.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -155,18 +155,26 @@ // ----------------------------------------------------------------------------- -// TAccInfo::SupportedFeatureL +// TAccInfo::SupportedFeature // ----------------------------------------------------------------------------- // -TUint16 TAccInfo::SupportedFeatureL(TInt aPosition) const +TUint16 TAccInfo::SupportedFeature(TProfiles aProfile) const { - if ( aPosition < iSupportedFeatures.Count() ) + TUint16 sf = 0; + switch ( aProfile ) { - return iSupportedFeatures.At(aPosition); + case EHFP: + sf = iSupportedFeatures.At( EHFPIndex ); + break; + case EHSP: + sf = iSupportedFeatures.At( EHSPIndex ); + break; + case EStereo: + sf = iSupportedFeatures.At( EStereoIndex ); + break; + case ERemConTG: + sf = iSupportedFeatures.At( ERemConTGIndex ); + break; } - else - { - User::Leave(KErrOverflow); - } - return 0x00; + return sf; } diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/src/basrvacc.cpp --- a/bluetoothengine/btaudioman/src/basrvacc.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/src/basrvacc.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -261,6 +261,11 @@ } +TInt CBasrvAcc::SupportedFeature( TProfiles aProfile ) + { + return iAccInfo.SupportedFeature( aProfile ); + } + CBasrvAcc::CBasrvAcc(CBasrvAccMan& aAccMan) : iAccMan(aAccMan) { diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/src/basrvaccman.cpp --- a/bluetoothengine/btaudioman/src/basrvaccman.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/src/basrvaccman.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: Implementation of an accessory management. -* Version : %version: 14.1.7 % +* Version : %version: 14.1.8 % * */ @@ -651,6 +651,22 @@ return 0; } +TInt CBasrvAccMan::SupportedFeature( const TBTDevAddr& aAddr, TProfiles aProfile ) const + { + TRACE_INFO_SEG( + { + TBuf<12> buf; + aAddr.GetReadable(buf); + Trace(_L("CBasrvAccMan::SupportedFeature '%S' profile %d"), &buf, aProfile ); + }); + TInt idx = FindAcc(aAddr); + if (idx >= 0) + { + return iAccs[idx]->SupportedFeature(aProfile ); + } + return 0; + } + void CBasrvAccMan::RequestCompletedL(CBasrvActive& aActive) { TRACE_FUNC @@ -779,7 +795,7 @@ } } -TInt CBasrvAccMan::FindAcc(const TBTDevAddr& aRemote) +TInt CBasrvAccMan::FindAcc(const TBTDevAddr& aRemote) const { TInt count = iAccs.Count(); for (TInt i = 0; i < count; i++) diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btaudioman/src/basrvsdpquery.cpp --- a/bluetoothengine/btaudioman/src/basrvsdpquery.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btaudioman/src/basrvsdpquery.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -356,8 +356,11 @@ if (iServiceAttrs[ii].iAttrValue) { TRACE_INFO((_L("HSP Remote volume control is supported."))) - // Server is going to feed 0x10 to supported features for headset profile - aInfo.SetSupportedFeature(0x10, TAccInfo::EHSPIndex); + // Server is going to feed 0x10 to supported features for headset profile. + // The SDP of HSP doesn't really use supported feature attribute. + // We save RVC support in supported feature field for internal future use only. + // This approach is consistent with Accessory framework API. + aInfo.SetSupportedFeature(KHspRemoteVolumeControlSupport, TAccInfo::EHSPIndex); } } else if ( iServiceAttrs[ii].iUUID == KAVRemoteControlTargetUUID ) diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/bthid/loc/btkeyboard.loc --- a/bluetoothengine/bthid/loc/btkeyboard.loc Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/bthid/loc/btkeyboard.loc Tue Feb 02 00:20:42 2010 +0200 @@ -47,6 +47,11 @@ // #define qtn_hid_change "Change" +// d: Status pane title for keyboard settings view +// l: title_pane_t2/opt9 +// +#define qtn_hid_settings "Settings" + // // Settings List Item Names // diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/BWINS/ATCodecU.DEF --- a/bluetoothengine/btmac/BWINS/ATCodecU.DEF Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/BWINS/ATCodecU.DEF Tue Feb 02 00:20:42 2010 +0200 @@ -1,34 +1,34 @@ EXPORTS ??0TATParam@@QAE@ABVTDesC8@@W4TATParamType@@@Z @ 1 NONAME ; TATParam::TATParam(class TDesC8 const &, enum TATParamType) - ??0TATParam@@QAE@H@Z @ 2 NONAME ; TATParam::TATParam(int) - ??0TATParam@@QAE@XZ @ 3 NONAME ; TATParam::TATParam(void) - ??1CATBase@@UAE@XZ @ 4 NONAME ; CATBase::~CATBase(void) - ?Des@CATBase@@QBEABVTDesC8@@XZ @ 5 NONAME ; class TDesC8 const & CATBase::Des(void) const - ?Des@TATParam@@QBEABVTDesC8@@XZ @ 6 NONAME ; class TDesC8 const & TATParam::Des(void) const - ?ExternalizeL@CATBase@@QBEXAAVRWriteStream@@@Z @ 7 NONAME ; void CATBase::ExternalizeL(class RWriteStream &) const - ?ExternalizeL@TATParam@@QBEXAAVRWriteStream@@@Z @ 8 NONAME ; void TATParam::ExternalizeL(class RWriteStream &) const - ?Id@CATBase@@QBE?AW4TATId@@XZ @ 9 NONAME ; enum TATId CATBase::Id(void) const - ?Int@TATParam@@QBEHAAH@Z @ 10 NONAME ; int TATParam::Int(int &) const - ?InternalizeL@CATBase@@QAEXAAVRReadStream@@@Z @ 11 NONAME ; void CATBase::InternalizeL(class RReadStream &) - ?InternalizeL@TATParam@@QAEXAAVRReadStream@@@Z @ 12 NONAME ; void TATParam::InternalizeL(class RReadStream &) - ?NewL@CATCommand@@SAPAV1@ABVTDesC8@@@Z @ 13 NONAME ; class CATCommand * CATCommand::NewL(class TDesC8 const &) - ?NewL@CATCommand@@SAPAV1@XZ @ 14 NONAME ; class CATCommand * CATCommand::NewL(void) - ?NewL@CATResult@@SAPAV1@W4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 15 NONAME ; class CATResult * CATResult::NewL(enum TATId, enum TATType, class RArray const *) - ?NewL@CATResult@@SAPAV1@W4TATId@@W4TATType@@VTATParam@@@Z @ 16 NONAME ; class CATResult * CATResult::NewL(enum TATId, enum TATType, class TATParam) - ?NewL@CATResult@@SAPAV1@XZ @ 17 NONAME ; class CATResult * CATResult::NewL(void) - ?NewLC@CATCommand@@SAPAV1@ABVTDesC8@@@Z @ 18 NONAME ; class CATCommand * CATCommand::NewLC(class TDesC8 const &) - ?NewLC@CATCommand@@SAPAV1@XZ @ 19 NONAME ; class CATCommand * CATCommand::NewLC(void) - ?NewLC@CATResult@@SAPAV1@W4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 20 NONAME ; class CATResult * CATResult::NewLC(enum TATId, enum TATType, class RArray const *) - ?NewLC@CATResult@@SAPAV1@W4TATId@@W4TATType@@VTATParam@@@Z @ 21 NONAME ; class CATResult * CATResult::NewLC(enum TATId, enum TATType, class TATParam) - ?NewLC@CATResult@@SAPAV1@XZ @ 22 NONAME ; class CATResult * CATResult::NewLC(void) - ?ParamNum@CATBase@@QBEHXZ @ 23 NONAME ; int CATBase::ParamNum(void) const - ?Parameter@CATBase@@QBEHHAAVTATParam@@@Z @ 24 NONAME ; int CATBase::Parameter(int, class TATParam &) const - ?Parameters@CATBase@@QBEABV?$RArray@VTATParam@@@@XZ @ 25 NONAME ; class RArray const & CATBase::Parameters(void) const - ?Set@CATCommand@@QAEHABVTDesC8@@@Z @ 26 NONAME ; int CATCommand::Set(class TDesC8 const &) - ?Set@CATResult@@QAEHW4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 27 NONAME ; int CATResult::Set(enum TATId, enum TATType, class RArray const *) - ?SetInt@TATParam@@QAEXH@Z @ 28 NONAME ; void TATParam::SetInt(int) - ?SetValue@TATParam@@QAEHABVTDesC8@@W4TATParamType@@@Z @ 29 NONAME ; int TATParam::SetValue(class TDesC8 const &, enum TATParamType) - ?Type@CATBase@@QBE?AW4TATType@@XZ @ 30 NONAME ; enum TATType CATBase::Type(void) const - ?Type@TATParam@@QBE?AW4TATParamType@@XZ @ 31 NONAME ; enum TATParamType TATParam::Type(void) const - ?ATObjArrayCleanupResetAndDestroyPushL@@YAXAAV?$RPointerArray@VCATResult@@@@@Z @ 32 NONAME ; void ATObjArrayCleanupResetAndDestroyPushL(class RPointerArray &) + ?NewLC@CATResult@@SAPAV1@W4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 2 NONAME ; class CATResult * CATResult::NewLC(enum TATId, enum TATType, class RArray const *) + ?NewL@CATResult@@SAPAV1@W4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 3 NONAME ; class CATResult * CATResult::NewL(enum TATId, enum TATType, class RArray const *) + ?Parameters@CATBase@@QBEABV?$RArray@VTATParam@@@@XZ @ 4 NONAME ; class RArray const & CATBase::Parameters(void) const + ?NewL@CATResult@@SAPAV1@XZ @ 5 NONAME ; class CATResult * CATResult::NewL(void) + ?InternalizeL@TATParam@@QAEXAAVRReadStream@@@Z @ 6 NONAME ; void TATParam::InternalizeL(class RReadStream &) + ?InternalizeL@CATBase@@QAEXAAVRReadStream@@@Z @ 7 NONAME ; void CATBase::InternalizeL(class RReadStream &) + ??1CATBase@@UAE@XZ @ 8 NONAME ; CATBase::~CATBase(void) + ?Type@CATBase@@QBE?AW4TATType@@XZ @ 9 NONAME ; enum TATType CATBase::Type(void) const + ?NewLC@CATCommand@@SAPAV1@ABVTDesC8@@@Z @ 10 NONAME ; class CATCommand * CATCommand::NewLC(class TDesC8 const &) + ?ExternalizeL@TATParam@@QBEXAAVRWriteStream@@@Z @ 11 NONAME ; void TATParam::ExternalizeL(class RWriteStream &) const + ?Set@CATResult@@QAEHW4TATId@@W4TATType@@PBV?$RArray@VTATParam@@@@@Z @ 12 NONAME ; int CATResult::Set(enum TATId, enum TATType, class RArray const *) + ??0TATParam@@QAE@XZ @ 13 NONAME ; TATParam::TATParam(void) + ?NewL@CATCommand@@SAPAV1@ABVTDesC8@@@Z @ 14 NONAME ; class CATCommand * CATCommand::NewL(class TDesC8 const &) + ?Type@TATParam@@QBE?AW4TATParamType@@XZ @ 15 NONAME ; enum TATParamType TATParam::Type(void) const + ?NewLC@CATResult@@SAPAV1@W4TATId@@W4TATType@@ABVTATParam@@@Z @ 16 NONAME ; class CATResult * CATResult::NewLC(enum TATId, enum TATType, class TATParam const &) + ?Des@CATBase@@QBEABVTDesC8@@XZ @ 17 NONAME ; class TDesC8 const & CATBase::Des(void) const + ?Id@CATBase@@QBE?AW4TATId@@XZ @ 18 NONAME ; enum TATId CATBase::Id(void) const + ?Parameter@CATBase@@QBEHHAAVTATParam@@@Z @ 19 NONAME ; int CATBase::Parameter(int, class TATParam &) const + ?Des@TATParam@@QBEABVTDesC8@@XZ @ 20 NONAME ; class TDesC8 const & TATParam::Des(void) const + ?NewL@CATResult@@SAPAV1@W4TATId@@W4TATType@@ABVTATParam@@@Z @ 21 NONAME ; class CATResult * CATResult::NewL(enum TATId, enum TATType, class TATParam const &) + ?SetValue@TATParam@@QAEHABVTDesC8@@W4TATParamType@@@Z @ 22 NONAME ; int TATParam::SetValue(class TDesC8 const &, enum TATParamType) + ??0TATParam@@QAE@H@Z @ 23 NONAME ; TATParam::TATParam(int) + ?Set@CATCommand@@QAEHABVTDesC8@@@Z @ 24 NONAME ; int CATCommand::Set(class TDesC8 const &) + ?SetInt@TATParam@@QAEXH@Z @ 25 NONAME ; void TATParam::SetInt(int) + ?Int@TATParam@@QBEHAAH@Z @ 26 NONAME ; int TATParam::Int(int &) const + ?ParamNum@CATBase@@QBEHXZ @ 27 NONAME ; int CATBase::ParamNum(void) const + ?NewLC@CATCommand@@SAPAV1@XZ @ 28 NONAME ; class CATCommand * CATCommand::NewLC(void) + ?ExternalizeL@CATBase@@QBEXAAVRWriteStream@@@Z @ 29 NONAME ; void CATBase::ExternalizeL(class RWriteStream &) const + ?ATObjArrayCleanupResetAndDestroyPushL@@YAXAAV?$RPointerArray@VCATResult@@@@@Z @ 30 NONAME ; void ATObjArrayCleanupResetAndDestroyPushL(class RPointerArray &) + ?NewLC@CATResult@@SAPAV1@XZ @ 31 NONAME ; class CATResult * CATResult::NewLC(void) + ?NewL@CATCommand@@SAPAV1@XZ @ 32 NONAME ; class CATCommand * CATCommand::NewL(void) diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/BWINS/BTMonoCmdHandlerU.DEF --- a/bluetoothengine/btmac/BWINS/BTMonoCmdHandlerU.DEF Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/BWINS/BTMonoCmdHandlerU.DEF Tue Feb 02 00:20:42 2010 +0200 @@ -6,4 +6,5 @@ ?ActivateRemoteVolumeControl@CBtmcHandlerApi@@QAEXXZ @ 5 NONAME ; void CBtmcHandlerApi::ActivateRemoteVolumeControl(void) ?DeActivateRemoteVolumeControl@CBtmcHandlerApi@@QAEXXZ @ 6 NONAME ; void CBtmcHandlerApi::DeActivateRemoteVolumeControl(void) ?GetRemoteSupportedFeature@CBtmcHandlerApi@@QAEHXZ @ 7 NONAME ; int CBtmcHandlerApi::GetRemoteSupportedFeature(void) + ?SetHspRvcSupported@CBtmcHandlerApi@@QAEXH@Z @ 8 NONAME ; void CBtmcHandlerApi::SetHspRvcSupported(int) diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/common/atcodec.h --- a/bluetoothengine/btmac/common/atcodec.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/common/atcodec.h Tue Feb 02 00:20:42 2010 +0200 @@ -300,9 +300,9 @@ IMPORT_C static CATResult* NewLC(TATId aId, TATType aType = EATErrorResult, const RATParamArray* aParams = NULL); - IMPORT_C static CATResult* NewL(TATId aId, TATType aType, const TATParam aParam); + IMPORT_C static CATResult* NewL(TATId aId, TATType aType, const TATParam& aParam); - IMPORT_C static CATResult* NewLC(TATId aId, TATType aType, const TATParam aParam); + IMPORT_C static CATResult* NewLC(TATId aId, TATType aType, const TATParam& aParam); /** * diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/common/btmchandlerapi.h --- a/bluetoothengine/btmac/common/btmchandlerapi.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/common/btmchandlerapi.h Tue Feb 02 00:20:42 2010 +0200 @@ -47,6 +47,12 @@ IMPORT_C void DeActivateRemoteVolumeControl(); IMPORT_C TInt GetRemoteSupportedFeature(); + + /** + * Set the support status of remote volume control of HSP in the remote device. + * @param aSupported ETrue if remote volume control is supported by HS unit. + */ + IMPORT_C void SetHspRvcSupported(TBool aSupported); private: CBtmcHandlerApi(); diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/eabi/ATCodecu.DEF --- a/bluetoothengine/btmac/eabi/ATCodecu.DEF Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/eabi/ATCodecu.DEF Tue Feb 02 00:20:42 2010 +0200 @@ -1,39 +1,39 @@ EXPORTS - _ZN10CATCommand3SetERK6TDesC8 @ 1 NONAME - _ZN10CATCommand4NewLERK6TDesC8 @ 2 NONAME - _ZN10CATCommand4NewLEv @ 3 NONAME - _ZN10CATCommand5NewLCERK6TDesC8 @ 4 NONAME - _ZN10CATCommand5NewLCEv @ 5 NONAME - _ZN7CATBase12InternalizeLER11RReadStream @ 6 NONAME - _ZN7CATBaseD0Ev @ 7 NONAME - _ZN7CATBaseD1Ev @ 8 NONAME - _ZN7CATBaseD2Ev @ 9 NONAME - _ZN8TATParam12InternalizeLER11RReadStream @ 10 NONAME - _ZN8TATParam6SetIntEi @ 11 NONAME - _ZN8TATParam8SetValueERK6TDesC812TATParamType @ 12 NONAME - _ZN8TATParamC1ERK6TDesC812TATParamType @ 13 NONAME - _ZN8TATParamC1Ei @ 14 NONAME - _ZN8TATParamC1Ev @ 15 NONAME - _ZN8TATParamC2ERK6TDesC812TATParamType @ 16 NONAME - _ZN8TATParamC2Ei @ 17 NONAME - _ZN8TATParamC2Ev @ 18 NONAME - _ZN9CATResult3SetE5TATId7TATTypePK6RArrayI8TATParamE @ 19 NONAME - _ZN9CATResult4NewLE5TATId7TATType8TATParam @ 20 NONAME + _Z37ATObjArrayCleanupResetAndDestroyPushLR13RPointerArrayI9CATResultE @ 1 NONAME + _ZN10CATCommand3SetERK6TDesC8 @ 2 NONAME + _ZN10CATCommand4NewLERK6TDesC8 @ 3 NONAME + _ZN10CATCommand4NewLEv @ 4 NONAME + _ZN10CATCommand5NewLCERK6TDesC8 @ 5 NONAME + _ZN10CATCommand5NewLCEv @ 6 NONAME + _ZN7CATBase12InternalizeLER11RReadStream @ 7 NONAME + _ZN7CATBaseD0Ev @ 8 NONAME + _ZN7CATBaseD1Ev @ 9 NONAME + _ZN7CATBaseD2Ev @ 10 NONAME + _ZN8TATParam12InternalizeLER11RReadStream @ 11 NONAME + _ZN8TATParam6SetIntEi @ 12 NONAME + _ZN8TATParam8SetValueERK6TDesC812TATParamType @ 13 NONAME + _ZN8TATParamC1ERK6TDesC812TATParamType @ 14 NONAME + _ZN8TATParamC1Ei @ 15 NONAME + _ZN8TATParamC1Ev @ 16 NONAME + _ZN8TATParamC2ERK6TDesC812TATParamType @ 17 NONAME + _ZN8TATParamC2Ei @ 18 NONAME + _ZN8TATParamC2Ev @ 19 NONAME + _ZN9CATResult3SetE5TATId7TATTypePK6RArrayI8TATParamE @ 20 NONAME _ZN9CATResult4NewLE5TATId7TATTypePK6RArrayI8TATParamE @ 21 NONAME - _ZN9CATResult4NewLEv @ 22 NONAME - _ZN9CATResult5NewLCE5TATId7TATType8TATParam @ 23 NONAME + _ZN9CATResult4NewLE5TATId7TATTypeRK8TATParam @ 22 NONAME + _ZN9CATResult4NewLEv @ 23 NONAME _ZN9CATResult5NewLCE5TATId7TATTypePK6RArrayI8TATParamE @ 24 NONAME - _ZN9CATResult5NewLCEv @ 25 NONAME - _ZNK7CATBase10ParametersEv @ 26 NONAME - _ZNK7CATBase12ExternalizeLER12RWriteStream @ 27 NONAME - _ZNK7CATBase2IdEv @ 28 NONAME - _ZNK7CATBase3DesEv @ 29 NONAME - _ZNK7CATBase4TypeEv @ 30 NONAME - _ZNK7CATBase8ParamNumEv @ 31 NONAME - _ZNK7CATBase9ParameterEiR8TATParam @ 32 NONAME - _ZNK8TATParam12ExternalizeLER12RWriteStream @ 33 NONAME - _ZNK8TATParam3DesEv @ 34 NONAME - _ZNK8TATParam3IntERi @ 35 NONAME - _ZNK8TATParam4TypeEv @ 36 NONAME - _Z37ATObjArrayCleanupResetAndDestroyPushLR13RPointerArrayI9CATResultE @ 37 NONAME + _ZN9CATResult5NewLCE5TATId7TATTypeRK8TATParam @ 25 NONAME + _ZN9CATResult5NewLCEv @ 26 NONAME + _ZNK7CATBase10ParametersEv @ 27 NONAME + _ZNK7CATBase12ExternalizeLER12RWriteStream @ 28 NONAME + _ZNK7CATBase2IdEv @ 29 NONAME + _ZNK7CATBase3DesEv @ 30 NONAME + _ZNK7CATBase4TypeEv @ 31 NONAME + _ZNK7CATBase8ParamNumEv @ 32 NONAME + _ZNK7CATBase9ParameterEiR8TATParam @ 33 NONAME + _ZNK8TATParam12ExternalizeLER12RWriteStream @ 34 NONAME + _ZNK8TATParam3DesEv @ 35 NONAME + _ZNK8TATParam3IntERi @ 36 NONAME + _ZNK8TATParam4TypeEv @ 37 NONAME diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/eabi/BTMonoCmdHandleru.DEF --- a/bluetoothengine/btmac/eabi/BTMonoCmdHandleru.DEF Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/eabi/BTMonoCmdHandleru.DEF Tue Feb 02 00:20:42 2010 +0200 @@ -8,4 +8,5 @@ _ZN15CBtmcHandlerApi27ActivateRemoteVolumeControlEv @ 7 NONAME _ZN15CBtmcHandlerApi29DeActivateRemoteVolumeControlEv @ 8 NONAME _ZN15CBtmcHandlerApi25GetRemoteSupportedFeatureEv @ 9 NONAME + _ZN15CBtmcHandlerApi18SetHspRvcSupportedEi @ 10 NONAME diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmac/btmman.h --- a/bluetoothengine/btmac/inc/btmac/btmman.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmac/btmman.h Tue Feb 02 00:20:42 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: the entry of this plugin. -* Version : %version: 12.1.6 % +* Version : %version: 12.1.7 % * */ @@ -148,6 +148,12 @@ void LoadCmdHandlerL(TBtmcProfileId aProfile, const TBTDevAddr& aAddr, TBool aAccessoryInitiated); + /** + * Set the support status of remote volume control of HSP in the remote device. + * @param aSupported ETrue if remote volume control is supported by HS unit. + */ + void SetCmdHandlerHspRvcSupported( TBool aSupported ); + void DeleteCmdHandler(); void NewProtocolDataL(const TDesC8& aData); @@ -156,6 +162,12 @@ TBool IsEdrSupported() const; + /** + * Update the cmdhandler the support of remove volume control. + * @param aAddr the address of the remote device. + */ + void SetCmdHandlerRvcSupport( const TBTDevAddr& aAddr ); + private: // From base class CBTAccPlugin diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmonocmdhandler/HFPAtUrcHandler.h --- a/bluetoothengine/btmac/inc/btmonocmdhandler/HFPAtUrcHandler.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmonocmdhandler/HFPAtUrcHandler.h Tue Feb 02 00:20:42 2010 +0200 @@ -20,7 +20,6 @@ #define C_CHFPATURCHANDLER_H #include -#include "HfpAtCmdHandler.h" #include "HFPAtEcomListen.h" /** diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmonocmdhandler/btmcdummy.h --- a/bluetoothengine/btmac/inc/btmonocmdhandler/btmcdummy.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmonocmdhandler/btmcdummy.h Tue Feb 02 00:20:42 2010 +0200 @@ -20,12 +20,12 @@ #include -class MBtmcDummy : public MCall +NONSHARABLE_CLASS(TBtmcDummyCall) : public MCall { public: - MBtmcDummy() {}; - ~MBtmcDummy() {}; + TBtmcDummyCall() {}; + ~TBtmcDummyCall() {}; TInt CallIndex() const { return 0; }; diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmonocmdhandler/btmcmobileline.h --- a/bluetoothengine/btmac/inc/btmonocmdhandler/btmcmobileline.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmonocmdhandler/btmcmobileline.h Tue Feb 02 00:20:42 2010 +0200 @@ -28,6 +28,8 @@ #include "btmccallactive.h" #include "btmcline.h" +#include "btmcdummy.h" + // FORWARD DECLARATIONS class CBtmcCallStatus; @@ -112,12 +114,14 @@ RMobilePhone& iPhone; // unowned RMobileLine iLine; // owned - + RPointerArray iCallActives; CBtmcActive* iLineIncomingActive; CBtmcActive* iLineOutgoingActive; + TBtmcDummyCall iDummyCall; // used in implemtation of CallInformationL() + TBuf iLineName; // passed to RMobileLine::NotifyCallAdded diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmonocmdhandler/btmcprotocol.h --- a/bluetoothengine/btmac/inc/btmonocmdhandler/btmcprotocol.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmonocmdhandler/btmcprotocol.h Tue Feb 02 00:20:42 2010 +0200 @@ -21,7 +21,6 @@ #include #include -#include #include "btmcactive.h" #include "btmcprofileid.h" #include "btmcprotdatabuf.h" @@ -46,8 +45,7 @@ const TUint KBTHSRemoteAudioVolumeControl = 0x0302; NONSHARABLE_CLASS(CBtmcProtocol) : public CBase, - public MBtmcActiveObserver, - public MBTEngSdpResultReceiver, + public MBtmcActiveObserver, public MATExtObserver { public: @@ -90,20 +88,13 @@ */ TBool ActiveChldHandling() const; - private: - // from MBTEngSdpResultReceiver - void ServiceSearchComplete( const RSdpRecHandleArray& /*aResult*/, - TUint /*aTotalRecordsCount*/, TInt /*aErr*/ ) {} - - void AttributeSearchComplete( TSdpServRecordHandle /*aHandle*/, - const RSdpResultArray& /*aAttr*/, TInt /*aErr*/ ) {} - - void ServiceAttributeSearchComplete( TSdpServRecordHandle /*aHandle*/, - const RSdpResultArray& /*aAttr*/, - TInt /*aErr*/ ); - - void DeviceSearchComplete( CBTDevice* /*aDevice*/, TInt /*aErr*/ ) {} - + /** + * Set the support status of remote volume control of HSP in the remote device. + * @param aSupported ETrue if remote volume control is supported by HS unit. + */ + void SetHspRvcSupported(TBool aSupported); + + private: // From MBtmcActiveObserver @@ -174,7 +165,6 @@ CDesC8ArrayFlat* iOutgoPacketQueue; // owned TInt iCredit; // How many commands are allowed to acc TBool iVolumeSyncFromAccessory; - CBTEngDiscovery* iBteng; // for volume query TBool iAccessoryInitiated; // who initiated the connection RMobilePhone::TMobilePhoneIdentityV1 iIdentity; // holds IMEI etc RMobilePhone::TMobilePhoneSubscriberId iId; // holds id diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/inc/btmonocmdhandler/btmcvoipline.h --- a/bluetoothengine/btmac/inc/btmonocmdhandler/btmcvoipline.h Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/inc/btmonocmdhandler/btmcvoipline.h Tue Feb 02 00:20:42 2010 +0200 @@ -18,7 +18,6 @@ #ifndef BTMCVOIPLINE_H_ #define BTMCVOIPLINE_H_ -#include "btmccallstatus.h" #include #include diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/ATCodec/atccommand.cpp --- a/bluetoothengine/btmac/src/ATCodec/atccommand.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/ATCodec/atccommand.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -423,7 +423,7 @@ // CATResult::NewL // ----------------------------------------------------------------------------- // -EXPORT_C CATResult* CATResult::NewL(TATId aId, TATType aType, const TATParam aParam) +EXPORT_C CATResult* CATResult::NewL(TATId aId, TATType aType, const TATParam& aParam) { CATResult* self = CATResult::NewLC(aId, aType, aParam); CleanupStack::Pop(self); @@ -434,7 +434,7 @@ // CATResult::NewLC // ----------------------------------------------------------------------------- // -EXPORT_C CATResult* CATResult::NewLC(TATId aId, TATType aType, const TATParam aParam) +EXPORT_C CATResult* CATResult::NewLC(TATId aId, TATType aType, const TATParam& aParam) { CATResult* self = new (ELeave) CATResult; CleanupStack::PushL(self); diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/BTMonoCmdHandler/btmchandlerapi.cpp --- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmchandlerapi.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmchandlerapi.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -64,6 +64,11 @@ return iHandler->GetRemoteSupportedFeature(); } +EXPORT_C void CBtmcHandlerApi::SetHspRvcSupported(TBool aSupported) + { + return iHandler->SetHspRvcSupported(aSupported); + } + CBtmcHandlerApi::CBtmcHandlerApi() { } diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/BTMonoCmdHandler/btmcmobileline.cpp --- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcmobileline.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcmobileline.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -22,7 +22,6 @@ #include "btmc_defs.h" #include "debug.h" #include "btmccallstatus.h" -#include "btmcdummy.h" const TInt KMobileLineActiveService = 30; const TInt KMobileCallActiveService = 31; @@ -68,9 +67,7 @@ // ========================================================== const MCall& CBtmcMobileLine::CallInformationL() { - MBtmcDummy dummy = MBtmcDummy(); - const MCall& fakeCall (dummy); - return fakeCall; + return iDummyCall; } // ========================================================== diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp --- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -18,8 +18,7 @@ #include "atcodec.h" #include // for etel -#include -#include +#include #include #include "btmcprotocol.h" #include "btmccallinghandler.h" @@ -46,7 +45,7 @@ const TInt KBerUnknown = 99; const TInt KServiceSlcTimer = 1; -const TInt KServiceSdpQuery = 2; + const TInt KServiceGetSubscriber = 3; const TInt KServiceGetOperator = 4; const TInt KServiceCmdHandling = 5; @@ -85,7 +84,6 @@ delete iOperator; delete iEtelQuery; - delete iBteng; iPhone.Close(); iServer.UnloadPhoneModule(KMmTsyModuleName); @@ -215,6 +213,39 @@ return iCallingHandler->ActiveChldHandling(); } +void CBtmcProtocol::SetHspRvcSupported(TBool aSupported) + { + TRACE_FUNC + // Only update the supported feature field if this + // is for HSP controlling to avoid denial of + // HFP service + if ( iProtocolStatus->iProfile == EBtmcHSP ) + { + if ( aSupported ) + { + // volume control must be enabled now: + if ( !iPhoneStatus) + { + TRAP_IGNORE( iPhoneStatus = + CBtmcPhoneStatus::NewL(*this, iPhone, iProtocolStatus->iProfile) ); + } + if ( iPhoneStatus ) + { + // We just do the best effort. If enabling volume control fails, + // other functionalities on the HSP will still work: + TRAP_IGNORE( iPhoneStatus->SetVolumeControlFeatureL(ETrue) ); + } + } + else + { + // When this serves the controlling of a HSP connection, iPhoneStatus is only + // used for volume control, deleting it will disable volume control: + delete iPhoneStatus; + iPhoneStatus = NULL; + } + } + } + void CBtmcProtocol::RequestCompletedL(CBtmcActive& aActive, TInt aErr) { TRACE_FUNC_ENTRY @@ -229,9 +260,6 @@ } break; } - case KServiceSdpQuery: - { - } case KServiceGetSubscriber: { delete iNumber; @@ -291,10 +319,6 @@ { iTimer.Cancel(); } - else if (aServiceId == KServiceSdpQuery) - { - iBteng->CancelRemoteSdpQuery(); - } TRACE_FUNC_EXIT } @@ -323,8 +347,8 @@ iEtelQuery = CBtmcActive::NewL(*this, CActive::EPriorityStandard, KQueryIMEI); - iPhone.GetPhoneId(iEtelQuery->iStatus, iIdentity); - iEtelQuery->GoActive(); + iPhone.GetPhoneId(iEtelQuery->iStatus, iIdentity); + iEtelQuery->GoActive(); switch (aProfile) { @@ -342,9 +366,8 @@ { LEAVE(KErrBadDescriptor); } + // HSP doesn't have an SLC protocol except the RFCOMM connection itself: iProtocolStatus->iSlc = ETrue; - iBteng = CBTEngDiscovery::NewL(this); - iBteng->RemoteSdpQuery(TBTDevAddr(aBTDevAddr), TUUID(EBTProfileHSP), KBTHSRemoteAudioVolumeControl); if ( iAccessoryInitiated && ( iProtocolStatus->iCallBits & KCallConnectedBit ) ) { TRACE_INFO((_L("Incoming HSP connected, start CKPD trapper"))); @@ -608,10 +631,11 @@ void CBtmcProtocol::HandleReadCommandL(const CATCommand& aCmd) { TRACE_FUNC + RATResultPtrArray resarr; + ATObjArrayCleanupResetAndDestroyPushL(resarr); CATResult* code = NULL; - RArray params; + RATParamArray params; CleanupClosePushL(params); - TBool response = EFalse; switch (aCmd.Id()) { case EATCIND: @@ -621,12 +645,12 @@ { LEAVE(KErrNotSupported); } - + RMobilePhone::TMobilePhoneRegistrationStatus net = - iPhoneStatus->NetworkStatus(); - + iPhoneStatus->NetworkStatus(); + if (net == RMobilePhone::ERegisteredOnHomeNetwork || - net == RMobilePhone::ERegisteredRoaming) + net == RMobilePhone::ERegisteredRoaming) { LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoATNetworkAvailable))) } @@ -634,10 +658,10 @@ { LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoATNetworkUnavailable))) } - + // call status if ((iProtocolStatus->iCallBits & KCallConnectedBit) || - (iProtocolStatus->iCallBits & KCallHoldBit)) + (iProtocolStatus->iCallBits & KCallHoldBit)) { LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoATCallActive))) } @@ -645,7 +669,7 @@ { LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoATNoCall))) } - + // Call setup status TInt callSetupInd = EBTMonoATNoCallSetup; @@ -664,7 +688,7 @@ LEAVE_IF_ERROR(params.Append(TATParam(callSetupInd))) // call_setup == callsetup LEAVE_IF_ERROR(params.Append(TATParam(callSetupInd))) - + // Call held status TInt callHeldInd = EBTMonoATNoCallHeld; if( (iProtocolStatus->iCallBits & KCallHoldBit) && (iProtocolStatus->iCallBits & KCallConnectedBit) ) @@ -679,19 +703,18 @@ // signal status LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetSignalStrength()))) // roaming status - if(net == RMobilePhone::ERegisteredRoaming) - { - LEAVE_IF_ERROR(params.Append(TATParam(1))) - } - else - { - LEAVE_IF_ERROR(params.Append(TATParam(0))) - } + if(net == RMobilePhone::ERegisteredRoaming) + { + LEAVE_IF_ERROR(params.Append(TATParam(1))) + } + else + { + LEAVE_IF_ERROR(params.Append(TATParam(0))) + } // battery charge LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetBatteryCharge()))) code = CATResult::NewL(EATCIND, EATReadResult, ¶ms); - response = ETrue; break; } case EATCLIP: @@ -699,147 +722,137 @@ LEAVE_IF_ERROR(params.Append(TATParam(iProtocolStatus->iCallerIdNotif))) LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoATCallerIdNetworkServiceUnknown))) code = CATResult::NewL(EATCLIP, EATReadResult, ¶ms); - response = ETrue; break; } case EATCOPS: { iOperator = CBtmcOperator::NewL(*this, *this, CActive::EPriorityStandard, KServiceGetOperator); iOperator->GoActive(); - break; + break; } case EATCREG: - { + { if(!iPhoneStatus) { LEAVE(KErrNotSupported); } - + RMobilePhone::TMobilePhoneRegistrationStatus net = - iPhoneStatus->NetworkStatus(); - response = ETrue; - switch(net) - { - case RMobilePhone::ERegistrationUnknown: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceUnknown))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - case RMobilePhone::ENotRegisteredEmergencyOnly: - case RMobilePhone::ENotRegisteredNoService: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceNotRegistered))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - case RMobilePhone::ENotRegisteredSearching: - case RMobilePhone::ERegisteredBusy: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceNotRegisteredSearching))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - case RMobilePhone::ERegisteredOnHomeNetwork: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceHomeNetwork))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - case RMobilePhone::ERegistrationDenied: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceRegistrationDenied))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - case RMobilePhone::ERegisteredRoaming: - { - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) - LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceRegisteredRoaming))) - code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); - break; - } - default: - TRACE_INFO(_L("Error: default in CREG")); - break; - }; - break; - } - case EATCSQ: - { - TRACE_INFO(_L("Requesting Signal strength")); - response = ETrue; - LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetRssiStrength()))) - LEAVE_IF_ERROR(params.Append(TATParam(KBerUnknown))) - code = CATResult::NewL(EATCSQ, EATReadResult, ¶ms); - TRACE_INFO(_L("done")); - break; - } - - case EATCGSN: - { - response = ETrue; - TBuf8 buf; - buf.Copy(iIdentity.iSerialNumber); - LEAVE_IF_ERROR(params.Append(TATParam(buf))) - code = CATResult::NewL(EATCGSN, EATReadResult, ¶ms); - break; - } - case EATCGMI: - { - response = ETrue; - TBuf8 buf; - buf.Copy(iIdentity.iManufacturer); - LEAVE_IF_ERROR(params.Append(TATParam(buf))) - code = CATResult::NewL(EATCGMI, EATReadResult, ¶ms); - break; - } - case EATCGMM: - { - response = ETrue; - TBuf8 buf; - buf.Copy(iIdentity.iModel); - LEAVE_IF_ERROR(params.Append(TATParam(buf))) - code = CATResult::NewL(EATCGMM, EATReadResult, ¶ms); - break; - } - case EATCGMR: - { - response = ETrue; - TBuf8 buf; - buf.Copy(iIdentity.iRevision); - LEAVE_IF_ERROR(params.Append(TATParam(buf))) - code = CATResult::NewL(EATCGMR, EATReadResult, ¶ms); - break; - } - case EATCIMI: - { - iEtelQuery->SetServiceId(KQueryIMSI); - iPhone.GetSubscriberId(iEtelQuery->iStatus, iId); - iEtelQuery->GoActive(); - break; - } - case EATCOLP: - { - response = ETrue; - LEAVE_IF_ERROR(params.Append(TATParam(TInt(iProtocolStatus->iOutgoingCallNotif)))) - code = CATResult::NewL(EATCOLP, EATReadResult, ¶ms); - break; - } - default: - LEAVE(KErrNotSupported); - } + iPhoneStatus->NetworkStatus(); + switch(net) + { + case RMobilePhone::ERegistrationUnknown: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceUnknown))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + case RMobilePhone::ENotRegisteredEmergencyOnly: + case RMobilePhone::ENotRegisteredNoService: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceNotRegistered))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + case RMobilePhone::ENotRegisteredSearching: + case RMobilePhone::ERegisteredBusy: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceNotRegisteredSearching))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + case RMobilePhone::ERegisteredOnHomeNetwork: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceHomeNetwork))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + case RMobilePhone::ERegistrationDenied: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceRegistrationDenied))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + case RMobilePhone::ERegisteredRoaming: + { + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregEnableUnsolicited))) + LEAVE_IF_ERROR(params.Append(TATParam(EBTMonoCregNetworkServiceRegisteredRoaming))) + code = CATResult::NewL(EATCREG, EATReadResult, ¶ms); + break; + } + default: + TRACE_INFO(_L("Error: default in CREG")); + break; + }; + break; + } + case EATCSQ: + { + TRACE_INFO(_L("Requesting Signal strength")); + LEAVE_IF_ERROR(params.Append(TATParam(iPhoneStatus->GetRssiStrength()))) + LEAVE_IF_ERROR(params.Append(TATParam(KBerUnknown))) + code = CATResult::NewL(EATCSQ, EATReadResult, ¶ms); + TRACE_INFO(_L("done")); + break; + } + + case EATCGSN: + { + TBuf8 buf; + buf.Copy(iIdentity.iSerialNumber); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGSN, EATReadResult, ¶ms); + break; + } + case EATCGMI: + { + TBuf8 buf; + buf.Copy(iIdentity.iManufacturer); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMI, EATReadResult, ¶ms); + break; + } + case EATCGMM: + { + TBuf8 buf; + buf.Copy(iIdentity.iModel); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMM, EATReadResult, ¶ms); + break; + } + case EATCGMR: + { + TBuf8 buf; + buf.Copy(iIdentity.iRevision); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMR, EATReadResult, ¶ms); + break; + } + case EATCIMI: + { + iEtelQuery->SetServiceId(KQueryIMSI); + iPhone.GetSubscriberId(iEtelQuery->iStatus, iId); + iEtelQuery->GoActive(); + break; + } + case EATCOLP: + { + LEAVE_IF_ERROR(params.Append(TATParam(TInt(iProtocolStatus->iOutgoingCallNotif)))) + code = CATResult::NewL(EATCOLP, EATReadResult, ¶ms); + break; + } + default: + LEAVE(KErrNotSupported); + } CleanupStack::PopAndDestroy(¶ms); - if (response) - { - RATResultPtrArray resarr; + if (code) + { CleanupStack::PushL(code); - ATObjArrayCleanupResetAndDestroyPushL(resarr); resarr.AppendL(code); CleanupStack::Pop(code); CATResult* ok = CATResult::NewL(EATOK); @@ -847,9 +860,9 @@ resarr.AppendL(ok); CleanupStack::Pop(ok); SendResponseL(resarr); - CleanupStack::PopAndDestroy(&resarr); CmdHandlingCompletedL(); } + CleanupStack::PopAndDestroy(&resarr); } // ----------------------------------------------------------------------------- @@ -1070,7 +1083,9 @@ case EATCGSN: { CATResult* code = NULL; - RArray params; + RATResultPtrArray resarr; + ATObjArrayCleanupResetAndDestroyPushL(resarr); + RATParamArray params; CleanupClosePushL(params); TBuf8 buf; buf.Copy(iIdentity.iSerialNumber); @@ -1078,8 +1093,6 @@ code = CATResult::NewL(EATCGSN, EATActionResult, ¶ms); CleanupStack::PopAndDestroy(¶ms); CleanupStack::PushL(code); - RATResultPtrArray resarr; - ATObjArrayCleanupResetAndDestroyPushL(resarr); resarr.AppendL(code); CleanupStack::Pop(code); CATResult* ok = CATResult::NewL(EATOK); @@ -1162,38 +1175,6 @@ return EFalse; } -// ----------------------------------------------------------------------------- -// CBtmcProtocol::ServiceAttributeSearchComplete -// ----------------------------------------------------------------------------- -// -void CBtmcProtocol::ServiceAttributeSearchComplete( TSdpServRecordHandle /*aHandle*/, - const RSdpResultArray& aAttr, - TInt aErr ) - { - TRACE_FUNC - if((aErr == KErrNone || aErr == KErrEof) && aAttr.Count() && aAttr[0].iAttrValue.iValNumeric) - { - TRACE_INFO((_L("Remote volume control supported"))) - TInt err = KErrNone; - if (!iPhoneStatus) - { - TRAP(err, iPhoneStatus = CBtmcPhoneStatus::NewL(*this, iPhone, iProtocolStatus->iProfile)); - } - - if (err == KErrNone) - { - TRAP_IGNORE(iPhoneStatus->SetVolumeControlFeatureL(ETrue)); - iPhoneStatus->ActivateRemoteVolumeControl(); - } - } - - if(aErr) - { - delete iBteng; - iBteng = NULL; - } - } - void CBtmcProtocol::SetIndicatorL(TInt aIndicator, TInt aValue) { TInt indBit( 0 ); diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/btmac/btmman.cpp --- a/bluetoothengine/btmac/src/btmac/btmman.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/btmac/btmman.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -12,7 +12,7 @@ * Contributors: * * Description: CBtmMan definition -* Version : %version: 15.1.7 % +* Version : %version: 15.1.8 % * */ @@ -232,7 +232,17 @@ iCmdHandler = CBtmcHandlerApi::NewL(*this, aProfile, aAddr.Des(), aAccessoryInitiated); } } - + + +void CBtmMan::SetCmdHandlerHspRvcSupported( TBool aSupported ) + { + if (iCmdHandler) + { + iCmdHandler->SetHspRvcSupported( aSupported ); + } + } + + void CBtmMan::DeleteCmdHandler() { delete iCmdHandler; @@ -262,7 +272,16 @@ { return iEdr; } - + +void CBtmMan::SetCmdHandlerRvcSupport(const TBTDevAddr& aAddr) + { + TRACE_FUNC + // Get volume control support status of the HSP from observer + TInt sf = Observer().SupportedFeature( aAddr, EHSP ); + TRACE_INFO((_L(" HSP support feature: 0x%x"), sf)); + iCmdHandler->SetHspRvcSupported( sf & KHspRemoteVolumeControlSupport ); + } + void CBtmMan::ConnectToAccessory(const TBTDevAddr& aAddr, TRequestStatus& aStatus) { TRACE_FUNC_ENTRY diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/btmac/btmsctrl.cpp --- a/bluetoothengine/btmac/src/btmac/btmsctrl.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/btmac/btmsctrl.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -117,6 +117,14 @@ void CBtmsCtrl::AccInUse() { TRACE_FUNC + if ( iRfcomm->Service() == EBTProfileHSP ) + { + // volume control support status of the HSP in remote device + // is only available in the owner of this component. + // Ask parent to set the support in cmdhandler. + Parent().SetCmdHandlerRvcSupport( iRfcomm->Remote() ); + } + TInt err; TRAP( err, if (!iSco) diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btmac/src/btmac/btmsreconnect.cpp --- a/bluetoothengine/btmac/src/btmac/btmsreconnect.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btmac/src/btmac/btmsreconnect.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -163,6 +163,10 @@ else { Parent().LoadCmdHandlerL(EBtmcHSP, iRfcomm->Remote(), iRfcomm->AccessoryInitiatedConnection()); + // volume control support status of the HSP in remote device + // is only available in the owner of this component. + // Ask parent to set the support in cmdhandler. + Parent().SetCmdHandlerRvcSupport( iRfcomm->Remote() ); Parent().ChangeStateL(CBtmsOpenAudio::NewL(Parent(), SwapStateRequest(), SwapStateRfcommSock(), NULL)); } } diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btnotif/data/BTNotif.rss --- a/bluetoothengine/btnotif/data/BTNotif.rss Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btnotif/data/BTNotif.rss Tue Feb 02 00:20:42 2010 +0200 @@ -190,19 +190,10 @@ // RESOURCE DIALOG r_bt_enter_passkey_query { - flags = EGeneralQueryFlags; + flags = EGeneralQueryFlags | EEikDialogFlagVirtualInput ; buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK; items = - { - DLG_LINE - { - type = EAknCtPopupHeadingPane; - id = EAknMessageQueryHeaderId; - control = AVKON_HEADING - { - label = qtn_bt_passkey_heading; - }; - }, + { DLG_LINE { type = EAknCtQuery; diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btsac/src/btsaController.cpp --- a/bluetoothengine/btsac/src/btsaController.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btsac/src/btsaController.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -111,9 +111,8 @@ iGavdp = CBTSACGavdp::NewL(state); iLocalSEPs = CBTSACSEPManager::NewL(TBTDevAddr()); iGavdpErrorActive = CBtsacActive::NewL(*this, CActive::EPriorityStandard, KRequestIdGavdpError); - ChangeStateL(state); - CleanupStack::Pop(state); - + CleanupStack::Pop(state); + ChangeStateL(state); ResetRemoteCache(); TInt err = RProperty::Define( KBTAudioRemCon, @@ -128,31 +127,29 @@ // CBTSAController::ChangeStateL // ----------------------------------------------------------------------------- // + void CBTSAController::ChangeStateL(CBtsacState* aState) - { - TRACE_FUNC_ENTRY - TRACE_ASSERT(!!aState, EBTPanicNullPointer); - if(iState) - { - if(aState->GetStateIndex() == iState->GetStateIndex()) - { - // We already are in desired state, delete the state which came in and return - TRACE_INFO((_L("CBTSAController::ChangeStateL(), already in desired state."))) - delete aState; - return; - } - } - CBtsacState *CurrentState = iState; - iState = aState; - TInt err = KErrNone; - TRAP(err, iState->EnterL()); - if (err) - { - ChangeStateL(iState->ErrorOnEntryL(err)); - } - delete CurrentState; - TRACE_FUNC_EXIT - } + { + TRACE_FUNC_ENTRY + TRACE_ASSERT(aState != NULL, EBTPanicNullPointer); + if(iState && aState->GetStateIndex() == iState->GetStateIndex()) + { + // We already are in desired state, delete the state which came in and return + TRACE_INFO((_L("CBTSAController::ChangeStateL(), already in desired state."))) + delete aState; + return; + } + delete iState; + iState = aState; + TInt err = KErrNone; + TRAP(err, iState->EnterL()); + if (err) + { + ChangeStateL(iState->ErrorOnEntryL(err)); + } + TRACE_FUNC_EXIT + } + // ----------------------------------------------------------------------------- // CBTSAController::ResetRemoteCache diff -r 6a1fe72036e3 -r 0b192a3a05a4 bluetoothengine/btsap/src/BTSapHciExtensionMan.cpp --- a/bluetoothengine/btsap/src/BTSapHciExtensionMan.cpp Tue Jan 26 12:06:42 2010 +0200 +++ b/bluetoothengine/btsap/src/BTSapHciExtensionMan.cpp Tue Feb 02 00:20:42 2010 +0200 @@ -93,8 +93,6 @@ BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTHciExtensionMan::HandleRequestL >>"))); TInt err = KErrNone; - aStatus = KRequestPending; - iStatus = &aStatus; CBTHciExtensionCmd* cmd = NULL; TBTDevAddrPckgBuf pckg; @@ -104,25 +102,21 @@ cmd->SetParamL(pckg().Des()); - if (err == KErrNone) + iRequestOpcode = cmd->Opcode(); + TPtrC8 ptr = cmd->DesC(); + TUint16 requestOpcode = ptr[0] << 8 | ptr[1]; + err = iConduit->IssueCommandL(requestOpcode, ptr.Mid(sizeof(KHciExtensionCmdPatch))); + if (err) { - iRequestOpcode = cmd->Opcode(); - TPtrC8 ptr = cmd->DesC(); - TUint16 requestOpcode = ptr[0] << 8 | ptr[1]; - err = iConduit->IssueCommandL(requestOpcode, ptr.Mid(sizeof(KHciExtensionCmdPatch))); - if (err) - { - BTSAP_TRACE_OPT(KBTSAP_TRACE_ERROR, BTSapPrintTrace(_L("[BTSap] iConduit->IssueCommandL err %d"), err)); - } + BTSAP_TRACE_OPT(KBTSAP_TRACE_ERROR, BTSapPrintTrace(_L("[BTSap] iConduit->IssueCommandL err %d"), err)); + User::Leave(err); } - else - { - User::RequestComplete(iStatus, err); - } - if (cmd) - { - CleanupStack::PopAndDestroy(cmd); - } + + aStatus = KRequestPending; + iStatus = &aStatus; + + CleanupStack::PopAndDestroy(cmd); + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTHciExtensionMan::HandleRequestL <<"))); }