• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 #ifndef STORAGE_FILE_MANAGER_NAPI_DEF_H
16 #define STORAGE_FILE_MANAGER_NAPI_DEF_H
17 #include "n_async_work_callback.h"
18 #include "n_async_work_promise.h"
19 #include "n_func_arg.h"
20 #include "uni_error.h"
21 
22 namespace OHOS {
23 namespace FileManagerService {
24 enum CreateFileArgs {
25     CF_PATH = 0,
26     CF_FILENAME = 1,
27     CF_OPTION = 2,
28     CF_CALLBACK_WITHOUT_OP = 2,
29     CF_CALLBACK_WITH_OP = 3,
30 };
31 
32 enum GetRootArgs {
33     GR_OPTION = 0,
34     GR_CALLBACK_WITHOUT_OP = 0,
35     GR_CALLBACK_WITH_OP = 1,
36 };
37 
38 enum ListFileArgs {
39     LF_PATH = 0,
40     LF_TYPE = 1,
41     LF_OPTION = 2,
42     LF_CALLBACK_WITHOUT_OP = 2,
43     LF_CALLBACK_WITH_OP = 3,
44 };
45 
46 constexpr int CREATE_FILE_PARA_MAX = 4;
47 constexpr int CREATE_FILE_PARA_MIN = 2;
48 constexpr int GET_ROOT_PARA_MAX = 2;
49 constexpr int GET_ROOT_PARA_MIN = 0;
50 constexpr int LIST_FILE_PARA_MAX = 4;
51 constexpr int LIST_FILE_PARA_MIN = 2;
52 } // namespace FileManagerService
53 } // namespace OHOS
54 #endif // STORAGE_FILE_MANAGER_NAPI_DEF_H
55