• 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
16/**
17 * The result of requestPermissionsFromUser with asynchronous callback.
18 *
19 * @syscap SystemCapability.Security.AccessToken
20 * @StageModelOnly
21 * @since 9
22 */
23/**
24 * The result of requestPermissionsFromUser with asynchronous callback.
25 *
26 * @syscap SystemCapability.Security.AccessToken
27 * @StageModelOnly
28 * @crossplatform
29 * @since 10
30 */
31/**
32 * The result of requestPermissionsFromUser with asynchronous callback.
33 *
34 * @syscap SystemCapability.Security.AccessToken
35 * @StageModelOnly
36 * @crossplatform
37 * @atomicservice
38 * @since 11
39 */
40export default class PermissionRequestResult {
41  /**
42   * The permissions passed in by the user.
43   *
44   * @syscap SystemCapability.Security.AccessToken
45   * @StageModelOnly
46   * @since 9
47   */
48  /**
49   * The permissions passed in by the user.
50   *
51   * @syscap SystemCapability.Security.AccessToken
52   * @StageModelOnly
53   * @crossplatform
54   * @since 10
55   */
56  /**
57   * The permissions passed in by the user.
58   *
59   * @syscap SystemCapability.Security.AccessToken
60   * @StageModelOnly
61   * @crossplatform
62   * @atomicservice
63   * @since 11
64   */
65  permissions: Array<string>;
66
67  /**
68   * The results for the corresponding request permissions. The value 0 indicates that a
69   * permission is granted, and the value -1 indicates not.
70   *
71   * @syscap SystemCapability.Security.AccessToken
72   * @StageModelOnly
73   * @since 9
74   */
75  /**
76   * The results for the corresponding request permissions. The value 0 indicates that a
77   * permission is granted, and the value -1 indicates not.
78   *
79   * @syscap SystemCapability.Security.AccessToken
80   * @StageModelOnly
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * The results for the corresponding request permissions. The value 0 indicates that a
86   * permission is granted, and the value -1 indicates not.
87   *
88   * @syscap SystemCapability.Security.AccessToken
89   * @StageModelOnly
90   * @crossplatform
91   * @atomicservice
92   * @since 11
93   */
94  authResults: Array<number>;
95}