Remove FuseBridgeLoop class.
Bug: 32779923
Test: libappfuse_test
Change-Id: I29a76701d141ae061ec1fe32993d27460a0c694a
diff --git a/libappfuse/FuseBridgeLoop.cc b/libappfuse/FuseBridgeLoop.cc
index beee4a6..2386bf8 100644
--- a/libappfuse/FuseBridgeLoop.cc
+++ b/libappfuse/FuseBridgeLoop.cc
@@ -20,12 +20,13 @@
#include <android-base/unique_fd.h>
namespace android {
+namespace fuse {
-bool FuseBridgeLoop::Start(
- int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoop::Callback* callback) {
+bool StartFuseBridgeLoop(
+ int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoopCallback* callback) {
base::unique_fd dev_fd(raw_dev_fd);
base::unique_fd proxy_fd(raw_proxy_fd);
- fuse::FuseBuffer buffer;
+ FuseBuffer buffer;
size_t open_count = 0;
LOG(DEBUG) << "Start fuse loop.";
@@ -96,12 +97,5 @@
}
}
-namespace fuse {
-
-bool StartFuseBridgeLoop(
- int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoopCallback* callback) {
- return FuseBridgeLoop().Start(raw_dev_fd, raw_proxy_fd, callback);
-}
-
} // namespace fuse
} // namespace android
diff --git a/libappfuse/include/libappfuse/FuseBridgeLoop.h b/libappfuse/include/libappfuse/FuseBridgeLoop.h
index 38043bc..1f71cf2 100644
--- a/libappfuse/include/libappfuse/FuseBridgeLoop.h
+++ b/libappfuse/include/libappfuse/FuseBridgeLoop.h
@@ -20,23 +20,14 @@
#include "libappfuse/FuseBuffer.h"
namespace android {
-
-// TODO: Remove the class after switching to StartFuseBridgeLoop in the
-// framework code.
-class FuseBridgeLoop final {
- public:
- class Callback {
- public:
- virtual void OnMount() = 0;
- virtual ~Callback() = default;
- };
-
- bool Start(int dev_fd, int proxy_fd, Callback* callback);
-};
-
namespace fuse {
-class FuseBridgeLoopCallback : public FuseBridgeLoop::Callback {};
+class FuseBridgeLoopCallback {
+ public:
+ virtual void OnMount() = 0;
+ virtual ~FuseBridgeLoopCallback() = default;
+};
+
bool StartFuseBridgeLoop(
int dev_fd, int proxy_fd, FuseBridgeLoopCallback* callback);