1/*
2 * Copyright (c) 2023 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 * @addtogroup Motion
18 * @{
19 *
20 * @brief Provides common APIs for hardware services to access the motion driver module.
21 *
22 * A service can obtain a motion driver object or agent and then call APIs provided by this object or agent to
23 * enable or disable motion and subscribe to or unsubscribe from motion data.
24 *
25 * @since 4.0
26 */
27
28/**
29 * @file IMotionInterface.idl
30 *
31 * @brief Defines the APIs for enabling or disabling motion and subscribing to or unsubscribing from motion data.
32 *
33 * The APIs defined here can be called to implement various motion features, such as pickup, flipping, shaking, and screen rotation.
34 *
35 * @since 4.0
36 * @version 1.1
37 */
38
39/**
40 * @brief Defines the package path of the motion driver module APIs.
41 *
42 * @since 4.0
43 */
44package ohos.hdi.motion.v1_1;
45
46import ohos.hdi.motion.v1_0.MotionTypes;
47import ohos.hdi.motion.v1_0.IMotionCallback;
48import ohos.hdi.motion.v1_0.IMotionInterface;
49import ohos.hdi.motion.v1_1.MotionTypes;
50
51/**
52 * @brief Defines the APIs for performing basic operations on motion devices.
53 *
54 * The APIs can be used to enable or disable motion and subscribe to or unsubscribe from motion data.
55 */
56interface IMotionInterface extends ohos.hdi.motion.v1_0.IMotionInterface {
57    /**
58     * @brief Sets motion config information.
59     *
60     * @param motionType Motion type. For details, see {@link HdfMotionTypeTag}.
61     * @param data Motion wave config parameters for a trick. For details, see {@link WaveParam}.
62     *
63     * @return Returns <b>0</b> if the operation is successful.
64     * @return Returns a negative value if the operation fails.
65     *
66     * @since 4.0
67     * @version 1.1
68     */
69    SetMotionConfig([in] int motionType, [in] unsigned char[] data);
70}
71/** @} */