Merge "Remove FuseBridgeLoop class."
This commit is contained in:
commit
5368723cf3
2 changed files with 10 additions and 25 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue