summaryrefslogtreecommitdiffstats
path: root/minadbd/fuse_adb_provider.h
diff options
context:
space:
mode:
Diffstat (limited to 'minadbd/fuse_adb_provider.h')
-rw-r--r--minadbd/fuse_adb_provider.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/minadbd/fuse_adb_provider.h b/minadbd/fuse_adb_provider.h
index 3fb689bd4..c5561e57d 100644
--- a/minadbd/fuse_adb_provider.h
+++ b/minadbd/fuse_adb_provider.h
@@ -14,25 +14,22 @@
* limitations under the License.
*/
-#ifndef __FUSE_ADB_PROVIDER_H
-#define __FUSE_ADB_PROVIDER_H
+#pragma once
#include <stdint.h>
-#include "android-base/unique_fd.h"
-
#include "fuse_provider.h"
// This class reads data from adb server.
class FuseAdbDataProvider : public FuseDataProvider {
public:
- FuseAdbDataProvider(android::base::unique_fd&& fd, uint64_t file_size, uint32_t block_size)
- : FuseDataProvider(std::move(fd), file_size, block_size) {}
+ FuseAdbDataProvider(int fd, uint64_t file_size, uint32_t block_size)
+ : FuseDataProvider(file_size, block_size), fd_(fd) {}
bool ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size,
uint32_t start_block) const override;
- void Close() override;
+ private:
+ // The underlying source to read data from (i.e. the one that talks to the host).
+ int fd_;
};
-
-#endif