# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273584188 -10800 # Node ID 2f88a7d66f50de7d49a216c710f382af901fd5ee # Parent b23265fb36da85618bf08d15ad7b03479614c85c Revision: 201017 Kit: 201019 diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/avc/avcframe.h --- a/bluetoothappprofiles/avrcp/avc/avcframe.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/avc/avcframe.h Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -512,26 +512,26 @@ // Factory pattern stuff - these are useful to do donkey work, // but have existing clients treat them as the base class -class CAVCVendorDependentResponse +class CAVCVendorDependentResponse // codescanner::missingcclass { public: IMPORT_C static CAVCFrame* NewL(TUint aVendorId); }; -class CAVCPassthroughCommand +class CAVCPassthroughCommand // codescanner::missingcclass { public: }; // likely not have newl because dont allocate on parse pattern -class CAVCVendorDependentCommand +class CAVCVendorDependentCommand // codescanner::missingcclass { public: IMPORT_C static TPtrC8 GetPayloadAndVID(const CAVCFrame& aFrame, TUint& aVID); }; // likely not have newl because dont allocate on parse pattern -class CAVCVendorUniquePassthroughCommand +class CAVCVendorUniquePassthroughCommand // codescanner::missingcclass { public: IMPORT_C static TPtrC8 GetPayloadAndVID(const CAVCFrame& aFrame, TUint& aVID); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/mediabrowseapi/public/remconmediabrowsepanic.h --- a/bluetoothappprofiles/avrcp/mediabrowseapi/public/remconmediabrowsepanic.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/mediabrowseapi/public/remconmediabrowsepanic.h Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -39,6 +39,7 @@ ESearchResultWithoutRequest = 6, /** The value of the media library state cookie must not be zero. */ EZeroMediaLibraryStateCookie = 7, + EUnexpectedNullMemberField = 8, }; class MediaBrowsePanic diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/mediabrowseapi/src/remconmediabrowsetargetbase.cpp --- a/bluetoothappprofiles/avrcp/mediabrowseapi/src/remconmediabrowsetargetbase.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/mediabrowseapi/src/remconmediabrowsetargetbase.cpp Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -73,12 +73,16 @@ { } -CRemConMediaBrowseTargetBase::~CRemConMediaBrowseTargetBase() +CRemConMediaBrowseTargetBase::~CRemConMediaBrowseTargetBase() // codescanner::destructor { iMediaAttributeIds.Close(); iNullArray.Close(); iOutBuf.Close(); iSearchString.Close(); + + // iGetPathResponse, iGiaResponse and iGflResponse are instantiated in CRemConMediaBrowseTargetBase::BaseConstructL() and + // so should have the same lifetime as this CRemConMediaBrowseTargetBase instance + __ASSERT_DEBUG(iGetPathResponse && iGiaResponse && iGflResponse, MediaBrowsePanic::Panic(EUnexpectedNullMemberField)); iGetPathResponse->Close(); iGiaResponse->Close(); iGflResponse->Close(); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.cpp --- a/bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.cpp Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -30,7 +30,7 @@ CPlayerApplicationSettings* CPlayerApplicationSettings::NewL( TUint aAttributeID, TDesC8& aAttributeText, - RArray aValues, + const RArray& aValues, RArray& aValueTexts, TUint aInitialValue ) { @@ -55,7 +55,7 @@ void CPlayerApplicationSettings::ConstructL(TUint aAttributeID, TDesC8& aAttributeText, - RArray aValues, + const RArray& aValues, RArray& aValueText, TUint aInitialValue ) { diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.h --- a/bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/playerinformation/src/playerapplicationsetting.h Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -42,7 +42,7 @@ */ static CPlayerApplicationSettings* NewL( TUint aAttributeID, TDesC8& aAttributeText, - RArray aValues, + const RArray& aValues, RArray& aValueTexts, TUint aInitialValue ); @@ -65,7 +65,7 @@ void ConstructL(TUint aAttributeID, TDesC8& aAttributeText, - RArray aValues, + const RArray& aValues, RArray& aValueText, TUint aInitialValue ); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpincomingcommandhandler.h Tue May 11 16:23:08 2010 +0300 @@ -32,13 +32,13 @@ class CPassthroughHelper; class CRcpRouter; -class CRemConBearerAvrcp; +class MRemConControlCommandInterface; class CAVCFrame; class TBTDevAddr; NONSHARABLE_CLASS(CRcpIncomingCommandHandler) : public CBase, public MPlayerChangeObserver, public MIncomingCommandHandler { public: - static CRcpIncomingCommandHandler* NewL(CRemConBearerAvrcp& aBearer, + static CRcpIncomingCommandHandler* NewL(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer, @@ -59,7 +59,7 @@ void SendReject(TUid aInterfaceUid, TUint aId); private: - CRcpIncomingCommandHandler(CRemConBearerAvrcp& aBearer, + CRcpIncomingCommandHandler(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer, @@ -92,6 +92,8 @@ void SendInternalResponse(TUint aId, RBuf8& aData); void SendResponse(TDblQue& aCommandQueue, TUint aId, RBuf8& aData); + + void EnterAddressedMode(); // Timer functions TBool DuplicateNotify(TDblQue& aCommandQueue, const CControlCommand& aCommand) const; @@ -100,15 +102,15 @@ TDblQue iCommandQueue; TDblQue iInternalCommandQueue; - CAVRCPFragmenter* iFragmenter; - CRemConBearerAvrcp& iBearer; - MRemConBearerObserver& iObserver; - CRcpRouter& iRouter; - CDeltaTimer& iTimer; - TRemConClientId iClientId; // We store the client id even if we aren't - // in addressed mode as we may switch into - // it and need to know the current local - // addressed player + CAVRCPFragmenter* iFragmenter; + MRemConControlCommandInterface& iCommandInterface; + MRemConBearerObserver& iObserver; + CRcpRouter& iRouter; + CDeltaTimer& iTimer; + TRemConClientId iClientId; // We store the client id even if we aren't + // in addressed mode as we may switch into + // it and need to know the current local + // addressed player TBool iAddressedMode; CAvrcpPlayerInfoManager& iPlayerInfoManager; diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpoutgoingcommandhandler.h Tue May 11 16:23:08 2010 +0300 @@ -30,13 +30,13 @@ class CControlCommand; class CRcpRouter; -class CRemConBearerAvrcp; +class MRemConControlCommandInterface; class MRemConBearerObserver; NONSHARABLE_CLASS(CRcpOutgoingCommandHandler) : public CBase, public MOutgoingCommandHandler { public: // Construction/Destruction - static CRcpOutgoingCommandHandler* NewL(CRemConBearerAvrcp& aBearer, + static CRcpOutgoingCommandHandler* NewL(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer); @@ -68,7 +68,7 @@ const TBTDevAddr& aAddr); private: - CRcpOutgoingCommandHandler(CRemConBearerAvrcp& aBearer, + CRcpOutgoingCommandHandler(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer); @@ -105,14 +105,14 @@ CControlCommand* aCommand, TBool aNotify); private: - TTransactionLabel iCurrentTrans; + TTransactionLabel iCurrentTrans; TDblQue iCommandQueue; TDblQue iNotifyCommandQueue; - CRemConBearerAvrcp& iBearer; - MRemConBearerObserver& iObserver; - CRcpRouter& iRouter; - CDeltaTimer& iTimer; + MRemConControlCommandInterface& iCommandInterface; + MRemConBearerObserver& iObserver; + CRcpRouter& iRouter; + CDeltaTimer& iTimer; CControlCommand* iUnreleasedCommand; TBool iUnreleasedHasResponse; diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcpremotedevice.h Tue May 11 16:23:08 2010 +0300 @@ -24,7 +24,7 @@ #include -class CRemConBearerAvrcp; +class MRemConControlCommandInterface; class MIncomingCommandHandler; class MOutgoingCommandHandler; class CRcpIncomingCommandHandler; @@ -41,7 +41,7 @@ public: static CRcpRemoteDevice* NewL(const TBTDevAddr& aAddr, CRcpRouter& aRouter, - CRemConBearerAvrcp& aBearer, + MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CDeltaTimer& aTimer, CAvrcpPlayerInfoManager& aPlayerInfoManager); @@ -58,7 +58,7 @@ private: CRcpRemoteDevice(const TBTDevAddr& aAddr, CRcpRouter& aRouter, - CRemConBearerAvrcp& aBearer, + MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer); void ConstructL(MRemConBearerObserver& aObserver, @@ -73,7 +73,7 @@ CRcpOutgoingCommandHandler* iOutgoing; CRcpRouter& iRouter; - CRemConBearerAvrcp& iBearer; + MRemConControlCommandInterface& iCommandInterface; CDeltaTimer& iTimer; }; diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/avrcputils.h Tue May 11 16:23:08 2010 +0300 @@ -80,6 +80,8 @@ ECommandAlreadyQueuedForSending = 52, EPassthroughQueueNotEmptyAfterDisconnect = 53, EPreviousPassthroughNonNullReplacing = 54, + ETooManyRemotesRegisterForLocalAddressedPlayerUpdates = 55, + ETooFewRemotesRegisterForLocalAddressedPlayerUpdates = 56, }; template diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/controlbearer.h Tue May 11 16:23:08 2010 +0300 @@ -62,6 +62,8 @@ void MrcciCommandExpired(TUint aTransactionId); void MrccciSetAddressedClient(const TRemConClientId& aClient); + void MrccciRegisterForLocalAddressedClientUpdates(); + void MrccciUnregisterForLocalAddressedClientUpdates(); private: // MRemConBearerInterfaceV3 functions called from RemCon virtual TInt GetResponse(TUid& aInterfaceUid, @@ -184,6 +186,8 @@ CAvrcpBulkBearer* iBulkBearer; RAvctp iAvctp; + + TInt iRemotesInterestedInLocalAddressedClient; }; #endif //CONTROLBEARER_H diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h Tue May 11 16:23:08 2010 +0300 @@ -19,19 +19,19 @@ #include class CRcpRouter; -class CRemConBearerAvrcp; +class MRemConControlCommandInterface; class CControlCommand; NONSHARABLE_CLASS(CPassthroughHelper) : public CBase { public: - static CPassthroughHelper* NewL(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer); + static CPassthroughHelper* NewL(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer); ~CPassthroughHelper(); void Disconnect(); void HandlePassthrough(CControlCommand& aCommand); // FIXME for now private: - CPassthroughHelper(CRcpRouter& aRouter, CRemConBearerAvrcp& aAvrcp, CDeltaTimer& aTimer); + CPassthroughHelper(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer); void ConstructL(); void Respond(CControlCommand& aCommand, TInt aErr); @@ -52,7 +52,7 @@ private: CRcpRouter& iRouter; - CRemConBearerAvrcp& iBearer; + MRemConControlCommandInterface& iCommandInterface; CDeltaTimer& iTimer; CControlCommand* iPreviousPassthrough; }; diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/playerbitmasks.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/playerbitmasks.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/playerbitmasks.h Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -176,11 +176,11 @@ inline const TDesC8& FeatureBitmask() const; - void SetCoreApiFeatures(RArray aOperation); - void SetAbsoluteVolumeApiFeatures(RArray aOperation); - void SetGroupNavigationApiFeatures(RArray aOperation); - void SetNowPlayingApiFeatures(RArray aOperation); - void SetMediaBrowseApiFeatures(RArray aOperation); + void SetCoreApiFeatures(const RArray& aOperation); + void SetAbsoluteVolumeApiFeatures(const RArray& aOperation); + void SetGroupNavigationApiFeatures(const RArray& aOperation); + void SetNowPlayingApiFeatures(const RArray& aOperation); + void SetMediaBrowseApiFeatures(const RArray& aOperation); private: void SetCoreApiFeatures(); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/remconcommandinterface.h Tue May 11 16:23:08 2010 +0300 @@ -51,7 +51,8 @@ virtual void MrccciNewNotifyResponse(CControlCommand& aCommand) = 0; virtual void MrccciSetAddressedClient(const TRemConClientId& aClient) = 0; - + virtual void MrccciRegisterForLocalAddressedClientUpdates() = 0; + virtual void MrccciUnregisterForLocalAddressedClientUpdates() = 0; }; #endif //REMCONCOMMANDINTERFACE_H diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpMetadataTransfer.cpp Tue May 11 16:23:08 2010 +0300 @@ -901,11 +901,16 @@ eventsBuf.Append(ERegisterNotificationUidsChanged ); } - // Always mark support for stuff that's handled internally rather than - // by the player - count+= 2; - eventsBuf.Append(ERegisterNotificationAvailablePlayersChanged ); - eventsBuf.Append(ERegisterNotificationAddressedPlayerChanged ); + // If there are any browsing clients then mark support for the player addressing + // events. Without browsing support the remote will not be able to see the + // information about the players so it is better not to let them see events + // relating to the them + if(iPlayerInfoManager->BrowsingSupportedL(KNullClientId)) + { + count+= 2; + eventsBuf.Append(ERegisterNotificationAvailablePlayersChanged ); + eventsBuf.Append(ERegisterNotificationAddressedPlayerChanged ); + } responseData[1] += count; diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpincomingcommandhandler.cpp Tue May 11 16:23:08 2010 +0300 @@ -54,7 +54,7 @@ @return A fully constructed CRcpIncomingCommandHandler. @leave System wide error codes. */ -CRcpIncomingCommandHandler* CRcpIncomingCommandHandler::NewL(CRemConBearerAvrcp& aBearer, +CRcpIncomingCommandHandler* CRcpIncomingCommandHandler::NewL(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer, @@ -62,7 +62,7 @@ TBTDevAddr& aDevice) { LOG_STATIC_FUNC - CRcpIncomingCommandHandler* handler = new(ELeave)CRcpIncomingCommandHandler(aBearer, aObserver, aRouter, aTimer, aPlayerInfoManager, aDevice); + CRcpIncomingCommandHandler* handler = new(ELeave)CRcpIncomingCommandHandler(aCommandInterface, aObserver, aRouter, aTimer, aPlayerInfoManager, aDevice); CleanupStack::PushL(handler); handler->ConstructL(); CleanupStack::Pop(handler); @@ -78,7 +78,7 @@ @return A partially constructed CRcpIncomingCommandHandler. @leave System wide error codes. */ -CRcpIncomingCommandHandler::CRcpIncomingCommandHandler(CRemConBearerAvrcp& aBearer, +CRcpIncomingCommandHandler::CRcpIncomingCommandHandler(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer, @@ -87,7 +87,7 @@ : iCommandQueue(_FOFF(CControlCommand, iHandlingLink)) , iInternalCommandQueue(_FOFF(CControlCommand, iHandlingLink)) , iFragmenter(NULL) - , iBearer(aBearer) + , iCommandInterface(aCommandInterface) , iObserver(aObserver) , iRouter(aRouter) , iTimer(aTimer) @@ -121,7 +121,7 @@ CleanupStack::PopAndDestroy(&players); - iPassthroughHelper = CPassthroughHelper::NewL(iRouter, iBearer, iTimer); + iPassthroughHelper = CPassthroughHelper::NewL(iRouter, iCommandInterface, iTimer); } /** Destructor. @@ -130,6 +130,7 @@ { LOG_FUNC + iCommandInterface.MrccciUnregisterForLocalAddressedClientUpdates(); iPlayerInfoManager.RemoveObserver( *this ); delete iFragmenter; delete iPassthroughHelper; @@ -207,7 +208,7 @@ { LOG_FUNC - TUint id = iBearer.MrcciNewTransactionId(); + TUint id = iCommandInterface.MrcciNewTransactionId(); // If there's nothing beyond a header this is bobs. Dump it now. if(aMessageInformation.Length() <= KAVCFrameHeaderLength) @@ -508,11 +509,11 @@ // can go directly to client (unlike passthrough which may need to map 2 commands to 1 click if (aCommand.Frame().Type() == AVC::ENotify) { - iBearer.MrccciNewNotifyCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrccciNewNotifyCommand(aCommand, aCommand.ClientId()); } else { - iBearer.MrcciNewCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId()); } } } @@ -522,7 +523,7 @@ LOG_FUNC // Once we respond to this we've told the remote that we're using a particular player - iAddressedMode = ETrue; + EnterAddressedMode(); // SetAddressedPlayer involves not just responding to this command but // also rejecting a bunch of notifies and completing the addressed player @@ -568,7 +569,7 @@ }; SendInternalResponse(aId, responseBuf); - iBearer.MrccciSetAddressedClient(iClientId); + iCommandInterface.MrccciSetAddressedClient(iClientId); responseBuf.Close(); } @@ -662,7 +663,7 @@ LOG_FUNC // Once we respond to this we've told the remote that we're using a particular player - iAddressedMode = ETrue; + EnterAddressedMode(); RBuf8 responseBuf; TRAPD(err, DoHandleRegisterAddressedPlayerNotificationL(responseBuf, aCommand)); @@ -720,7 +721,7 @@ // Although we haven't strictly told the remote which player we're using this is // a 1.4 command, and implies use of a specific player so switch into addressed mode - iAddressedMode = ETrue; + EnterAddressedMode(); RBuf8 responseBuf; TUint16 uidCounter = 0; @@ -823,6 +824,12 @@ aData.Close(); } +void CRcpIncomingCommandHandler::EnterAddressedMode() + { + iAddressedMode = ETrue; + iCommandInterface.MrccciRegisterForLocalAddressedClientUpdates(); + } + TBool CRcpIncomingCommandHandler::DuplicateNotify(TDblQue& aCommandQueue, const CControlCommand& aCommand) const { TUid interfaceUid = aCommand.RemConInterfaceUid(); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpoutgoingcommandhandler.cpp Tue May 11 16:23:08 2010 +0300 @@ -45,13 +45,13 @@ @return A fully constructed CRcpOutgoingCommandHandler. @leave System wide error codes. */ -CRcpOutgoingCommandHandler* CRcpOutgoingCommandHandler::NewL(CRemConBearerAvrcp& aBearer, +CRcpOutgoingCommandHandler* CRcpOutgoingCommandHandler::NewL(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer) { LOG_STATIC_FUNC - CRcpOutgoingCommandHandler* handler = new(ELeave)CRcpOutgoingCommandHandler(aBearer, aObserver, aRouter, aTimer); + CRcpOutgoingCommandHandler* handler = new(ELeave)CRcpOutgoingCommandHandler(aCommandInterface, aObserver, aRouter, aTimer); return handler; } @@ -64,12 +64,12 @@ @return A partially constructed CRcpIncomingCommandHandler. @leave System wide error codes. */ -CRcpOutgoingCommandHandler::CRcpOutgoingCommandHandler(CRemConBearerAvrcp& aBearer, +CRcpOutgoingCommandHandler::CRcpOutgoingCommandHandler(MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CRcpRouter& aRouter, CDeltaTimer& aTimer) : iCommandQueue(_FOFF(CControlCommand, iHandlingLink)), iNotifyCommandQueue(_FOFF(CControlCommand, iHandlingLink)), - iBearer(aBearer), iObserver(aObserver), iRouter(aRouter), iTimer(aTimer) + iCommandInterface(aCommandInterface), iObserver(aObserver), iRouter(aRouter), iTimer(aTimer) { LOG_FUNC } @@ -281,11 +281,11 @@ if ( aNotify ) {//This is a notify command - iBearer.MrccciNewNotifyResponse(*aCommand); + iCommandInterface.MrccciNewNotifyResponse(*aCommand); } else { - iBearer.MrccciNewResponse(*aCommand); + iCommandInterface.MrccciNewResponse(*aCommand); } } @@ -331,7 +331,7 @@ if(command) { command->SetNotifyVolumeChangeResult(command->Frame()); - iBearer.MrccciNewNotifyResponse(*command); + iCommandInterface.MrccciNewNotifyResponse(*command); } else { @@ -353,7 +353,7 @@ } } - iBearer.MrccciNewResponse(*command); + iCommandInterface.MrccciNewResponse(*command); } command->iHandlingLink.Deque(); @@ -578,7 +578,7 @@ aCommand.SetCoreButtonAction(ERemConCoreApiButtonRelease, ETrue); } - iBearer.MrccciNewResponse(aCommand); + iCommandInterface.MrccciNewResponse(aCommand); } } } diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/avrcpremotedevice.cpp Tue May 11 16:23:08 2010 +0300 @@ -31,13 +31,13 @@ */ CRcpRemoteDevice* CRcpRemoteDevice::NewL(const TBTDevAddr& aAddr, CRcpRouter& aRouter, - CRemConBearerAvrcp& aBearer, + MRemConControlCommandInterface& aCommandInterface, MRemConBearerObserver& aObserver, CDeltaTimer& aTimer, CAvrcpPlayerInfoManager& aPlayerInfoManager) { LOG_STATIC_FUNC - CRcpRemoteDevice* engine = new(ELeave) CRcpRemoteDevice(aAddr, aRouter, aBearer, aTimer); + CRcpRemoteDevice* engine = new(ELeave) CRcpRemoteDevice(aAddr, aRouter, aCommandInterface, aTimer); CleanupStack::PushL(engine); engine->ConstructL(aObserver, aPlayerInfoManager); CleanupStack::Pop(engine); @@ -56,9 +56,9 @@ */ CRcpRemoteDevice::CRcpRemoteDevice(const TBTDevAddr& aAddr, CRcpRouter& aRouter, - CRemConBearerAvrcp& aBearer, + MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer) : - iDevice(aAddr), iRouter(aRouter), iBearer(aBearer), iTimer(aTimer) + iDevice(aAddr), iRouter(aRouter), iCommandInterface(aCommandInterface), iTimer(aTimer) { LOG_FUNC } @@ -72,8 +72,8 @@ CAvrcpPlayerInfoManager& aPlayerInfoManager) { LOG_FUNC - iIncoming = CRcpIncomingCommandHandler::NewL(iBearer, aObserver, iRouter, iTimer, aPlayerInfoManager, iDevice); - iOutgoing = CRcpOutgoingCommandHandler::NewL(iBearer, aObserver, iRouter, iTimer); + iIncoming = CRcpIncomingCommandHandler::NewL(iCommandInterface, aObserver, iRouter, iTimer, aPlayerInfoManager, iDevice); + iOutgoing = CRcpOutgoingCommandHandler::NewL(iCommandInterface, aObserver, iRouter, iTimer); } /** Destructor. diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/passthroughhelper.cpp Tue May 11 16:23:08 2010 +0300 @@ -21,9 +21,9 @@ #include "controlbearer.h" -CPassthroughHelper* CPassthroughHelper::NewL(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer) +CPassthroughHelper* CPassthroughHelper::NewL(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer) { - CPassthroughHelper* helper = new(ELeave)CPassthroughHelper(aRouter, aBearer, aTimer); + CPassthroughHelper* helper = new(ELeave)CPassthroughHelper(aRouter, aCommandInterface, aTimer); CleanupStack::PushL(helper); helper->ConstructL(); CleanupStack::Pop(helper); @@ -34,9 +34,9 @@ { } -CPassthroughHelper::CPassthroughHelper(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer) +CPassthroughHelper::CPassthroughHelper(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer) : iRouter(aRouter) - , iBearer(aBearer) + , iCommandInterface(aCommandInterface) , iTimer(aTimer) { } @@ -164,7 +164,7 @@ { iPreviousPassthrough->SetClick(EFalse); iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonPress, ETrue); - iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); + iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); } StartReleaseTimer(*iPreviousPassthrough); } @@ -174,7 +174,7 @@ // to RemCon then start waiting for click. iPreviousPassthrough->CancelTimer(iTimer); iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonClick, ETrue); - iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); + iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); HandledCommand(*iPreviousPassthrough); @@ -214,7 +214,7 @@ // Cancel hold timer and send the previous command as a click. iPreviousPassthrough->CancelTimer(iTimer); iPreviousPassthrough->SetCoreButtonAction(ERemConCoreApiButtonClick, ETrue); - iBearer.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); + iCommandInterface.MrcciNewCommand(*iPreviousPassthrough, iPreviousPassthrough->ClientId()); HandledCommand(*iPreviousPassthrough); } @@ -228,7 +228,7 @@ { aCommand.SetCoreButtonAction(ERemConCoreApiButtonRelease, ETrue); } - iBearer.MrcciNewCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId()); aCommand.DecrementUsers(); } } @@ -267,7 +267,7 @@ } else { - iBearer.MrcciNewCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId()); StartReleaseTimer(aCommand); } } @@ -303,7 +303,7 @@ TRAPD(err, aCommand.ReSetCoreButtonActionL(ERemConCoreApiButtonRelease, ETrue)); if (err == KErrNone) { - iBearer.MrcciNewCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId()); } else { @@ -386,7 +386,7 @@ aCommand.CancelTimer(iTimer); aCommand.SetClick(EFalse); aCommand.SetCoreButtonAction(ERemConCoreApiButtonPress, ETrue); - iBearer.MrcciNewCommand(aCommand, aCommand.ClientId()); + iCommandInterface.MrcciNewCommand(aCommand, aCommand.ClientId()); StartReleaseTimer(aCommand); } diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerbitmasks.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerbitmasks.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerbitmasks.cpp Tue May 11 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-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" @@ -33,7 +33,7 @@ iFeatureBitmask.Copy(aFeatureBitmask.FeatureBitmask()); } -void TPlayerFeatureBitmask::SetCoreApiFeatures(RArray aOperation) +void TPlayerFeatureBitmask::SetCoreApiFeatures(const RArray& aOperation) { if(aOperation.Count() > 0) { @@ -282,7 +282,7 @@ iFeatureBitmask[EF5ByteOffset]|= (1< aOperation) +void TPlayerFeatureBitmask::SetAbsoluteVolumeApiFeatures(const RArray& aOperation) { if(aOperation.Count()) { @@ -290,7 +290,7 @@ } } -void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(RArray aOperation) +void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(const RArray& aOperation) { if(aOperation.Count()) { @@ -299,7 +299,7 @@ } } -void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(RArray aOperation) +void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(const RArray& aOperation) { if(aOperation.Count()) { @@ -313,7 +313,7 @@ } } -void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(RArray aOperation) +void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(const RArray& aOperation) { if(aOperation.Count()) { diff -r b23265fb36da -r 2f88a7d66f50 bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp --- a/bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/src/remconbeareravrcp.cpp Tue May 11 16:23:08 2010 +0300 @@ -870,6 +870,54 @@ Observer().SetRemoteAddressedClient(TUid::Uid(KRemConBearerAvrcpImplementationUid), aClientId); } +void CRemConBearerAvrcp::MrccciRegisterForLocalAddressedClientUpdates() + { + // Addressed player observers are registered with RemCon on a per-bearer basis + // so we aggregate interest from remote here + iRemotesInterestedInLocalAddressedClient++; + if(iRemotesInterestedInLocalAddressedClient == 1) + { + // Weren't any registered before, tell RemCon we care + Observer().RegisterLocalAddressedClientObserver(TUid::Uid(KRemConBearerAvrcpImplementationUid)); + } + +#ifdef __DEBUG + TInt numRemotes = 0; + CRcpRemoteDevice* remote = NULL; + + TDblQueIter iter(iRemotes); + while (iter++) + { + numRemotes++; + } + __ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient <= numRemotes, AVRCP_PANIC(ETooManyRemotesRegisterForLocalAddressedPlayerUpdates)); +#endif + } + +void CRemConBearerAvrcp::MrccciUnregisterForLocalAddressedClientUpdates() + { +#ifdef __DEBUG + TInt numRemotes = 0; + CRcpRemoteDevice* remote = NULL; + + TDblQueIter iter(iRemotes); + while (iter++) + { + numRemotes++; + } + __ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient <= numRemotes, AVRCP_PANIC(ETooManyRemotesRegisterForLocalAddressedPlayerUpdates)); + __ASSERT_DEBUG(iRemotesInterestedInLocalAddressedClient > 0, AVRCP_PANIC(ETooFewRemotesRegisterForLocalAddressedPlayerUpdates)); +#endif + + iRemotesInterestedInLocalAddressedClient--; + if(iRemotesInterestedInLocalAddressedClient == 0) + { + // No-one left who cares. Tell RemCon not to bother updating + // us anymore. + Observer().UnregisterLocalAddressedClientObserver(TUid::Uid(KRemConBearerAvrcpImplementationUid)); + } + } + /** Called from outgoing handlers to notify that a response for a notify command is ready for RemCon. diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btmac/group/BTMonoCmdHandler.mmp --- a/bluetoothengine/btmac/group/BTMonoCmdHandler.mmp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btmac/group/BTMonoCmdHandler.mmp Tue May 11 16:23:08 2010 +0300 @@ -67,6 +67,7 @@ LIBRARY customapi.lib LIBRARY bluetooth.lib LIBRARY atextclient.lib +LIBRARY charconv.lib LIBRARY mmfdevsound.lib LIBRARY telephonyservice.lib diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btmac/inc/atcodec/ATCodecDefs.h --- a/bluetoothengine/btmac/inc/atcodec/ATCodecDefs.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btmac/inc/atcodec/ATCodecDefs.h Tue May 11 16:23:08 2010 +0300 @@ -141,14 +141,14 @@ {EATCIEV, EATUnsolicitedResult, 2, KIntList2}, {EATCREG, EATReadResult, 2, KIntList2}, {EATCREG, EATUnsolicitedResult, 2, KIntList1}, - {EATCGSN, EATReadResult, 1, KStrList1}, - {EATCSQ, EATReadResult, 2, KIntList2}, - {EATCIMI, EATReadResult, 1, KStrList1}, - {EATCGMI, EATReadResult, 1, KStrList1}, - {EATCGMM, EATReadResult, 1, KStrList1}, - {EATCGMR, EATReadResult, 1, KStrList1}, - {EATCOLP, EATReadResult, 1, KIntList1}, - {EATCOLP, EATUnsolicitedResult, 2, KDQStrIntList2}, + {EATCGSN, EATActionResult, 1, KStrList1}, + {EATCSQ, EATActionResult, 2, KIntList2}, + {EATCIMI, EATActionResult, 1, KStrList1}, + {EATCGMI, EATActionResult, 1, KStrList1}, + {EATCGMM, EATActionResult, 1, KStrList1}, + {EATCGMR, EATActionResult, 1, KStrList1}, + {EATCOLP, EATReadResult, 1, KIntList1}, + {EATCOLP, EATUnsolicitedResult, 2, KDQStrIntList2}, }; const TInt KResultCodeParamTableSize = (sizeof(KResultCodeParamTable) / sizeof(SResultCodeParamDef)); diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btmac/src/BTMonoCmdHandler/btmcoperator.cpp --- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcoperator.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcoperator.cpp Tue May 11 16:23:08 2010 +0300 @@ -20,6 +20,7 @@ #include "btmcprotocol.h" #include #include "debug.h" +#include // ----------------------------------------------------------------------------- // CBtmcOperator::NewL @@ -90,8 +91,12 @@ { LEAVE_IF_ERROR(params.Append(TATParam(0))); TBuf8 buf8; - buf8.Copy(iInfo.iName); // need Unicode convert? - LEAVE_IF_ERROR(params.Append(TATParam(buf8, EATDQStringParam))); + buf8.Copy(iInfo.iName); // Unicode convert: + TBuf16 buf16; + TBuf8 buf8Copy; + LEAVE_IF_ERROR(CnvUtfConverter::ConvertToUnicodeFromUtf8(buf16,buf8)); + buf8Copy.Copy(buf16); + LEAVE_IF_ERROR(params.Append(TATParam(buf8Copy, EATDQStringParam))); } else { diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp --- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp Tue May 11 16:23:08 2010 +0300 @@ -290,7 +290,7 @@ { TBuf8 buf; buf.Copy(iId); - CATResult* cimi = CATResult::NewLC(EATCIMI, EATReadResult, TATParam(buf)); + CATResult* cimi = CATResult::NewLC(EATCIMI, EATActionResult, TATParam(buf)); SendResponseL(*cimi); CleanupStack::PopAndDestroy(cimi); CATResult* ok = CATResult::NewLC(EATOK); @@ -789,56 +789,7 @@ 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)))) @@ -1040,7 +991,11 @@ void CBtmcProtocol::HandleActionCommandL(const CATCommand& aCmd) { TRACE_FUNC - + RATResultPtrArray resarr; + ATObjArrayCleanupResetAndDestroyPushL(resarr); + CATResult* code = NULL; + RATParamArray params; + CleanupClosePushL(params); switch (aCmd.Id()) { case EATCNUM: @@ -1054,33 +1009,71 @@ iCallStatus->HandleClccL(); 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, EATActionResult, ¶ms); + TRACE_INFO(_L("done")); + break; + } + case EATCGMI: + { + TBuf8 buf; + buf.Copy(iIdentity.iManufacturer); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMI, EATActionResult, ¶ms); + break; + } + case EATCGMM: + { + TBuf8 buf; + buf.Copy(iIdentity.iModel); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMM, EATActionResult, ¶ms); + break; + } + case EATCGMR: + { + TBuf8 buf; + buf.Copy(iIdentity.iRevision); + LEAVE_IF_ERROR(params.Append(TATParam(buf))) + code = CATResult::NewL(EATCGMR, EATActionResult, ¶ms); + break; + } + case EATCIMI: + { + iEtelQuery->SetServiceId(KQueryIMSI); + iPhone.GetSubscriberId(iEtelQuery->iStatus, iId); + iEtelQuery->GoActive(); + break; + } case EATCGSN: { - CATResult* code = NULL; - RATResultPtrArray resarr; - ATObjArrayCleanupResetAndDestroyPushL(resarr); - RATParamArray params; - CleanupClosePushL(params); TBuf8 buf; buf.Copy(iIdentity.iSerialNumber); LEAVE_IF_ERROR(params.Append(TATParam(buf))) code = CATResult::NewL(EATCGSN, EATActionResult, ¶ms); - CleanupStack::PopAndDestroy(¶ms); - CleanupStack::PushL(code); - resarr.AppendL(code); - CleanupStack::Pop(code); - CATResult* ok = CATResult::NewL(EATOK); - CleanupStack::PushL(ok); - resarr.AppendL(ok); - CleanupStack::Pop(ok); - SendResponseL(resarr); - CleanupStack::PopAndDestroy(&resarr); - CmdHandlingCompletedL(); break; } default: LEAVE(KErrNotSupported); + } + CleanupStack::PopAndDestroy(¶ms); + if (code) + { + CleanupStack::PushL(code); + resarr.AppendL(code); + CleanupStack::Pop(code); + CATResult* ok = CATResult::NewL(EATOK); + CleanupStack::PushL(ok); + resarr.AppendL(ok); + CleanupStack::Pop(ok); + SendResponseL(resarr); + CmdHandlingCompletedL(); } + CleanupStack::PopAndDestroy(&resarr); } void CBtmcProtocol::DoSendProtocolDataL() diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btnotif/inc/btnotifier.h --- a/bluetoothengine/btnotif/inc/btnotifier.h Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btnotif/inc/btnotifier.h Tue May 11 16:23:08 2010 +0300 @@ -67,6 +67,13 @@ */ virtual ~CBTNotifierBase(); + /** + * A utility function for checking whether autolock is on. + * @param None. + * @return A boolean according to autolock state. + */ + TBool AutoLockOnL(); + protected: // Constructors and destructor /** @@ -78,6 +85,8 @@ * Symbian 2nd phase constructor. */ virtual void ConstructL(); + + protected: // New functions @@ -94,13 +103,6 @@ const RMessagePtr2& aMessage)=0; /** - * A utility function for checking whether autolock is on. - * @param None. - * @return A boolean according to autolock state. - */ - TBool AutoLockOnL(); - - /** * A utility function for setting the power status of Bluetooth. * If the power is not on the user will be presented a query. * @return ETrue if BT is turned on successfully; EFalse otherwise diff -r b23265fb36da -r 2f88a7d66f50 bluetoothengine/btnotif/src/BTNInquiAO.cpp --- a/bluetoothengine/btnotif/src/BTNInquiAO.cpp Tue Apr 27 16:49:44 2010 +0300 +++ b/bluetoothengine/btnotif/src/BTNInquiAO.cpp Tue May 11 16:23:08 2010 +0300 @@ -51,6 +51,14 @@ { FLOG(_L("[BTNOTIF]\t CBTInqUI::IssueRequestL()")); + if (reinterpret_cast(iDevSearchObserver)->AutoLockOnL()) + { + // Cancel bt inquiry immediately if device is locked. + FLOG(_L("[BTNOTIF]\t CBTInqUI::IssueRequestL() Device is locked")); + Cancel(); + return; + } + TUint action = 0; if( !iPageForName ) { diff -r b23265fb36da -r 2f88a7d66f50 cbsatplugin/atmisccmdplugin/rom/atmisccmdplugin.iby --- a/cbsatplugin/atmisccmdplugin/rom/atmisccmdplugin.iby Tue Apr 27 16:49:44 2010 +0300 +++ b/cbsatplugin/atmisccmdplugin/rom/atmisccmdplugin.iby Tue May 11 16:23:08 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). + * 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" @@ -17,7 +17,6 @@ #define ATMISCCMDPLUGIN_IBY ECOM_PLUGIN(atmisccmdplugin.dll, atmisccmdplugin.rsc) -S60_APP_RESOURCE(atmisccmdpluginresource) #endif // ATMISCCMDPLUGIN_IBY