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 HdiLpfenceCellbatching 18 * @{ 19 * 20 * @brief Provides APIs for recording base station trajectory data for low-power fence services. 21 * 22 * You can use the APIs to cache and flush the base station data received. 23 * 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. 24 * 25 * @since 4.0 26 * @version 1.0 27 */ 28 29/** 30 * @file ICellbatchingCallback.idl 31 * 32 * @brief Defines the callbacks of the cell batching module. 33 * 34 * The callback instance must be registered when a user subscribes to the cell batching feature. 35 * 36 * @since 4.0 37 * @version 1.0 38 */ 39 40/** 41 * @brief Declares the path of the cell batching interface package. 42 * 43 * @since 4.0 44 */ 45package ohos.hdi.location.lpfence.cellbatching.v1_0; 46 47/** 48 * @brief Imports data types of the cell batching module. 49 * 50 * @since 4.0 51 */ 52import ohos.hdi.location.lpfence.cellbatching.v1_0.CellbatchingTypes; 53 54/** 55 * @brief Defines a callback of the cell batching module. 56 * 57 * Before enabling the cell batching feature, you need to register the callback to report the base station trajectory data obtained by an app. 58 * For details, see {@link ICellbatchingInterface}. 59 * 60 * @since 4.0 61 */ 62[callback] interface ICellbatchingCallback { 63 /** 64 * @brief Called to report the base station trajectory data. 65 * 66 * 67 * @param data Indicates the base station trajectory data. For details, see {@link CellTrajectoryData}. 68 * 69 * @return Returns <b>0</b> if the callback is invoked successfully. 70 * @return Returns a negative value if the callback fails to be invoked. 71 * 72 * @since 4.0 73 */ 74 OnCellbatchingChanged([in] struct CellTrajectoryData[] data); 75 76 /** 77 * @brief Called when the low-power fence service is reset. 78 * 79 * 80 * @return Returns <b>0</b> if the callback is invoked successfully. 81 * @return Returns a negative value if the callback fails to invoked. 82 * 83 * @since 4.0 84 */ 85 OnCellbatchingReset(); 86} 87/** @} */ 88