bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp
changeset 41 0b2439c3e397
parent 19 43824b19ee35
child 70 f5508c13dfe0
--- a/bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp	Wed Jun 23 18:23:52 2010 +0300
+++ b/bluetoothengine/bteng/btbearer/src/btpluginnotifier.cpp	Tue Jul 06 14:27:09 2010 +0300
@@ -24,6 +24,8 @@
 #include "debug.h"
 #include <btfeaturescfg.h>
 #include <btnotifclient.h>
+#include "btindicatorconstants.h"
+#include <hbsymbianvariant.h>
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -60,6 +62,7 @@
 	delete repository;
 	
 	CBTEngSettings* settings = CBTEngSettings::NewL();
+	iBTIndicator = CHbIndicatorSymbian::NewL(); 
 	
 	BluetoothFeatures::TEnterpriseEnablementMode mode = BluetoothFeatures::EnterpriseEnablementL();
 	TRACE_INFO( ( _L( "mode = %d" ), mode) )
@@ -78,6 +81,14 @@
         {
         TRACE_INFO( ( _L( "Turning BT off" ) ) )
         (void) settings->SetPowerState( EBTPowerOff );	// Result is not important here
+        TInt state =  EBTIndicatorOff;
+        CHbSymbianVariant* parameters = CHbSymbianVariant::NewL(&state,CHbSymbianVariant::EInt );
+        TBool success = iBTIndicator->Activate(KIndicatorType(),parameters); 
+        delete parameters;
+        if(!success)
+            {
+            User::Leave(iBTIndicator->Error());
+            }
         }
     delete settings;
 	if ( mode != BluetoothFeatures::EDisabled ) // only subscribe if there's any point (NB changing Enterprise Disabling mode requires a reboot)
@@ -112,6 +123,7 @@
     TRACE_FUNC_ENTRY
     Cancel();
     delete iSession;
+    delete iBTIndicator;
     }