# HG changeset patch # User hgs # Date 1285754945 -10800 # Node ID 001a94c71129914bc657340766f2d0632fb85caa # Parent 5ebadcda06cb42025b6f9895edf656855b53dd18 201037 diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/inc/btengserver.h --- a/bluetoothengine/bteng/inc/btengserver.h Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/inc/btengserver.h Wed Sep 29 13:09:05 2010 +0300 @@ -132,6 +132,15 @@ { return iSettingsMgr; } /** + * Getter for key watcher instance. + * + * @since Symbian^3 + * @return Pointer to instance of key watcher. + */ + inline CBTEngSrvKeyWatcher* KeyWatcher() const + { return iWatcher; } + + /** * Getter for plug-in manager instance. * * @since Symbian^3 diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/inc/btengsrvkeywatcher.h --- a/bluetoothengine/bteng/inc/btengsrvkeywatcher.h Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/inc/btengsrvkeywatcher.h Wed Sep 29 13:09:05 2010 +0300 @@ -79,6 +79,10 @@ */ virtual void HandleError( CBTEngActive* aActive, TInt aError ); +public: + + TBool GetSspDebugModeKeyValue(); + private: /** diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/src/btengserver.cpp --- a/bluetoothengine/bteng/src/btengserver.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/src/btengserver.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -568,11 +568,17 @@ // TInt CBTEngServer::DebugModeTimerCallBack( TAny* aPtr ) { + TRACE_FUNC_ENTRY __ASSERT_ALWAYS(aPtr, PanicServer(EBTEngPanicArgumentIsNull) ); - // Set our internal debug mode key to off. Ignore error, not critical here. - (void) RProperty::Set( KPSUidBluetoothTestingMode, KBTSspDebugmode, EFalse ); CBTEngServer* server = (CBTEngServer*) aPtr; - TRAP_IGNORE( server->SettingsManager()->CheckSspDebugModeL( EFalse ) ); + server->RemoveTimer( ESspDebugModeTimer ); + if( server->KeyWatcher()->GetSspDebugModeKeyValue() ) + { + // Set our internal debug mode key to off. Ignore error, not critical here. + (void) RProperty::Set( KPSUidBluetoothTestingMode, KBTSspDebugmode, EFalse ); + } + TRAP_IGNORE( server->SettingsManager()->CheckSspDebugModeL( EFalse ) ); + TRACE_FUNC_EXIT return KErrNone; } diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/src/btengsrvkeywatcher.cpp --- a/bluetoothengine/bteng/src/btengsrvkeywatcher.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/src/btengsrvkeywatcher.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -529,3 +529,16 @@ } CleanupStack::PopAndDestroy( cenRep ); } + +// --------------------------------------------------------------------------- +// Gets the current value of ssp mode key. Return ETrue if BT is in SSP debug mode +// --------------------------------------------------------------------------- +// +TBool CBTEngSrvKeyWatcher::GetSspDebugModeKeyValue() + { + TInt val; + // Getter failure is handled as Debug mode off + TInt err = iSspDebugModeKey.Get( val ); + TRACE_INFO( ( _L( "CBTEngSrvKeyWatcher::GetSspDebugModeKeyValue err %d val %d" ), err, val) ) + return ( !err && val ); + } diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/src/btengsrvpluginmgr.cpp --- a/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/src/btengsrvpluginmgr.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -81,9 +81,12 @@ // CBTEngSrvPluginMgr::~CBTEngSrvPluginMgr() { + TRACE_FUNC_ENTRY iPluginInfoArray.Close(); iPluginArray.ResetAndDestroy(); + iUuidContainter.Close(); REComSession::FinalClose(); + TRACE_FUNC_EXIT } diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp --- a/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -471,7 +471,7 @@ (TInt) aDebugMode ); SetPowerStateL( EBTOff, EFalse ); } - else + else if( !( iServer->IsTimerQueued( CBTEngServer::ESspDebugModeTimer ) ) ) { // There are still existing connections, queue the // timer again for half the period. diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btsap/inc/BTSapMessage.h --- a/bluetoothengine/btsap/inc/BTSapMessage.h Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btsap/inc/BTSapMessage.h Wed Sep 29 13:09:05 2010 +0300 @@ -103,7 +103,8 @@ EConnectionOK, EConnectionErrReject, EConnectionErrNotSupported, - EConnectionErrTooSmall + EConnectionErrTooSmall, + EConnectionOKOngoingCall }; enum TValidationResult diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btsap/inc/BTSapServerState.h --- a/bluetoothengine/btsap/inc/BTSapServerState.h Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btsap/inc/BTSapServerState.h Wed Sep 29 13:09:05 2010 +0300 @@ -53,7 +53,9 @@ { EConnectionError, EUserAccepted, - EUserRejected + EUserRejected, + EConnectionWithActiveCall, + EConnectionWithoutActiveCall }; enum TSapConnectionState @@ -70,6 +72,7 @@ class RTelServer; class RMobilePhone; class MSapStatusObserver; +class MSapCallStatusObserver; /* * An abstarct interface that defines a callback method @@ -128,12 +131,68 @@ RProperty iProperty; }; +/* +* An abstarct interface that defines a callback method +* for the Call state observer. CallStatusChangedL +* is called by CBTCallStatusObserver when the call connection +* state has changed. aStatus represents the new status value. +*/ +class MSapCallStatusObserver + { + public: + virtual void CallStatusChangedL(TInt aStatus) = 0; + }; + +/* +* An observer that monitors KPSUidCtsyCallInformation +* P&S key . The clients can call SubscribeCallStatusL in order to +* get a changed call status returned via +* MSapCallStatusObserver::CallStatusChangedL. +*/ +class CBTSapCallStatusObserver : public CActive + { +public: + /** + * Two-phased constructor. + */ + static CBTSapCallStatusObserver* NewL(); + /** + * Destructor. + */ + virtual ~CBTSapCallStatusObserver(); + + /** + * Starts listening KCTsyCallState P&S key. + * When the key value is changed, the new state is indicated + * through the observer interface (MSapCallStatusObserver). + */ + void SubscribeCallStatusL(MSapCallStatusObserver* aObserver); + +private: + /** + * Two-Phase constructor + */ + void ConstructL(); + + /** + * Default constructor + */ + CBTSapCallStatusObserver(); + + // From CActive + virtual void DoCancel(); + virtual void RunL(); + +private: + MSapCallStatusObserver* iObserver; + RProperty iProperty; + }; /** * CBTSapServerState core class * */ -class CBTSapServerState : public CActive, MSapStatusObserver +class CBTSapServerState : public CActive, MSapStatusObserver, MSapCallStatusObserver { private: class TState @@ -149,6 +208,7 @@ virtual TInt RejectSapConnection(TBTSapRejectReason aReason); virtual void SimCardStatusChanged(TCardStatus aCardStatus); virtual TInt ChangeState(TBTSapServerState& aNextState); + virtual TInt CallInactive(); void NotifySapState(TSapConnectionState aState); void StartBTNotifier(TInt type); @@ -206,6 +266,7 @@ TInt RejectSapConnection(TBTSapRejectReason aReason); TInt ChangeState(TBTSapServerState& aNextState); void SimCardStatusChanged(TCardStatus aCardStatus); + TInt CallInactive(); private: void CheckMaxMsgSize(TConnectionStatus& aMsgSizeStatus); @@ -214,6 +275,8 @@ private: TBool iConnectRequestOK; TCardStatus iCardStatus; + TBool iSendRespMessageDone; + TBool iMessageSizeNegotiationDone; RProperty iProperty; }; @@ -367,9 +430,15 @@ TBTSapMessage& BTSapResponseMessage(); + void SubscribeCallStatusL(); + + void CancelSubscribeCallStatusL(); + // From MSapStatusObserver void SapStatusChangedL(TInt aStatus); - + + // From MSapCallStatusObserver + void CallStatusChangedL(TInt aStatus); private: void OpenSubscriptionModuleL(); @@ -420,6 +489,7 @@ TBTSapMessage iResponseMessage; TBTSapMessage iRequestMessage; CBTSapStatusObserver* iStatusObserver; + CBTSapCallStatusObserver* iBTCallStatusObserver; TBool iStatesCreated; }; diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btsap/src/BTSapServerState.cpp --- a/bluetoothengine/btsap/src/BTSapServerState.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btsap/src/BTSapServerState.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -20,6 +20,8 @@ // INCLUDE FILES #include +#include +#include #include "BTSapDomainPSKeys.h" #include "BTSapServerState.h" @@ -78,7 +80,7 @@ } // --------------------------------------------------------- -// CBTSapStatusObserver::StartObservingL() +// CBTSapStatusObserver::SubscribeSapStatusL() //---------------------------------------------------------- // void CBTSapStatusObserver::SubscribeSapStatusL(MSapStatusObserver* aObserver) @@ -130,6 +132,102 @@ } // --------------------------------------------------------- +// CBTSapCallStatusObserver::CBTSapCallStatusObserver() +//---------------------------------------------------------- +// +CBTSapCallStatusObserver::CBTSapCallStatusObserver(): CActive(CActive::EPriorityStandard) + { + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::NewL() +//---------------------------------------------------------- +// +CBTSapCallStatusObserver* CBTSapCallStatusObserver::NewL() + { + CBTSapCallStatusObserver* self = new(ELeave) CBTSapCallStatusObserver(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::ConstructL() +//---------------------------------------------------------- +// +void CBTSapCallStatusObserver::ConstructL() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapCallStatusObserver::ConstructL"))); + User::LeaveIfError(iProperty.Attach( KPSUidCtsyCallInformation, + KCTsyCallState)); + } + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::~CBTSapCallStatusObserver +//---------------------------------------------------------- +// +CBTSapCallStatusObserver::~CBTSapCallStatusObserver() + { + Cancel(); + iProperty.Close(); + } + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::SubscribeCallStatusL() +//---------------------------------------------------------- +// +void CBTSapCallStatusObserver::SubscribeCallStatusL(MSapCallStatusObserver* aObserver) + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapCallStatusObserver::SubscribeCallStatusL"))); + + ASSERT(aObserver); + + iObserver = aObserver; + + iProperty.Subscribe(iStatus); + SetActive(); + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapCallStatusObserver::SubscribeCallStatusL() Exit"))); + } + + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::DoCancel() +// --------------------------------------------------------- +// +void CBTSapCallStatusObserver::DoCancel() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapCallStatusObserver::DoCancel"))); + + iProperty.Cancel(); + } + +// --------------------------------------------------------- +// CBTSapCallStatusObserver::RunL() +// --------------------------------------------------------- +// +void CBTSapCallStatusObserver::RunL() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapCallStatusObserver::RunL"))); + + TInt btSapState; + TInt err = iStatus.Int(); + + iProperty.Subscribe(iStatus); + SetActive(); + + if (!err) + { + err = iProperty.Get(btSapState); + if (!err) + { + iObserver->CallStatusChangedL(btSapState); + } + } + } + +// --------------------------------------------------------- // CBTSapServerState::CBTSapServerState() // --------------------------------------------------------- // @@ -169,6 +267,7 @@ delete iSimCardStatusNotifier; delete iRequestHandler; delete iStatusObserver; + delete iBTCallStatusObserver; iSubscriptionModule.Close(); iPhone.Close(); @@ -206,6 +305,7 @@ iSocketHandler = CBTSapSocketHandler::NewL(*this, *iRequestHandler); iSimCardStatusNotifier = CBTSapSimCardStatusNotifier::NewL(*this); iStatusObserver = CBTSapStatusObserver::NewL(); + iBTCallStatusObserver = CBTSapCallStatusObserver::NewL(); TState* state = new (ELeave) TStateInit(*this); CleanupStack::PushL(state); @@ -216,6 +316,46 @@ } // --------------------------------------------------------- +// CBTSapServerState::SubscribeCallStatusL() +// --------------------------------------------------------- +// +void CBTSapServerState::SubscribeCallStatusL() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapServerState::SubscribeCallStatusL"))); + if (!iBTCallStatusObserver->IsActive()) + { + iBTCallStatusObserver->SubscribeCallStatusL(this); + } + } + +// --------------------------------------------------------- +// CBTSapServerState::CancelSubscribeCallStatusL() +// --------------------------------------------------------- +// +void CBTSapServerState::CancelSubscribeCallStatusL() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapServerState::CancelSubscribeCallStatusL"))); + iBTCallStatusObserver->Cancel(); + } + +// --------------------------------------------------------- +// CBTSapServerState::CallStatusChangedL() +// --------------------------------------------------------- +// +void CBTSapServerState::CallStatusChangedL(TInt aStatus) + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_INFO, BTSapPrintTrace(_L("[BTSap] TStateConnect: callState: %d"), aStatus)); + + // If callState is EPSTelephonyCallStateNone or EPSTelephonyCallStateUninitialized, there's no ongoing call + TBool retVal = (aStatus != EPSCTsyCallStateNone) && (aStatus != EPSCTsyCallStateUninitialized); + if (retVal) + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] CBTSapServerState::CallStatusChangedL() call ended"))); + iStateArray[iCurrentState]->CallInactive(); + } + } + +// --------------------------------------------------------- // CBTSapServerState::StartL() // --------------------------------------------------------- // diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btsap/src/BTSapState.cpp --- a/bluetoothengine/btsap/src/BTSapState.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btsap/src/BTSapState.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -54,6 +54,12 @@ return KErrNotReady; } +TInt CBTSapServerState::TState::CallInactive() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_ERROR, BTSapPrintTrace(_L("[BTSap] TState: CallInactive: Not Ready#"))); + return KErrNotReady; + } + void CBTSapServerState::TState::SimCardStatusChanged(TCardStatus /*aCardStatus*/) { BTSAP_TRACE_OPT(KBTSAP_TRACE_ERROR, BTSapPrintTrace(_L("[BTSap] TState: SimCardStatusChanged: Not Ready#"))); diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btsap/src/BTSapStateConnect.cpp --- a/bluetoothengine/btsap/src/BTSapStateConnect.cpp Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btsap/src/BTSapStateConnect.cpp Wed Sep 29 13:09:05 2010 +0300 @@ -30,7 +30,7 @@ CBTSapServerState::TStateConnect::TStateConnect(CBTSapServerState& aServerState) - : TStateIdle(aServerState), iConnectRequestOK(EFalse), iCardStatus(ECardStatusReserved) + : TStateIdle(aServerState), iConnectRequestOK(EFalse), iCardStatus(ECardStatusReserved), iSendRespMessageDone(EFalse), iMessageSizeNegotiationDone(EFalse) { } @@ -43,15 +43,27 @@ iStatus = &aStatus; TConnectionStatus connectionStatus = EConnectionErrReject; - if(!IsCallOngoing()) - { // SAP cannot be accepted if a call is ongoing or if no SIM is present - connectionStatus = EConnectionOK; - } - - if (connectionStatus == EConnectionOK) + if (!iMessageSizeNegotiationDone) { CheckMaxMsgSize(connectionStatus); } + + if (connectionStatus == EConnectionOK || iMessageSizeNegotiationDone) + { + iMessageSizeNegotiationDone = ETrue; + if(IsCallOngoing()) + { // SAP cannot be accepted if a call is ongoing or if no SIM is present + connectionStatus = EConnectionOKOngoingCall; + } + else + { + connectionStatus = EConnectionOK; + } + } + else + { + iMessageSizeNegotiationDone = EFalse; + } if (connectionStatus == EConnectionOK) { @@ -84,10 +96,23 @@ #endif //__WINS__ } + else if (connectionStatus == EConnectionOKOngoingCall) + { + iConnectRequestOK = EFalse; + aStatus = KRequestPending; + if (iSendRespMessageDone) + { + //start subscribe to CallStatusChange + iServerState.SubscribeCallStatusL(); + } + else + { + User::RequestComplete(iStatus, EConnectionWithActiveCall); + } + } else { iConnectRequestOK = EFalse; - iResponseMessage.SetMsgID(EConnectResponse); iResponseMessage.AddParameter(EParaConnectionStatus, connectionStatus); @@ -121,8 +146,25 @@ BTSAP_TRACE_OPT(KBTSAP_TRACE_STM, BTSapPrintTrace(_L("[BTSap] SM: TStateConnect: Complete"))); TBTSapServerState nextState = EStateNotConnected; - - if (aReason == EUserAccepted || aReason == EUserRejected) + if (aReason == EConnectionWithActiveCall) + { + if (!iSendRespMessageDone) + { + TInt connectionStatus = EConnectionOKOngoingCall; + iResponseMessage.SetMsgID(EConnectResponse); + iResponseMessage.AddParameter(EParaConnectionStatus, connectionStatus); + iServerState.BTSapSocketHandler().Send(iResponseMessage.Data()); + iSendRespMessageDone = ETrue; + } + //wait in TStateConnect state, until call is released + nextState = EStateConnect; + } + else if (aReason == EConnectionWithoutActiveCall) + { + //Enter TStateConnect state one last time, make a SAP connection + nextState = EStateConnect; + } + else if (aReason == EUserAccepted || aReason == EUserRejected) { TInt connectionStatus = (aReason == EUserAccepted) ? EConnectionOK : EConnectionErrReject; @@ -147,6 +189,8 @@ NotifySapState(ESapConnected); } nextState = EStateIdle; + iSendRespMessageDone = EFalse; + iMessageSizeNegotiationDone = EFalse; } } @@ -156,6 +200,9 @@ void CBTSapServerState::TStateConnect::Cancel() { NotifySapState(ESapNotConnected); + iSendRespMessageDone = EFalse; + iMessageSizeNegotiationDone = EFalse; + iServerState.CancelSubscribeCallStatusL(); User::RequestComplete(iStatus, KErrCancel); } @@ -182,7 +229,12 @@ BTSAP_TRACE_OPT(KBTSAP_TRACE_INFO, BTSapPrintTrace(_L("[BTSap] TStateConnect: callState: %d"), callState)); // If callState is EPSTelephonyCallStateNone or EPSTelephonyCallStateUninitialized, there's no ongoing call - retVal = (callState != EPSCTsyCallStateNone) && (callState != EPSCTsyCallStateUninitialized); + // should EPSCTsyCallStateDisconnecting be treated as non active call status ??? + // added it here for testing with SAP 1.0 supported carkit. Since there is delay for call status changes from EPSCTsyCallStateDisconnecting + // to EPSCTsyCallStateNone or EPSCTsyCallStateUninitialized. If we do not treat EPSCTsyCallStateDisconnecting as + // Call Inactive status, SAP connection will be dropped and client connects to HFP profile instead. + // could be removed and try if it works with SAP 1.1 clients. + retVal = (callState != EPSCTsyCallStateNone) && (callState != EPSCTsyCallStateUninitialized) && (callState != EPSCTsyCallStateDisconnecting); } else { @@ -264,4 +316,15 @@ iCardStatus = aCardStatus; } +TInt CBTSapServerState::TStateConnect::CallInactive() + { + BTSAP_TRACE_OPT(KBTSAP_TRACE_FUNCTIONS, BTSapPrintTrace(_L("[BTSap] SM: TStateConnect: CallInactive"))); + + if (*iStatus == KRequestPending) + { + User::RequestComplete(iStatus, EConnectionWithoutActiveCall); + } + return KErrNone; + } + // End of File diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btxqservice/btxqservice.pro --- a/bluetoothengine/btxqservice/btxqservice.pro Fri Sep 03 16:17:59 2010 +0300 +++ b/bluetoothengine/btxqservice/btxqservice.pro Wed Sep 29 13:09:05 2010 +0300 @@ -36,7 +36,8 @@ SERVICE.OPTIONS = embeddable \ hidden -libFiles.path = "!:\sys\bin" +libFiles.path = "!:/sys/bin" + DEPLOYMENT += libFiles HEADERS += inc/btxqaddrservice.h \ @@ -56,7 +57,6 @@ BLD_INF_RULES.prj_exports += \ "$${LITERAL_HASH}include " \ - "inc/btxqserviceapi.h MW_LAYER_PLATFORM_EXPORT_PATH(btxqserviceapi.h)" \ "rom/btxqservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(btxqservice.iby)" \ No newline at end of file diff -r 5ebadcda06cb -r 001a94c71129 bluetoothengine/btxqservice/inc/btxqserviceapi.h --- a/bluetoothengine/btxqservice/inc/btxqserviceapi.h Fri Sep 03 16:17:59 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0"" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Bluetooth-services APIs through Qt Service Framework - * - */ - -#ifndef BTXQSERVICEAPI_H -#define BTXQSERVICEAPI_H - -#include - -/*! - todo: this API may need to move to plat_ API folder of its destination package. - */ - -/*! - The Bluetooth service name. - */ -static const QString BluetoothServiceName("btxqservice"); - -/*! - The interface of showing the local Bluetooth device address in a dialog - */ -static const QString BluetoothInterfaceShowLocalAddress("com.nokia.symbian.IShowLocalDeviceAddress"); - -/*! - The operation used for showing the local Bluetooth device address in a dialog - */ -static const QString BluetoothShowLocalAddress("showBTAddr()"); - -/*! - The full service name of showing the local Bluetooth device address in a dialog - */ -static const QString BluetoothServiceShowLocalAddress = - BluetoothServiceName + "." + BluetoothInterfaceShowLocalAddress; - -/*! - The interface of toggling Bluetooth power - */ -static const QString BluetoothInterfaceTogglePower("com.nokia.symbian.ITogglePower"); - -/*! - The operation used for toggling the Bluetooth power - */ -static const QString BluetoothTogglePower("togglePower()"); - -/*! - The full service name of toggling Bluetooth power - */ -static const QString BluetoothServiceTogglePower = - BluetoothServiceName + "." + BluetoothInterfaceTogglePower; - -/*! - The interface of activating Bluetooth device test mode (DUT mode) - */ -static const QString BluetoothInterfaceActivateDutMode("com.nokia.symbian.IActivateDutMode"); - -/*! - The operation used for activating the Bluetooth device test mode (DUT mode) - */ -static const QString ActivateDutMode("activateDeviceTestMode()"); - -/*! - The full service name of activating Bluetooth device test mode (DUT mode) - */ -static const QString BluetoothServiceActivateDutMode = - BluetoothServiceName + "." + BluetoothInterfaceActivateDutMode; - -/*! - The interface of toggling Bluetooth SSP debug mode - */ -static const QString BluetoothInterfaceToggleSspDebugMode("com.nokia.symbian.IToggleSspDebugMode"); - -/*! - The operation used for toggling the Bluetooth SSP debug mode - */ -static const QString ToggleSspDebugMode("toggleSspDebugMode()"); - -/*! - The full service name of toggling Bluetooth SSP debug mode - */ -static const QString BluetoothServiceToggleSspDebugMode = - BluetoothServiceName + "." + BluetoothInterfaceToggleSspDebugMode; - -#endif // BTXQSERVICEAPI_H diff -r 5ebadcda06cb -r 001a94c71129 btservices_plat/bt_xqservice_api/bt_xqservice_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/btservices_plat/bt_xqservice_api/bt_xqservice_api.metaxml Wed Sep 29 13:09:05 2010 +0300 @@ -0,0 +1,13 @@ + + + bt_xqservice_api + The API for using Bluetooth Qt-Highway services. + c++ + bluetoothengine + + + + no + no + + diff -r 5ebadcda06cb -r 001a94c71129 btservices_plat/bt_xqservice_api/bt_xqservice_api.pri --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/btservices_plat/bt_xqservice_api/bt_xqservice_api.pri Wed Sep 29 13:09:05 2010 +0300 @@ -0,0 +1,23 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# + +symbian*: { + # Build.inf rules + BLD_INF_RULES.prj_exports += \ + "$${LITERAL_HASH}include" \ + "bt_xqservice_api/inc/btxqserviceapi.h MW_LAYER_PLATFORM_EXPORT_PATH(btxqserviceapi.h)" +} diff -r 5ebadcda06cb -r 001a94c71129 btservices_plat/bt_xqservice_api/inc/btxqserviceapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/btservices_plat/bt_xqservice_api/inc/btxqserviceapi.h Wed Sep 29 13:09:05 2010 +0300 @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0"" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Bluetooth-services APIs through Qt Service Framework + * + */ + +#ifndef BTXQSERVICEAPI_H +#define BTXQSERVICEAPI_H + +#include + +/*! + todo: this API may need to move to plat_ API folder of its destination package. + */ + +/*! + The Bluetooth service name. + */ +static const QString BluetoothServiceName("btxqservice"); + +/*! + The interface of showing the local Bluetooth device address in a dialog + */ +static const QString BluetoothInterfaceShowLocalAddress("com.nokia.symbian.IShowLocalDeviceAddress"); + +/*! + The operation used for showing the local Bluetooth device address in a dialog + */ +static const QString BluetoothShowLocalAddress("showBTAddr()"); + +/*! + The full service name of showing the local Bluetooth device address in a dialog + */ +static const QString BluetoothServiceShowLocalAddress = + BluetoothServiceName + "." + BluetoothInterfaceShowLocalAddress; + +/*! + The interface of toggling Bluetooth power + */ +static const QString BluetoothInterfaceTogglePower("com.nokia.symbian.ITogglePower"); + +/*! + The operation used for toggling the Bluetooth power + */ +static const QString BluetoothTogglePower("togglePower()"); + +/*! + The full service name of toggling Bluetooth power + */ +static const QString BluetoothServiceTogglePower = + BluetoothServiceName + "." + BluetoothInterfaceTogglePower; + +/*! + The interface of activating Bluetooth device test mode (DUT mode) + */ +static const QString BluetoothInterfaceActivateDutMode("com.nokia.symbian.IActivateDutMode"); + +/*! + The operation used for activating the Bluetooth device test mode (DUT mode) + */ +static const QString BluetoothActivateDutMode("activateDeviceTestMode()"); + +/*! + The operation used for activating the Bluetooth device test mode (DUT mode) + + This API is deprecated and should be removed when the client has migrated to new API. + */ +static const QString ActivateDutMode("activateDeviceTestMode()"); + +/*! + The full service name of activating Bluetooth device test mode (DUT mode) + */ +static const QString BluetoothServiceActivateDutMode = + BluetoothServiceName + "." + BluetoothInterfaceActivateDutMode; + +/*! + The interface of toggling Bluetooth SSP debug mode + */ +static const QString BluetoothInterfaceToggleSspDebugMode("com.nokia.symbian.IToggleSspDebugMode"); + +/*! + The operation used for toggling the Bluetooth SSP debug mode + */ +static const QString BluetoothToggleSspDebugMode("toggleSspDebugMode()"); + +/*! + The operation used for toggling the Bluetooth SSP debug mode. + + This API is deprecated and should be removed when the client has migrated to new API. + */ +static const QString ToggleSspDebugMode("toggleSspDebugMode()"); + +/*! + The full service name of toggling Bluetooth SSP debug mode + */ +static const QString BluetoothServiceToggleSspDebugMode = + BluetoothServiceName + "." + BluetoothInterfaceToggleSspDebugMode; + +#endif // BTXQSERVICEAPI_H diff -r 5ebadcda06cb -r 001a94c71129 btservices_plat/btservices_plat.pro --- a/btservices_plat/btservices_plat.pro Fri Sep 03 16:17:59 2010 +0300 +++ b/btservices_plat/btservices_plat.pro Wed Sep 29 13:09:05 2010 +0300 @@ -19,4 +19,5 @@ symbian*: { include(bt_remote_device_setting_api/bt_remote_device_setting_api.pri) + include(bt_xqservice_api/bt_xqservice_api.pri) }