Remove FuseBridgeLoop class.

Bug: 32779923
Test: libappfuse_test
Change-Id: I29a76701d141ae061ec1fe32993d27460a0c694a
This commit is contained in:
Daichi Hirono 2016-11-15 15:42:05 +09:00
parent 30e6808895
commit 691739b334
2 changed files with 10 additions and 25 deletions

View file

@ -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 @@ bool FuseBridgeLoop::Start(
}
}
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

View file

@ -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);