bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp
branchRCL_3
changeset 11 f7fbeaeb166a
parent 10 b6f55cd40afd
child 12 b23265fb36da
--- a/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp	Wed Mar 31 21:51:05 2010 +0300
+++ b/bluetoothengine/bteng/src/btengsrvsettingsmgr.cpp	Wed Apr 14 16:09:00 2010 +0300
@@ -31,10 +31,6 @@
 #include "btengsrvstate.h"
 #include "debug.h"
 
-#ifndef SETLOCALNAME
-#include <btengsettings.h>
-#endif
-
 /** ID of active object helper */
 const TInt KBTEngSettingsActive = 30;
 /** Constant for converting minutes to microseconds */
@@ -45,14 +41,7 @@
 const TInt64 KBTEngSspDebugModeTimeout = MAKE_TINT64( 0, 1800000000 );
 /**  Timeout for turning BT off automatically. The value is 10.5 seconds. */
 const TInt KBTEngBtAutoOffTimeout = 10500000;
-/**  Default values for Major Service Class */
-const TUint16 KCoDDefaultServiceClass = EMajorServiceTelephony | EMajorServiceObjectTransfer | EMajorServiceNetworking;
-/**  Default values for Major Device Class */
-const TUint8 KCoDDefaultMajorDeviceClass = EMajorDevicePhone;
-/**  Default values for Minor Device Class */
-const TUint8 KCoDDefaultMinorDeviceClass = EMinorDevicePhoneSmartPhone;
-
-
+ 
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -668,31 +657,7 @@
         // Something went wrong, so we turn BT off again.
         SetPowerStateL( EBTOff, EFalse );
         }
-    else
-        {
-        // Write CoD only when the hardware has fully powered up.
-        TBTPowerState currState ( EBTOff );
-        (void) GetHwPowerState( currState );
-        if ( currState == EBTOn )
-            {
-            SetClassOfDeviceL();
-#ifndef SETLOCALNAME 
-            // the macro SETLOCALNAME is used as a workaround to tackle the BT name 
-            // could not be saved to BT chip before chip initialization completed for the first time,
-            // which is one of the regression after improving the BT boot up time. 
-            // To be removed once the final solution is in place. 
-            CBTEngSettings* settings = CBTEngSettings::NewL();
-            TBTDeviceName localName;           
-            localName.Zero();
-            TInt err = settings->GetLocalName(localName);
-            if (err == KErrNone)
-                {
-                settings->SetLocalName(localName);
-                }
-            delete settings;
-#endif
-            }
-        }
+    
     if ( !iMessage.IsNull())
         {
         iMessage.Complete( aStatus );
@@ -914,30 +879,3 @@
         }
     TRACE_FUNC_EXIT 
     }
-
-
-// ---------------------------------------------------------------------------
-// Set the Class of Device.
-// ---------------------------------------------------------------------------
-//
-void CBTEngSrvSettingsMgr::SetClassOfDeviceL()
-    {
-    TRACE_FUNC_ENTRY
-    TUint16 serviceClass = KCoDDefaultServiceClass;
-        // Check from feature manager if stereo audio is enabled.
-    FeatureManager::InitializeLibL();
-    TBool supported = FeatureManager::FeatureSupported( KFeatureIdBtStereoAudio );
-    FeatureManager::UnInitializeLib();
-    if( supported )
-        {
-        // A2DP spec says we should set this bit as we are a SRC
-        serviceClass |= EMajorServiceCapturing;
-        }
-        // These values may nayway be overridden by HCI
-    TBTDeviceClass cod( serviceClass, KCoDDefaultMajorDeviceClass, 
-                         KCoDDefaultMinorDeviceClass );
-        // Ignore error, it is non-critical
-    (void) RProperty::Set( KPropertyUidBluetoothControlCategory, 
-                            KPropertyKeyBluetoothSetDeviceClass, cod.DeviceClass() );
-    TRACE_FUNC_EXIT
-    }