• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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*/
15import { AsyncCallback, Callback } from './../basic';
16
17declare namespace napitest {
18    export enum GrantStatus {
19        PERMISSION_DEFAULT = "",
20        PERMISSION_DENIED = "-1",
21        PERMISSION_GRANTED = "2",
22        PERMISSION_PASS = "3",
23    }
24
25    export enum LaunchReason {
26        UNKNOWN = 0,
27        START_ABILITY = 1,
28        CALL = 2,
29        CONTINUATION = 3,
30    }
31
32    export enum Action {
33        ACTION_HOME = "ohos.want.action.home",
34        ACTION_DIAL = "ohos.want.action.dial",
35        ACTION_SEARCH = "ohos.want.action.search",
36    }
37
38    export enum PlayingState {
39        STATE_NOT_PLAYING,
40        STATE_PLAYING,
41    }
42    function fun1(v0: string, v1: GrantStatus): GrantStatus;
43    function fun2(v0: number, v1: LaunchReason): LaunchReason;
44    function fun3(v0: string, v1: Action): Action;
45    function fun4(v0: number, v1: PlayingState): PlayingState;
46    function fun5(V0: string, callback: Callback<LaunchReason>): void;
47    function fun6(v0: string, callback: AsyncCallback<GrantStatus>): void;
48    function fun6(v0: string): Promise<GrantStatus>;
49    /*function fun7(v0: LaunchReason[], v1: LaunchReason): number;*/
50
51}
52
53export default napitest;
54
55