bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp
branchRCL_3
changeset 10 b6f55cd40afd
parent 6 6a29d5ad0713
child 11 f7fbeaeb166a
--- a/bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp	Mon Mar 15 12:41:15 2010 +0200
+++ b/bluetoothengine/btnotif/src/BTNGenericInfoNotifier.cpp	Wed Mar 31 21:51:05 2010 +0300
@@ -85,10 +85,13 @@
 TPtrC8 CBTGenericInfoNotifier::StartL( const TDesC8& aBuffer )
     {
     FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::StartL()"));
- 	ProcessParamBufferL(aBuffer);
+    if( !iNotifUiUtil )
+        {
+        iNotifUiUtil = CBTNotifUIUtil::NewL( iIsCoverUI );
+        }
+    ProcessParamBufferL(aBuffer, ETrue);
+    FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::StartL() completed"));
 
-	FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::StartL() completed"));
-	
     TPtrC8 ret(KNullDesC8);
     return (ret);
     }
@@ -109,7 +112,7 @@
 	    return;
 	    }
     iMessage = aMessage;
- 	ProcessParamBufferL(aBuffer);
+ 	ProcessParamBufferL(aBuffer, EFalse);
     }
 
 // ----------------------------------------------------------
@@ -117,10 +120,10 @@
 // Parse the data out of the message that is sent by the
 // client of the notifier.
 // ----------------------------------------------------------
-void CBTGenericInfoNotifier::ProcessParamBufferL(const TDesC8& aBuffer)
+void CBTGenericInfoNotifier::ProcessParamBufferL(const TDesC8& aBuffer, TBool aSyncCall)
 	{
 	TBTGenericInfoNotifierParams bParams;
-	TPckgC<TBTGenericInfoNotifierParams> bPckg(bParams);	
+	TPckgC<TBTGenericInfoNotifierParams> bPckg(bParams);
 		
 	bPckg.Set( aBuffer );
 	iSecondaryDisplayCommand = ECmdBTnotifUnavailable;
@@ -222,7 +225,7 @@
 		}
 	else
 	    {
-	    ShowNoteAndCompleteL();
+	    ShowNoteAndCompleteL(aSyncCall);
 	    }
 	}
 	
@@ -231,10 +234,13 @@
 // Shows the notifier in backround 
 // ----------------------------------------------------------
 //
-void CBTGenericInfoNotifier::ShowNoteAndCompleteL()
+void CBTGenericInfoNotifier::ShowNoteAndCompleteL(TBool aSyncCall)
 	{
 	iNotifUiUtil->ShowInfoNoteL( iQueryMessage, iSecondaryDisplayCommand );
-    CompleteMessage(KErrNone);
+	if (!aSyncCall)
+		{
+        CompleteMessage(KErrNone);
+        }
     FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::ShowNoteAndComplete() complete"));
 	}
 
@@ -248,7 +254,7 @@
     BluetoothUiUtil::LoadResourceAndSubstringL( 
             iQueryMessage, iMessageResourceId, name, 0);      
     
-    ShowNoteAndCompleteL();
+    ShowNoteAndCompleteL(EFalse);
 
     FLOG(_L("[BTNOTIF]\t CBTGenericInfoNotifier::HandleGetDeviceComplete() Complete"));        
     }