OSDN Git Service

Include rfcdefs and add btm_client_interface
authorChris Manton <cmanton@google.com>
Sun, 17 Jan 2021 22:16:01 +0000 (14:16 -0800)
committerChris Manton <cmanton@google.com>
Wed, 20 Jan 2021 02:54:12 +0000 (18:54 -0800)
Towards including what you use

Bug: 163134718
Tag: #refactor
Test: gd/cert/run
Change-Id: Ia3f3c5d7d803a39272727f2a3a9a93febd0efad9

stack/test/common/mock_btm_layer.cc

index 74b5a5a..7c3ae2e 100644 (file)
@@ -17,6 +17,8 @@
  ******************************************************************************/
 
 #include "mock_btm_layer.h"
+#include "stack/include/btm_client_interface.h"
+#include "stack/include/rfcdefs.h"
 
 static bluetooth::manager::MockBtmSecurityInternalInterface*
     btm_security_internal_interface = nullptr;
@@ -48,3 +50,14 @@ bool BTM_SetSecurityLevel(bool is_originator, const char* p_name,
 uint16_t BTM_GetMaxPacketSize(const RawAddress& addr) {
   return RFCOMM_DEFAULT_MTU;
 }
+
+struct btm_client_interface_s btm_client_interface = {
+    .peer =
+        {
+            .BTM_GetMaxPacketSize = BTM_GetMaxPacketSize,
+        },
+};
+
+struct btm_client_interface_s& get_btm_client_interface() {
+  return btm_client_interface;
+}