--- 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);
--- 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
--- 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();
--- 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<TUint> aValues,
+ const RArray<TUint>& aValues,
RArray<TPtrC8>& aValueTexts,
TUint aInitialValue )
{
@@ -55,7 +55,7 @@
void CPlayerApplicationSettings::ConstructL(TUint aAttributeID,
TDesC8& aAttributeText,
- RArray<TUint> aValues,
+ const RArray<TUint>& aValues,
RArray<TPtrC8>& aValueText,
TUint aInitialValue )
{
--- 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<TUint> aValues,
+ const RArray<TUint>& aValues,
RArray<TPtrC8>& aValueTexts,
TUint aInitialValue );
@@ -65,7 +65,7 @@
void ConstructL(TUint aAttributeID,
TDesC8& aAttributeText,
- RArray<TUint> aValues,
+ const RArray<TUint>& aValues,
RArray<TPtrC8>& aValueText,
TUint aInitialValue );
--- 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<CControlCommand>& aCommandQueue, TUint aId, RBuf8& aData);
+
+ void EnterAddressedMode();
// Timer functions
TBool DuplicateNotify(TDblQue<CControlCommand>& aCommandQueue, const CControlCommand& aCommand) const;
@@ -100,15 +102,15 @@
TDblQue<CControlCommand> iCommandQueue;
TDblQue<CControlCommand> 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;
--- 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<CControlCommand> iCommandQueue;
TDblQue<CControlCommand> iNotifyCommandQueue;
- CRemConBearerAvrcp& iBearer;
- MRemConBearerObserver& iObserver;
- CRcpRouter& iRouter;
- CDeltaTimer& iTimer;
+ MRemConControlCommandInterface& iCommandInterface;
+ MRemConBearerObserver& iObserver;
+ CRcpRouter& iRouter;
+ CDeltaTimer& iTimer;
CControlCommand* iUnreleasedCommand;
TBool iUnreleasedHasResponse;
--- 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 <e32std.h>
-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;
};
--- 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 <typename XAny>
--- 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
--- 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 <e32base.h>
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;
};
--- 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<TUint> aOperation);
- void SetAbsoluteVolumeApiFeatures(RArray<TUint> aOperation);
- void SetGroupNavigationApiFeatures(RArray<TUint> aOperation);
- void SetNowPlayingApiFeatures(RArray<TUint> aOperation);
- void SetMediaBrowseApiFeatures(RArray<TUint> aOperation);
+ void SetCoreApiFeatures(const RArray<TUint>& aOperation);
+ void SetAbsoluteVolumeApiFeatures(const RArray<TUint>& aOperation);
+ void SetGroupNavigationApiFeatures(const RArray<TUint>& aOperation);
+ void SetNowPlayingApiFeatures(const RArray<TUint>& aOperation);
+ void SetMediaBrowseApiFeatures(const RArray<TUint>& aOperation);
private:
void SetCoreApiFeatures();
--- 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
--- 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;
--- 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<CControlCommand>& aCommandQueue, const CControlCommand& aCommand) const
{
TUid interfaceUid = aCommand.RemConInterfaceUid();
--- 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);
}
}
}
--- 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.
--- 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);
}
--- 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<TUint> aOperation)
+void TPlayerFeatureBitmask::SetCoreApiFeatures(const RArray<TUint>& aOperation)
{
if(aOperation.Count() > 0)
{
@@ -282,7 +282,7 @@
iFeatureBitmask[EF5ByteOffset]|= (1<<EF5BitOffset);
}
-void TPlayerFeatureBitmask::SetAbsoluteVolumeApiFeatures(RArray<TUint> aOperation)
+void TPlayerFeatureBitmask::SetAbsoluteVolumeApiFeatures(const RArray<TUint>& aOperation)
{
if(aOperation.Count())
{
@@ -290,7 +290,7 @@
}
}
-void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(RArray<TUint> aOperation)
+void TPlayerFeatureBitmask::SetGroupNavigationApiFeatures(const RArray<TUint>& aOperation)
{
if(aOperation.Count())
{
@@ -299,7 +299,7 @@
}
}
-void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(RArray<TUint> aOperation)
+void TPlayerFeatureBitmask::SetNowPlayingApiFeatures(const RArray<TUint>& aOperation)
{
if(aOperation.Count())
{
@@ -313,7 +313,7 @@
}
}
-void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(RArray<TUint> aOperation)
+void TPlayerFeatureBitmask::SetMediaBrowseApiFeatures(const RArray<TUint>& aOperation)
{
if(aOperation.Count())
{
--- 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<CRcpRemoteDevice> 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<CRcpRemoteDevice> 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.
--- 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
--- 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));
--- 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 <mmtsy_names.h>
#include "debug.h"
+#include <utf.h>
// -----------------------------------------------------------------------------
// CBtmcOperator::NewL
@@ -90,8 +91,12 @@
{
LEAVE_IF_ERROR(params.Append(TATParam(0)));
TBuf8<KMaxOperatorNameLength> buf8;
- buf8.Copy(iInfo.iName); // need Unicode convert?
- LEAVE_IF_ERROR(params.Append(TATParam(buf8, EATDQStringParam)));
+ buf8.Copy(iInfo.iName); // Unicode convert:
+ TBuf16<KMaxOperatorNameLength> buf16;
+ TBuf8<KMaxOperatorNameLength> buf8Copy;
+ LEAVE_IF_ERROR(CnvUtfConverter::ConvertToUnicodeFromUtf8(buf16,buf8));
+ buf8Copy.Copy(buf16);
+ LEAVE_IF_ERROR(params.Append(TATParam(buf8Copy, EATDQStringParam)));
}
else
{
--- 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<RMobilePhone::KIMSISize> 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<RMobilePhone::KPhoneSerialNumberSize> buf;
- buf.Copy(iIdentity.iSerialNumber);
- LEAVE_IF_ERROR(params.Append(TATParam(buf)))
- code = CATResult::NewL(EATCGSN, EATReadResult, ¶ms);
- break;
- }
- case EATCGMI:
- {
- TBuf8<RMobilePhone::KPhoneManufacturerIdSize> buf;
- buf.Copy(iIdentity.iManufacturer);
- LEAVE_IF_ERROR(params.Append(TATParam(buf)))
- code = CATResult::NewL(EATCGMI, EATReadResult, ¶ms);
- break;
- }
- case EATCGMM:
- {
- TBuf8<RMobilePhone::KPhoneModelIdSize> buf;
- buf.Copy(iIdentity.iModel);
- LEAVE_IF_ERROR(params.Append(TATParam(buf)))
- code = CATResult::NewL(EATCGMM, EATReadResult, ¶ms);
- break;
- }
- case EATCGMR:
- {
- TBuf8<RMobilePhone::KPhoneRevisionIdSize> 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<RMobilePhone::KPhoneManufacturerIdSize> buf;
+ buf.Copy(iIdentity.iManufacturer);
+ LEAVE_IF_ERROR(params.Append(TATParam(buf)))
+ code = CATResult::NewL(EATCGMI, EATActionResult, ¶ms);
+ break;
+ }
+ case EATCGMM:
+ {
+ TBuf8<RMobilePhone::KPhoneModelIdSize> buf;
+ buf.Copy(iIdentity.iModel);
+ LEAVE_IF_ERROR(params.Append(TATParam(buf)))
+ code = CATResult::NewL(EATCGMM, EATActionResult, ¶ms);
+ break;
+ }
+ case EATCGMR:
+ {
+ TBuf8<RMobilePhone::KPhoneRevisionIdSize> 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<RMobilePhone::KPhoneSerialNumberSize> 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()
--- 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
--- 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<CBTNotifierBase*>(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 )
{
--- 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