161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit DistributedServiceKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base';
2261847f8eSopenharmony_ciimport { Callback } from './@ohos.base';
2361847f8eSopenharmony_ci
2461847f8eSopenharmony_ci/**
2561847f8eSopenharmony_ci * Implements screen hopping operation management.
2661847f8eSopenharmony_ci *
2761847f8eSopenharmony_ci * @namespace cooperate
2861847f8eSopenharmony_ci * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
2961847f8eSopenharmony_ci * @systemapi Hide this for inner system use.
3061847f8eSopenharmony_ci * @since 10
3161847f8eSopenharmony_ci */
3261847f8eSopenharmony_cideclare namespace cooperate {
3361847f8eSopenharmony_ci  /**
3461847f8eSopenharmony_ci   * Enumerates screen hopping message notifications.
3561847f8eSopenharmony_ci   *
3661847f8eSopenharmony_ci   * @enum { number }
3761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
3861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
3961847f8eSopenharmony_ci   * @since 10
4061847f8eSopenharmony_ci   * @deprecated since 11
4161847f8eSopenharmony_ci   * @useinstead cooperate#CooperateState
4261847f8eSopenharmony_ci   */
4361847f8eSopenharmony_ci  enum CooperateMsg {
4461847f8eSopenharmony_ci    /**
4561847f8eSopenharmony_ci     * Preparing for screen hopping.
4661847f8eSopenharmony_ci     *
4761847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
4861847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
4961847f8eSopenharmony_ci     * @since 10
5061847f8eSopenharmony_ci     * @deprecated since 11
5161847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_PREPARE
5261847f8eSopenharmony_ci     */
5361847f8eSopenharmony_ci    COOPERATE_PREPARE = 0,
5461847f8eSopenharmony_ci
5561847f8eSopenharmony_ci    /**
5661847f8eSopenharmony_ci     * Canceling the preparation for screen hopping.
5761847f8eSopenharmony_ci     *
5861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
5961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
6061847f8eSopenharmony_ci     * @since 10
6161847f8eSopenharmony_ci     * @deprecated since 11
6261847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_UNPREPARE
6361847f8eSopenharmony_ci     */
6461847f8eSopenharmony_ci    COOPERATE_UNPREPARE = 1,
6561847f8eSopenharmony_ci
6661847f8eSopenharmony_ci    /**
6761847f8eSopenharmony_ci     * Starting screen hopping.
6861847f8eSopenharmony_ci     *
6961847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
7061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
7161847f8eSopenharmony_ci     * @since 10
7261847f8eSopenharmony_ci     * @deprecated since 11
7361847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_ACTIVATE
7461847f8eSopenharmony_ci     */
7561847f8eSopenharmony_ci    COOPERATE_ACTIVATE = 2,
7661847f8eSopenharmony_ci
7761847f8eSopenharmony_ci    /**
7861847f8eSopenharmony_ci     * Success in starting screen hopping.
7961847f8eSopenharmony_ci     *
8061847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
8161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
8261847f8eSopenharmony_ci     * @since 10
8361847f8eSopenharmony_ci     * @deprecated since 11
8461847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_ACTIVATE_SUCCESS
8561847f8eSopenharmony_ci     */
8661847f8eSopenharmony_ci    COOPERATE_ACTIVATE_SUCCESS = 3,
8761847f8eSopenharmony_ci
8861847f8eSopenharmony_ci    /**
8961847f8eSopenharmony_ci     * Failure to start screen hopping.
9061847f8eSopenharmony_ci     *
9161847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
9261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
9361847f8eSopenharmony_ci     * @since 10
9461847f8eSopenharmony_ci     * @deprecated since 11
9561847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_ACTIVATE_FAILURE
9661847f8eSopenharmony_ci     */
9761847f8eSopenharmony_ci    COOPERATE_ACTIVATE_FAIL = 4,
9861847f8eSopenharmony_ci
9961847f8eSopenharmony_ci    /**
10061847f8eSopenharmony_ci     * Success in stopping screen hopping.
10161847f8eSopenharmony_ci     *
10261847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
10361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
10461847f8eSopenharmony_ci     * @since 10
10561847f8eSopenharmony_ci     * @deprecated since 11
10661847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_DEACTIVATE_SUCCESS
10761847f8eSopenharmony_ci     */
10861847f8eSopenharmony_ci    COOPERATE_DEACTIVATE_SUCCESS = 5,
10961847f8eSopenharmony_ci
11061847f8eSopenharmony_ci    /**
11161847f8eSopenharmony_ci     * Failure to stop screen hopping.
11261847f8eSopenharmony_ci     *
11361847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
11461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
11561847f8eSopenharmony_ci     * @since 10
11661847f8eSopenharmony_ci     * @deprecated since 11
11761847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_DEACTIVATE_FAILURE
11861847f8eSopenharmony_ci     */
11961847f8eSopenharmony_ci    COOPERATE_DEACTIVATE_FAIL = 6,
12061847f8eSopenharmony_ci
12161847f8eSopenharmony_ci    /**
12261847f8eSopenharmony_ci     * Inter-device session disconnected.
12361847f8eSopenharmony_ci     *
12461847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
12561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
12661847f8eSopenharmony_ci     * @since 10
12761847f8eSopenharmony_ci     * @deprecated since 11
12861847f8eSopenharmony_ci     * @useinstead cooperate.CooperateState#COOPERATE_SESSION_DISCONNECTED
12961847f8eSopenharmony_ci     */
13061847f8eSopenharmony_ci    COOPERATE_SESSION_DISCONNECTED = 7,
13161847f8eSopenharmony_ci  }
13261847f8eSopenharmony_ci
13361847f8eSopenharmony_ci  /**
13461847f8eSopenharmony_ci   * Enumerates the screen hopping states.
13561847f8eSopenharmony_ci   *
13661847f8eSopenharmony_ci   * @enum { number }
13761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
13861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
13961847f8eSopenharmony_ci   * @since 11
14061847f8eSopenharmony_ci   */
14161847f8eSopenharmony_ci  enum CooperateState {
14261847f8eSopenharmony_ci    /**
14361847f8eSopenharmony_ci     * Preparing for screen hopping.
14461847f8eSopenharmony_ci     *
14561847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
14661847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
14761847f8eSopenharmony_ci     * @since 11
14861847f8eSopenharmony_ci     */
14961847f8eSopenharmony_ci    COOPERATE_PREPARE = 0,
15061847f8eSopenharmony_ci
15161847f8eSopenharmony_ci    /**
15261847f8eSopenharmony_ci     * Canceling the preparation for screen hopping.
15361847f8eSopenharmony_ci     *
15461847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
15561847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
15661847f8eSopenharmony_ci     * @since 11
15761847f8eSopenharmony_ci     */
15861847f8eSopenharmony_ci    COOPERATE_UNPREPARE = 1,
15961847f8eSopenharmony_ci
16061847f8eSopenharmony_ci    /**
16161847f8eSopenharmony_ci     * Starting screen hopping.
16261847f8eSopenharmony_ci     *
16361847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
16461847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
16561847f8eSopenharmony_ci     * @since 11
16661847f8eSopenharmony_ci     */
16761847f8eSopenharmony_ci    COOPERATE_ACTIVATE = 2,
16861847f8eSopenharmony_ci
16961847f8eSopenharmony_ci    /**
17061847f8eSopenharmony_ci     * Success in starting screen hopping.
17161847f8eSopenharmony_ci     *
17261847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
17361847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
17461847f8eSopenharmony_ci     * @since 11
17561847f8eSopenharmony_ci     */
17661847f8eSopenharmony_ci    COOPERATE_ACTIVATE_SUCCESS = 3,
17761847f8eSopenharmony_ci
17861847f8eSopenharmony_ci    /**
17961847f8eSopenharmony_ci     * Failure to start screen hopping.
18061847f8eSopenharmony_ci     *
18161847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
18261847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
18361847f8eSopenharmony_ci     * @since 11
18461847f8eSopenharmony_ci     */
18561847f8eSopenharmony_ci    COOPERATE_ACTIVATE_FAILURE = 4,
18661847f8eSopenharmony_ci
18761847f8eSopenharmony_ci    /**
18861847f8eSopenharmony_ci     * Success in stopping screen hopping.
18961847f8eSopenharmony_ci     *
19061847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
19161847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
19261847f8eSopenharmony_ci     * @since 11
19361847f8eSopenharmony_ci     */
19461847f8eSopenharmony_ci    COOPERATE_DEACTIVATE_SUCCESS = 5,
19561847f8eSopenharmony_ci
19661847f8eSopenharmony_ci    /**
19761847f8eSopenharmony_ci     * Failure to stop screen hopping.
19861847f8eSopenharmony_ci     *
19961847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
20061847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
20161847f8eSopenharmony_ci     * @since 11
20261847f8eSopenharmony_ci     */
20361847f8eSopenharmony_ci    COOPERATE_DEACTIVATE_FAILURE = 6,
20461847f8eSopenharmony_ci
20561847f8eSopenharmony_ci    /**
20661847f8eSopenharmony_ci     * Inter-device session disconnected.
20761847f8eSopenharmony_ci     *
20861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
20961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
21061847f8eSopenharmony_ci     * @since 11
21161847f8eSopenharmony_ci     */
21261847f8eSopenharmony_ci    COOPERATE_SESSION_DISCONNECTED = 7,
21361847f8eSopenharmony_ci  }
21461847f8eSopenharmony_ci
21561847f8eSopenharmony_ci  /**
21661847f8eSopenharmony_ci   * Defines a screen hopping message.
21761847f8eSopenharmony_ci   *
21861847f8eSopenharmony_ci   * @interface CooperateMessage
21961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
22061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
22161847f8eSopenharmony_ci   * @since 11
22261847f8eSopenharmony_ci   */
22361847f8eSopenharmony_ci  interface CooperateMessage {
22461847f8eSopenharmony_ci    /**
22561847f8eSopenharmony_ci     * Descriptor of the target device for screen hopping.
22661847f8eSopenharmony_ci     *
22761847f8eSopenharmony_ci     * @type { string }
22861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
22961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
23061847f8eSopenharmony_ci     * @since 11
23161847f8eSopenharmony_ci     */
23261847f8eSopenharmony_ci    networkId: string;
23361847f8eSopenharmony_ci
23461847f8eSopenharmony_ci    /**
23561847f8eSopenharmony_ci     * Screen hopping state.
23661847f8eSopenharmony_ci     *
23761847f8eSopenharmony_ci     * @type { CooperateState }
23861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
23961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
24061847f8eSopenharmony_ci     * @since 11
24161847f8eSopenharmony_ci     */
24261847f8eSopenharmony_ci    state: CooperateState;
24361847f8eSopenharmony_ci  }
24461847f8eSopenharmony_ci
24561847f8eSopenharmony_ci  /**
24661847f8eSopenharmony_ci   *  MouseLocation
24761847f8eSopenharmony_ci   *
24861847f8eSopenharmony_ci   * @typedef MouseLocation
24961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
25061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
25161847f8eSopenharmony_ci   * @since 12
25261847f8eSopenharmony_ci   */
25361847f8eSopenharmony_ci  interface MouseLocation {
25461847f8eSopenharmony_ci    /**
25561847f8eSopenharmony_ci     * The mouse pointer is located at the X coordinate on the screen.
25661847f8eSopenharmony_ci     *
25761847f8eSopenharmony_ci     * @type { number }
25861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
25961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
26061847f8eSopenharmony_ci     * @since 12
26161847f8eSopenharmony_ci     */
26261847f8eSopenharmony_ci    displayX: number;
26361847f8eSopenharmony_ci
26461847f8eSopenharmony_ci    /**
26561847f8eSopenharmony_ci     * The mouse pointer is located at the Y coordinate on the screen.
26661847f8eSopenharmony_ci     *
26761847f8eSopenharmony_ci     * @type { number }
26861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
26961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
27061847f8eSopenharmony_ci     * @since 12
27161847f8eSopenharmony_ci     */
27261847f8eSopenharmony_ci    displayY: number;
27361847f8eSopenharmony_ci
27461847f8eSopenharmony_ci    /**
27561847f8eSopenharmony_ci     * Screen width.
27661847f8eSopenharmony_ci     *
27761847f8eSopenharmony_ci     * @type { number }
27861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
27961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
28061847f8eSopenharmony_ci     * @since 12
28161847f8eSopenharmony_ci     */
28261847f8eSopenharmony_ci    displayWidth: number;
28361847f8eSopenharmony_ci
28461847f8eSopenharmony_ci    /**
28561847f8eSopenharmony_ci     * Screen height.
28661847f8eSopenharmony_ci     *
28761847f8eSopenharmony_ci     * @type { number }
28861847f8eSopenharmony_ci     * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
28961847f8eSopenharmony_ci     * @systemapi Hide this for inner system use.
29061847f8eSopenharmony_ci     * @since 12
29161847f8eSopenharmony_ci     */
29261847f8eSopenharmony_ci    displayHeight: number;
29361847f8eSopenharmony_ci  }
29461847f8eSopenharmony_ci
29561847f8eSopenharmony_ci  /**
29661847f8eSopenharmony_ci   * Prepares for screen hopping.
29761847f8eSopenharmony_ci   *
29861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback Asynchronous callback used to return the operation result.
29961847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
30061847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
30161847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
30261847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
30361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
30461847f8eSopenharmony_ci   * @since 10
30561847f8eSopenharmony_ci   * @deprecated since 11
30661847f8eSopenharmony_ci   * @useinstead cooperate#prepareCooperate
30761847f8eSopenharmony_ci   */
30861847f8eSopenharmony_ci  function prepare(callback: AsyncCallback<void>): void;
30961847f8eSopenharmony_ci
31061847f8eSopenharmony_ci  /**
31161847f8eSopenharmony_ci   * Prepares for screen hopping.
31261847f8eSopenharmony_ci   *
31361847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
31461847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
31561847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error.Possible causes: 1. Mandatory parameters are left unspecified.
31661847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
31761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
31861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
31961847f8eSopenharmony_ci   * @since 10
32061847f8eSopenharmony_ci   * @deprecated since 11
32161847f8eSopenharmony_ci   * @useinstead cooperate#prepareCooperate
32261847f8eSopenharmony_ci   */
32361847f8eSopenharmony_ci  function prepare(): Promise<void>;
32461847f8eSopenharmony_ci
32561847f8eSopenharmony_ci  /**
32661847f8eSopenharmony_ci   * Prepares for screen hopping.
32761847f8eSopenharmony_ci   *
32861847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
32961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Asynchronous callback used to return the operation result.
33061847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
33161847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
33261847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
33361847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
33461847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
33561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
33661847f8eSopenharmony_ci   * @since 11
33761847f8eSopenharmony_ci   */
33861847f8eSopenharmony_ci  function prepareCooperate(callback: AsyncCallback<void>): void;
33961847f8eSopenharmony_ci
34061847f8eSopenharmony_ci  /**
34161847f8eSopenharmony_ci   * Prepares for screen hopping.
34261847f8eSopenharmony_ci   *
34361847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
34461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
34561847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
34661847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
34761847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
34861847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
34961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
35061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
35161847f8eSopenharmony_ci   * @since 11
35261847f8eSopenharmony_ci   */
35361847f8eSopenharmony_ci  function prepareCooperate(): Promise<void>;
35461847f8eSopenharmony_ci
35561847f8eSopenharmony_ci  /**
35661847f8eSopenharmony_ci   * Cancels the preparation for screen hopping.
35761847f8eSopenharmony_ci   *
35861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback Asynchronous callback used to return the operation result.
35961847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
36061847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
36161847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
36261847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
36361847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
36461847f8eSopenharmony_ci   * @since 10
36561847f8eSopenharmony_ci   * @deprecated since 11
36661847f8eSopenharmony_ci   * @useinstead cooperate#unprepareCooperate
36761847f8eSopenharmony_ci   */
36861847f8eSopenharmony_ci  function unprepare(callback: AsyncCallback<void>): void;
36961847f8eSopenharmony_ci
37061847f8eSopenharmony_ci  /**
37161847f8eSopenharmony_ci   * Cancels the preparation for screen hopping.
37261847f8eSopenharmony_ci   *
37361847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
37461847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
37561847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
37661847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
37761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
37861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
37961847f8eSopenharmony_ci   * @since 10
38061847f8eSopenharmony_ci   * @deprecated since 11
38161847f8eSopenharmony_ci   * @useinstead cooperate#unprepareCooperate
38261847f8eSopenharmony_ci   */
38361847f8eSopenharmony_ci  function unprepare(): Promise<void>;
38461847f8eSopenharmony_ci
38561847f8eSopenharmony_ci  /**
38661847f8eSopenharmony_ci   * Cancels the preparation for screen hopping.
38761847f8eSopenharmony_ci   *
38861847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
38961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Asynchronous callback used to return the operation result.
39061847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
39161847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
39261847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
39361847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
39461847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
39561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
39661847f8eSopenharmony_ci   * @since 11
39761847f8eSopenharmony_ci   */
39861847f8eSopenharmony_ci  function unprepareCooperate(callback: AsyncCallback<void>): void;
39961847f8eSopenharmony_ci
40061847f8eSopenharmony_ci  /**
40161847f8eSopenharmony_ci   * Cancels the preparation for screen hopping.
40261847f8eSopenharmony_ci   *
40361847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
40461847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
40561847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
40661847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
40761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
40861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
40961847f8eSopenharmony_ci   * @since 11
41061847f8eSopenharmony_ci   */
41161847f8eSopenharmony_ci  function unprepareCooperate(): Promise<void>;
41261847f8eSopenharmony_ci
41361847f8eSopenharmony_ci  /**
41461847f8eSopenharmony_ci   * Starts screen hopping.
41561847f8eSopenharmony_ci   *
41661847f8eSopenharmony_ci   * @param { string } targetNetworkId Descriptor of the target device for screen hopping.
41761847f8eSopenharmony_ci   * @param { number } inputDeviceId Identifier of the input device for screen hopping.
41861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback Asynchronous callback used to return the operation result.
41961847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
42061847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
42161847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
42261847f8eSopenharmony_ci   * @throws {BusinessError} 20900001 - Operation failed.
42361847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
42461847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
42561847f8eSopenharmony_ci   * @since 10
42661847f8eSopenharmony_ci   * @deprecated since 11
42761847f8eSopenharmony_ci   * @useinstead cooperate#activateCooperate
42861847f8eSopenharmony_ci   */
42961847f8eSopenharmony_ci  function activate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback<void>): void;
43061847f8eSopenharmony_ci
43161847f8eSopenharmony_ci  /**
43261847f8eSopenharmony_ci   * Starts screen hopping.
43361847f8eSopenharmony_ci   *
43461847f8eSopenharmony_ci   * @param { string } targetNetworkId Descriptor of the target device for screen hopping.
43561847f8eSopenharmony_ci   * @param { number }inputDeviceId Identifier of the input device for screen hopping.
43661847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
43761847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
43861847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
43961847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
44061847f8eSopenharmony_ci   * @throws {BusinessError} 20900001 - Operation failed.
44161847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
44261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
44361847f8eSopenharmony_ci   * @since 10
44461847f8eSopenharmony_ci   * @deprecated since 11
44561847f8eSopenharmony_ci   * @useinstead cooperate#activateCooperate
44661847f8eSopenharmony_ci   */
44761847f8eSopenharmony_ci  function activate(targetNetworkId: string, inputDeviceId: number): Promise<void>;
44861847f8eSopenharmony_ci
44961847f8eSopenharmony_ci  /**
45061847f8eSopenharmony_ci   * Starts screen hopping.
45161847f8eSopenharmony_ci   *
45261847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
45361847f8eSopenharmony_ci   * @param { string } targetNetworkId - Descriptor of the target device for screen hopping.
45461847f8eSopenharmony_ci   * @param { number } inputDeviceId - Identifier of the input device for screen hopping.
45561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Asynchronous callback used to return the operation result.
45661847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
45761847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
45861847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
45961847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
46061847f8eSopenharmony_ci   * @throws {BusinessError} 20900001 - Operation failed.
46161847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
46261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
46361847f8eSopenharmony_ci   * @since 11
46461847f8eSopenharmony_ci   */
46561847f8eSopenharmony_ci  function activateCooperate(targetNetworkId: string, inputDeviceId: number, callback: AsyncCallback<void>): void;
46661847f8eSopenharmony_ci
46761847f8eSopenharmony_ci  /**
46861847f8eSopenharmony_ci   * Starts screen hopping.
46961847f8eSopenharmony_ci   *
47061847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
47161847f8eSopenharmony_ci   * @param { string } targetNetworkId - Descriptor of the target device for screen hopping.
47261847f8eSopenharmony_ci   * @param { number }inputDeviceId - Identifier of the input device for screen hopping.
47361847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
47461847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
47561847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
47661847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
47761847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
47861847f8eSopenharmony_ci   * @throws {BusinessError} 20900001 - Operation failed.
47961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
48061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
48161847f8eSopenharmony_ci   * @since 11
48261847f8eSopenharmony_ci   */
48361847f8eSopenharmony_ci  function activateCooperate(targetNetworkId: string, inputDeviceId: number): Promise<void>;
48461847f8eSopenharmony_ci
48561847f8eSopenharmony_ci  /**
48661847f8eSopenharmony_ci   * Stops screen hopping.
48761847f8eSopenharmony_ci   *
48861847f8eSopenharmony_ci   * @param { boolean } isUnchained Whether the cross-device link is unchained.
48961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback Asynchronous callback used to return the operation result.
49061847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
49161847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
49261847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
49361847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
49461847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
49561847f8eSopenharmony_ci   * @since 10
49661847f8eSopenharmony_ci   * @deprecated since 11
49761847f8eSopenharmony_ci   * @useinstead cooperate#deactivateCooperate
49861847f8eSopenharmony_ci   */
49961847f8eSopenharmony_ci  function deactivate(isUnchained: boolean, callback: AsyncCallback<void>): void;
50061847f8eSopenharmony_ci
50161847f8eSopenharmony_ci  /**
50261847f8eSopenharmony_ci   * Stops screen hopping.
50361847f8eSopenharmony_ci   *
50461847f8eSopenharmony_ci   * @param { boolean } isUnchained Whether the cross-device link is unchained.
50561847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
50661847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
50761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
50861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
50961847f8eSopenharmony_ci   * @since 10
51061847f8eSopenharmony_ci   * @deprecated since 11
51161847f8eSopenharmony_ci   * @useinstead cooperate#deactivateCooperate
51261847f8eSopenharmony_ci   */
51361847f8eSopenharmony_ci  function deactivate(isUnchained: boolean): Promise<void>;
51461847f8eSopenharmony_ci
51561847f8eSopenharmony_ci  /**
51661847f8eSopenharmony_ci   * Stops screen hopping.
51761847f8eSopenharmony_ci   *
51861847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
51961847f8eSopenharmony_ci   * @param { boolean } isUnchained - Whether the cross-device link is unchained.
52061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - Asynchronous callback used to return the operation result.
52161847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
52261847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
52361847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
52461847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
52561847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
52661847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
52761847f8eSopenharmony_ci   * @since 11
52861847f8eSopenharmony_ci   */
52961847f8eSopenharmony_ci  function deactivateCooperate(isUnchained: boolean, callback: AsyncCallback<void>): void;
53061847f8eSopenharmony_ci
53161847f8eSopenharmony_ci  /**
53261847f8eSopenharmony_ci   * Stops screen hopping.
53361847f8eSopenharmony_ci   *
53461847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
53561847f8eSopenharmony_ci   * @param { boolean } isUnchained - Whether the cross-device link is unchained.
53661847f8eSopenharmony_ci   * @returns { Promise<void> } the promise returned by the function.
53761847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
53861847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
53961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
54061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
54161847f8eSopenharmony_ci   * @since 11
54261847f8eSopenharmony_ci   */
54361847f8eSopenharmony_ci  function deactivateCooperate(isUnchained: boolean): Promise<void>;
54461847f8eSopenharmony_ci
54561847f8eSopenharmony_ci  /**
54661847f8eSopenharmony_ci   * Obtains the screen hopping status.
54761847f8eSopenharmony_ci   *
54861847f8eSopenharmony_ci   * @param { string } networkId Descriptor of the target device for screen hopping.
54961847f8eSopenharmony_ci   * @param { AsyncCallback<boolean> } callback Asynchronous callback used to return the screen hopping status.
55061847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
55161847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
55261847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
55361847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
55461847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
55561847f8eSopenharmony_ci   * @since 10
55661847f8eSopenharmony_ci   * @deprecated since 11
55761847f8eSopenharmony_ci   * @useinstead cooperate#getCooperateSwitchState
55861847f8eSopenharmony_ci   */
55961847f8eSopenharmony_ci  function getCrossingSwitchState(networkId: string, callback: AsyncCallback<boolean>): void;
56061847f8eSopenharmony_ci
56161847f8eSopenharmony_ci  /**
56261847f8eSopenharmony_ci   * Obtains the status of the screen hopping switch.
56361847f8eSopenharmony_ci   *
56461847f8eSopenharmony_ci   * @param { string } networkId Descriptor of the target device for screen hopping.
56561847f8eSopenharmony_ci   * @returns { Promise<boolean> } Returns {@code true} the screen hopping status;
56661847f8eSopenharmony_ci   *                               returns {@code false} otherwise.
56761847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
56861847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
56961847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
57061847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
57161847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
57261847f8eSopenharmony_ci   * @since 10
57361847f8eSopenharmony_ci   * @deprecated since 11
57461847f8eSopenharmony_ci   * @useinstead cooperate#getCooperateSwitchState
57561847f8eSopenharmony_ci   */
57661847f8eSopenharmony_ci  function getCrossingSwitchState(networkId: string): Promise<boolean>;
57761847f8eSopenharmony_ci
57861847f8eSopenharmony_ci
57961847f8eSopenharmony_ci  /**
58061847f8eSopenharmony_ci   * Obtains the screen hopping status.
58161847f8eSopenharmony_ci   *
58261847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
58361847f8eSopenharmony_ci   * @param { string } networkId - Descriptor of the target device for screen hopping.
58461847f8eSopenharmony_ci   * @param { AsyncCallback<boolean> } callback - Asynchronous callback used to return the screen hopping status.
58561847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
58661847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
58761847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
58861847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
58961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
59061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
59161847f8eSopenharmony_ci   * @since 11
59261847f8eSopenharmony_ci   */
59361847f8eSopenharmony_ci  function getCooperateSwitchState(networkId: string, callback: AsyncCallback<boolean>): void;
59461847f8eSopenharmony_ci
59561847f8eSopenharmony_ci  /**
59661847f8eSopenharmony_ci   * Obtains the status of the screen hopping switch.
59761847f8eSopenharmony_ci   *
59861847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
59961847f8eSopenharmony_ci   * @param { string } networkId - Descriptor of the target device for screen hopping.
60061847f8eSopenharmony_ci   * @returns { Promise<boolean> } Returns {@code true} the screen hopping status;
60161847f8eSopenharmony_ci   *                               returns {@code false} otherwise.
60261847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
60361847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
60461847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
60561847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
60661847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
60761847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
60861847f8eSopenharmony_ci   * @since 11
60961847f8eSopenharmony_ci   */
61061847f8eSopenharmony_ci  function getCooperateSwitchState(networkId: string): Promise<boolean>;
61161847f8eSopenharmony_ci
61261847f8eSopenharmony_ci  /**
61361847f8eSopenharmony_ci   * Enables listening for screen hopping status change events.
61461847f8eSopenharmony_ci   *
61561847f8eSopenharmony_ci   * @param { 'cooperate' } type Change type.
61661847f8eSopenharmony_ci   * @param { Callback<{ networkId: string, msg: CooperateMsg }> } callback Asynchronous callback used to
61761847f8eSopenharmony_ci   * <br>return the screen hopping status change event.
61861847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
61961847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
62061847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
62161847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
62261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
62361847f8eSopenharmony_ci   * @since 10
62461847f8eSopenharmony_ci   * @deprecated since 11
62561847f8eSopenharmony_ci   * @useinstead cooperate#on
62661847f8eSopenharmony_ci   */
62761847f8eSopenharmony_ci  function on(type: 'cooperate', callback: Callback<{ networkId: string, msg: CooperateMsg }>): void;
62861847f8eSopenharmony_ci
62961847f8eSopenharmony_ci  /**
63061847f8eSopenharmony_ci   * Disables listening for screen hopping status change events.
63161847f8eSopenharmony_ci   *
63261847f8eSopenharmony_ci   * @param { 'cooperate' } type Change type.
63361847f8eSopenharmony_ci   * @param { Callback<void> } callback Callback for which listening
63461847f8eSopenharmony_ci   * <br>is disabled. If this parameter is not specified, listening will be disabled for all registered callbacks.
63561847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
63661847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
63761847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
63861847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
63961847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
64061847f8eSopenharmony_ci   * @since 10
64161847f8eSopenharmony_ci   * @deprecated since 11
64261847f8eSopenharmony_ci   * @useinstead cooperate#on
64361847f8eSopenharmony_ci   */
64461847f8eSopenharmony_ci  function off(type: 'cooperate', callback?: Callback<void>): void;
64561847f8eSopenharmony_ci
64661847f8eSopenharmony_ci  /**
64761847f8eSopenharmony_ci   * Enables listening for screen hopping status change events.
64861847f8eSopenharmony_ci   *
64961847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
65061847f8eSopenharmony_ci   * @param { 'cooperateMessage' } type - Change type.
65161847f8eSopenharmony_ci   * @param { Callback<CooperateMessage> } callback - Asynchronous callback used to
65261847f8eSopenharmony_ci   * <br>return the screen hopping status change event.
65361847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
65461847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
65561847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
65661847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
65761847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
65861847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
65961847f8eSopenharmony_ci   * @since 11
66061847f8eSopenharmony_ci   */
66161847f8eSopenharmony_ci  function on(type: 'cooperateMessage', callback: Callback<CooperateMessage>): void;
66261847f8eSopenharmony_ci
66361847f8eSopenharmony_ci  /**
66461847f8eSopenharmony_ci   * Disables listening for screen hopping status change events.
66561847f8eSopenharmony_ci   *
66661847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
66761847f8eSopenharmony_ci   * @param { 'cooperateMessage' } type - Change type.
66861847f8eSopenharmony_ci   * @param { Callback<CooperateMessage> } [callback] - Callback for which listening
66961847f8eSopenharmony_ci   * <br>is disabled. If this parameter is not specified, listening will be disabled for all registered callbacks.
67061847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
67161847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
67261847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes:1.Incorrect parameter types.2.Parameter 
67361847f8eSopenharmony_ci   * <br>verification failed.
67461847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
67561847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
67661847f8eSopenharmony_ci   * @since 11
67761847f8eSopenharmony_ci   */
67861847f8eSopenharmony_ci  function off(type: 'cooperateMessage', callback?: Callback<CooperateMessage>): void;
67961847f8eSopenharmony_ci
68061847f8eSopenharmony_ci  /**
68161847f8eSopenharmony_ci   * Enables listening for mouse pointer position information on the specified device.
68261847f8eSopenharmony_ci   *
68361847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
68461847f8eSopenharmony_ci   * @param { 'cooperateMouse' } type - Event type, which is **cooperateMouse**.
68561847f8eSopenharmony_ci   * @param { string } networkId - Specified device.
68661847f8eSopenharmony_ci   * @param { Callback<MouseLocation> } callback - Callback for receiving reported events.
68761847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
68861847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
68961847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
69061847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
69161847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
69261847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
69361847f8eSopenharmony_ci   * @since 12
69461847f8eSopenharmony_ci   */
69561847f8eSopenharmony_ci  function on(type: 'cooperateMouse', networkId: string, callback: Callback<MouseLocation>): void;
69661847f8eSopenharmony_ci
69761847f8eSopenharmony_ci /**
69861847f8eSopenharmony_ci   * Disables listening for mouse pointer position information on the specified device.
69961847f8eSopenharmony_ci   *
70061847f8eSopenharmony_ci   * @permission ohos.permission.COOPERATE_MANAGER
70161847f8eSopenharmony_ci   * @param { 'cooperateMouse' } type - Event type, which is **cooperateMouse**.
70261847f8eSopenharmony_ci   * @param { string } networkId - Specified device.
70361847f8eSopenharmony_ci   * @param { Callback<MouseLocation> } [callback] - Callback for receiving reported events.
70461847f8eSopenharmony_ci   * <br>If no callback is specified, listening will be disabled for all **cooperateMouse** events of the device specified by **networkId**.
70561847f8eSopenharmony_ci   * @throws {BusinessError} 201 - Permission denied.
70661847f8eSopenharmony_ci   * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API.
70761847f8eSopenharmony_ci   * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
70861847f8eSopenharmony_ci   * <br>2.Incorrect parameter types.3.Parameter verification failed.
70961847f8eSopenharmony_ci   * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate
71061847f8eSopenharmony_ci   * @systemapi Hide this for inner system use.
71161847f8eSopenharmony_ci   * @since 12
71261847f8eSopenharmony_ci   */
71361847f8eSopenharmony_ci  function off(type: 'cooperateMouse', networkId: string, callback?: Callback<MouseLocation>): void;
71461847f8eSopenharmony_ci
71561847f8eSopenharmony_ci}
71661847f8eSopenharmony_ci
71761847f8eSopenharmony_ciexport default cooperate;
718