aboutsummaryrefslogtreecommitdiff
path: root/gd/security/l2cap_security_module_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'gd/security/l2cap_security_module_interface.h')
-rw-r--r--gd/security/l2cap_security_module_interface.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/gd/security/l2cap_security_module_interface.h b/gd/security/l2cap_security_module_interface.h
new file mode 100644
index 000000000..9a8fc8e97
--- /dev/null
+++ b/gd/security/l2cap_security_module_interface.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include "l2cap/classic/security_enforcement_interface.h"
+#include "l2cap/le/security_enforcement_interface.h"
+#include "os/handler.h"
+#include "security/internal/security_manager_impl.h"
+
+namespace bluetooth {
+namespace security {
+class L2capSecurityModuleInterface : public l2cap::classic::SecurityEnforcementInterface,
+ public l2cap::le::SecurityEnforcementInterface {
+ public:
+ L2capSecurityModuleInterface(internal::SecurityManagerImpl* security_manager_impl, os::Handler* security_handler);
+ void Enforce(hci::AddressWithType remote, l2cap::classic::SecurityPolicy policy,
+ l2cap::classic::SecurityEnforcementInterface::ResultCallback result_callback) override;
+ void Enforce(hci::AddressWithType remote, l2cap::le::SecurityPolicy policy,
+ l2cap::le::SecurityEnforcementInterface::ResultCallback result_callback) override;
+
+ private:
+ internal::SecurityManagerImpl* security_manager_impl_;
+ os::Handler* security_handler_ = nullptr;
+};
+
+} // namespace security
+} // namespace bluetooth