• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  * epfs.h, keep same with fs/epfs/epfs.h
16  *
17  */
18 
19 #ifndef OHOS_FILEMANAGEMENT_EPFS_H
20 #define OHOS_FILEMANAGEMENT_EPFS_H
21 
22 #include <cstdint>
23 #include <sys/ioctl.h>
24 
25 namespace OHOS {
26 namespace Media {
27 constexpr uint64_t PRIVACY_MAX_RANGES = 127;
28 
29 struct __attribute__((packed)) FilterProxyRanges {
30     uint64_t size;
31     uint64_t reserved; // reserve more space
32     struct {
33         uint64_t begin;
34         uint64_t end;
35     } range[0];
36 };
37 
38 #define EPFS_IOCTL_MAGIC                  0x71
39 #define IOC_SET_ORIGIN_FD                 _IOW(EPFS_IOCTL_MAGIC, 1, int32_t)
40 #define IOC_SET_FILTER_PROXY_RANGE        _IOW(EPFS_IOCTL_MAGIC, 2, FilterProxyRanges)
41 #define EPFS_IOCTL_MAXNR 3
42 } // namespace Media
43 } // namespace OHOS
44 #endif // OHOS_FILEMANAGEMENT_EPFS_H
45