• 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 * MissionCallback registered by app.
18 *
19 * @name MissionCallback
20 * @since 9
21 * @syscap SystemCapability.Ability.AbilityRuntime.Mission
22 * @permission ohos.permission.MANAGE_MISSIONS
23 * @systemapi hide for inner use.
24 */
25 export interface MissionCallback {
26    /**
27     * Called by system when mission changed.
28     *
29     * @since 9
30     * @syscap SystemCapability.Ability.AbilityRuntime.Mission
31     * @param deviceId Indicates the deviceId mission changed.
32     */
33    notifyMissionsChanged(deviceId: string): void;
34
35    /**
36     * Called by system when snapshot changed.
37     *
38     * @since 9
39     * @syscap SystemCapability.Ability.AbilityRuntime.Mission
40     * @param deviceId Indicates the deviceId mission changed.
41     * @param mission Indicates the id of destroyed mission.
42     */
43    notifySnapshot(deviceId: string, mission: number): void;
44
45    /**
46     * Called by system when network disconnect.
47     *
48     * @since 9
49     * @syscap SystemCapability.Ability.AbilityRuntime.Mission
50     * @param deviceId Indicates the deviceId mission changed.
51     * @param state Indicates the state of network
52     */
53    notifyNetDisconnect(deviceId: string, state: number): void;
54}