/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @addtogroup HdiLpfenceCellbatching * @{ * * @brief Provides APIs for recording base station trajectory data for low-power fence services. * * You can use the APIs to cache and flush the base station data received. * The cell batching feature is used to determine the user's activity area based on the base station trajectory data received by the device, so as to further provide service information. * * @since 4.0 * @version 1.0 */ /** * @file ICellbatchingCallback.idl * * @brief Defines the callbacks of the cell batching module. * * The callback instance must be registered when a user subscribes to the cell batching feature. * * @since 4.0 * @version 1.0 */ /** * @brief Declares the path of the cell batching interface package. * * @since 4.0 */ package ohos.hdi.location.lpfence.cellbatching.v1_0; /** * @brief Imports data types of the cell batching module. * * @since 4.0 */ import ohos.hdi.location.lpfence.cellbatching.v1_0.CellbatchingTypes; /** * @brief Defines a callback of the cell batching module. * * Before enabling the cell batching feature, you need to register the callback to report the base station trajectory data obtained by an app. * For details, see {@link ICellbatchingInterface}. * * @since 4.0 */ [callback] interface ICellbatchingCallback { /** * @brief Called to report the base station trajectory data. * * * @param data Indicates the base station trajectory data. For details, see {@link CellTrajectoryData}. * * @return Returns 0 if the callback is invoked successfully. * @return Returns a negative value if the callback fails to be invoked. * * @since 4.0 */ OnCellbatchingChanged([in] struct CellTrajectoryData[] data); /** * @brief Called when the low-power fence service is reset. * * * @return Returns 0 if the callback is invoked successfully. * @return Returns a negative value if the callback fails to invoked. * * @since 4.0 */ OnCellbatchingReset(); } /** @} */