summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Hirono2016-10-27 00:57:55 -0500
committerDaichi Hirono2016-10-27 01:04:15 -0500
commitc6134762975204ceebcf7949e364484833714345 (patch)
treeed01ec85a5175e2985e5e62986500da138d09d1d /libappfuse/include/libappfuse/FuseBridgeLoop.h
parent7f8e819ded361e963df7aa648ca2c6d49c7b46b6 (diff)
downloadplatform-system-core-c6134762975204ceebcf7949e364484833714345.tar.gz
platform-system-core-c6134762975204ceebcf7949e364484833714345.tar.xz
platform-system-core-c6134762975204ceebcf7949e364484833714345.zip
Add FuseBridgeLoop to libappfuse.
The CL adds FuseBridgeLoop class to libappfuse, which is used in the system service to proxy fuse commands to applications. Bug: 29970149 Test: libappfuse_test Change-Id: I0708f608b3868721ab16ba4028fd2c17a6735af7
Diffstat (limited to 'libappfuse/include/libappfuse/FuseBridgeLoop.h')
-rw-r--r--libappfuse/include/libappfuse/FuseBridgeLoop.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libappfuse/include/libappfuse/FuseBridgeLoop.h b/libappfuse/include/libappfuse/FuseBridgeLoop.h
new file mode 100644
index 000000000..200653252
--- /dev/null
+++ b/libappfuse/include/libappfuse/FuseBridgeLoop.h
@@ -0,0 +1,40 @@
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specic language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_LIBAPPFUSE_FUSEBRIDGELOOP_H_
18#define ANDROID_LIBAPPFUSE_FUSEBRIDGELOOP_H_
19
20#include "libappfuse/FuseBuffer.h"
21
22namespace android {
23
24class FuseBridgeLoop {
25 public:
26 class Callback {
27 public:
28 virtual void OnMount() = 0;
29 virtual ~Callback() = default;
30 };
31
32 bool Start(int dev_fd, int proxy_fd, Callback* callback);
33
34 private:
35 FuseBuffer buffer_;
36};
37
38} // namespace android
39
40#endif // ANDROID_LIBAPPFUSE_FUSEBRIDGELOOP_H_