bluetooth/btstack/linkmgr/hcifacade_events.cpp
changeset 50 0bcc0c74cec9
parent 32 f72906e669b4
child 56 015fa7494bd2
--- a/bluetooth/btstack/linkmgr/hcifacade_events.cpp	Fri Sep 17 08:36:02 2010 +0300
+++ b/bluetooth/btstack/linkmgr/hcifacade_events.cpp	Mon Oct 04 02:11:29 2010 +0300
@@ -80,6 +80,7 @@
 #include <bluetooth/hci/vendordebugcompleteevent.h>
 #include <bluetooth/hci/writesimplepairingmodecommand.h>
 #include <bluetooth/hci/readlocalsupportedcommandscommand.h>
+#include <bluetooth/hci/encryptionkeyrefreshcompleteevent.h>
 
 
 // Command Complete Events
@@ -1220,6 +1221,14 @@
 	iLinksMgr->MaxSlotsChange(maxSlotsChangeEvent.ConnectionHandle(), maxSlotsChangeEvent.LMPMaxSlots());
 	}
 
+void CHCIFacade::EncryptionKeyRefreshCompleteEvent(const THCIEventBase& aEvent, const CHCICommandBase* /*aRelatedCommand*/)
+	{
+	LOG_FUNC
+	const TEncryptionKeyRefreshCompleteEvent& refreshCompleteEvent = TEncryptionKeyRefreshCompleteEvent::Cast(aEvent);
+
+	iLinksMgr->EncryptionKeyRefreshComplete(aEvent.ErrorCode(), refreshCompleteEvent.ConnectionHandle());
+	}
+
 // ----------------------------------------------------------------------------
 // Data event processing functions
 // ----------------------------------------------------------------------------
@@ -1347,6 +1356,10 @@
 	case EVendorDebugEvent:
 		VendorDebugEvent(aEvent, aRelatedCommand);
 		break;
+		
+	case EEncryptionKeyRefreshCompleteEvent:		
+		EncryptionKeyRefreshCompleteEvent(aEvent, aRelatedCommand);
+		break;
 
 	// Inquiry based events.
 	// By default these should be caused by the inquiry manager and so be returned to it.
@@ -1382,7 +1395,6 @@
 	case EPageScanModeChangeEvent:
 	case EPageScanRepetitionModeChangeEvent:
 	case EUserPasskeyRequestEvent:
-	case EEncryptionKeyRefreshCompleteEvent:		
 		LOG1(_L("Warning!! Unhandled Command Event (event code:%d)"), aEvent.EventCode());
 		break;