summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Hirono2016-11-15 00:42:05 -0600
committerDaichi Hirono2016-11-16 18:49:51 -0600
commit691739b334f3efab38f82f2922ee4039462fec25 (patch)
tree7aaa276c9bbe559aa28f4aebcf311b6105f3ddf0
parent30e68088951f17ad54c1d15576835ff4eb622c4c (diff)
downloadplatform-system-core-691739b334f3efab38f82f2922ee4039462fec25.tar.gz
platform-system-core-691739b334f3efab38f82f2922ee4039462fec25.tar.xz
platform-system-core-691739b334f3efab38f82f2922ee4039462fec25.zip
Remove FuseBridgeLoop class.
Bug: 32779923 Test: libappfuse_test Change-Id: I29a76701d141ae061ec1fe32993d27460a0c694a
-rw-r--r--libappfuse/FuseBridgeLoop.cc14
-rw-r--r--libappfuse/include/libappfuse/FuseBridgeLoop.h17
2 files changed, 8 insertions, 23 deletions
diff --git a/libappfuse/FuseBridgeLoop.cc b/libappfuse/FuseBridgeLoop.cc
index beee4a6f5..2386bf84b 100644
--- a/libappfuse/FuseBridgeLoop.cc
+++ b/libappfuse/FuseBridgeLoop.cc
@@ -20,12 +20,13 @@
20#include <android-base/unique_fd.h> 20#include <android-base/unique_fd.h>
21 21
22namespace android { 22namespace android {
23namespace fuse {
23 24
24bool FuseBridgeLoop::Start( 25bool StartFuseBridgeLoop(
25 int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoop::Callback* callback) { 26 int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoopCallback* callback) {
26 base::unique_fd dev_fd(raw_dev_fd); 27 base::unique_fd dev_fd(raw_dev_fd);
27 base::unique_fd proxy_fd(raw_proxy_fd); 28 base::unique_fd proxy_fd(raw_proxy_fd);
28 fuse::FuseBuffer buffer; 29 FuseBuffer buffer;
29 size_t open_count = 0; 30 size_t open_count = 0;
30 31
31 LOG(DEBUG) << "Start fuse loop."; 32 LOG(DEBUG) << "Start fuse loop.";
@@ -96,12 +97,5 @@ bool FuseBridgeLoop::Start(
96 } 97 }
97} 98}
98 99
99namespace fuse {
100
101bool StartFuseBridgeLoop(
102 int raw_dev_fd, int raw_proxy_fd, FuseBridgeLoopCallback* callback) {
103 return FuseBridgeLoop().Start(raw_dev_fd, raw_proxy_fd, callback);
104}
105
106} // namespace fuse 100} // namespace fuse
107} // namespace android 101} // namespace android
diff --git a/libappfuse/include/libappfuse/FuseBridgeLoop.h b/libappfuse/include/libappfuse/FuseBridgeLoop.h
index 38043bce7..1f71cf272 100644
--- a/libappfuse/include/libappfuse/FuseBridgeLoop.h
+++ b/libappfuse/include/libappfuse/FuseBridgeLoop.h
@@ -20,23 +20,14 @@
20#include "libappfuse/FuseBuffer.h" 20#include "libappfuse/FuseBuffer.h"
21 21
22namespace android { 22namespace android {
23namespace fuse {
23 24
24// TODO: Remove the class after switching to StartFuseBridgeLoop in the 25class FuseBridgeLoopCallback {
25// framework code.
26class FuseBridgeLoop final {
27 public: 26 public:
28 class Callback { 27 virtual void OnMount() = 0;
29 public: 28 virtual ~FuseBridgeLoopCallback() = default;
30 virtual void OnMount() = 0;
31 virtual ~Callback() = default;
32 };
33
34 bool Start(int dev_fd, int proxy_fd, Callback* callback);
35}; 29};
36 30
37namespace fuse {
38
39class FuseBridgeLoopCallback : public FuseBridgeLoop::Callback {};
40bool StartFuseBridgeLoop( 31bool StartFuseBridgeLoop(
41 int dev_fd, int proxy_fd, FuseBridgeLoopCallback* callback); 32 int dev_fd, int proxy_fd, FuseBridgeLoopCallback* callback);
42 33