1c5e268c6Sopenharmony_ci/* 2c5e268c6Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License. 5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at 6c5e268c6Sopenharmony_ci * 7c5e268c6Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8c5e268c6Sopenharmony_ci * 9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and 13c5e268c6Sopenharmony_ci * limitations under the License. 14c5e268c6Sopenharmony_ci */ 15c5e268c6Sopenharmony_ci 16c5e268c6Sopenharmony_ci /** 17c5e268c6Sopenharmony_ci * @addtogroup HdiLpfenceCellbatching 18c5e268c6Sopenharmony_ci * @{ 19c5e268c6Sopenharmony_ci * 20c5e268c6Sopenharmony_ci * @brief Provides APIs for recording base station trajectory data for low-power fence services. 21c5e268c6Sopenharmony_ci * 22c5e268c6Sopenharmony_ci * You can use the APIs to cache and flush the base station data received. 23c5e268c6Sopenharmony_ci * 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. 24c5e268c6Sopenharmony_ci * 25c5e268c6Sopenharmony_ci * @since 4.0 26c5e268c6Sopenharmony_ci * @version 1.0 27c5e268c6Sopenharmony_ci */ 28c5e268c6Sopenharmony_ci 29c5e268c6Sopenharmony_ci/** 30c5e268c6Sopenharmony_ci * @file ICellbatchingCallback.idl 31c5e268c6Sopenharmony_ci * 32c5e268c6Sopenharmony_ci * @brief Defines the callbacks of the cell batching module. 33c5e268c6Sopenharmony_ci * 34c5e268c6Sopenharmony_ci * The callback instance must be registered when a user subscribes to the cell batching feature. 35c5e268c6Sopenharmony_ci * 36c5e268c6Sopenharmony_ci * @since 4.0 37c5e268c6Sopenharmony_ci * @version 1.0 38c5e268c6Sopenharmony_ci */ 39c5e268c6Sopenharmony_ci 40c5e268c6Sopenharmony_ci/** 41c5e268c6Sopenharmony_ci * @brief Declares the path of the cell batching interface package. 42c5e268c6Sopenharmony_ci * 43c5e268c6Sopenharmony_ci * @since 4.0 44c5e268c6Sopenharmony_ci */ 45c5e268c6Sopenharmony_cipackage ohos.hdi.location.lpfence.cellbatching.v1_0; 46c5e268c6Sopenharmony_ci 47c5e268c6Sopenharmony_ci/** 48c5e268c6Sopenharmony_ci * @brief Imports data types of the cell batching module. 49c5e268c6Sopenharmony_ci * 50c5e268c6Sopenharmony_ci * @since 4.0 51c5e268c6Sopenharmony_ci */ 52c5e268c6Sopenharmony_ciimport ohos.hdi.location.lpfence.cellbatching.v1_0.CellbatchingTypes; 53c5e268c6Sopenharmony_ci 54c5e268c6Sopenharmony_ci/** 55c5e268c6Sopenharmony_ci * @brief Defines a callback of the cell batching module. 56c5e268c6Sopenharmony_ci * 57c5e268c6Sopenharmony_ci * Before enabling the cell batching feature, you need to register the callback to report the base station trajectory data obtained by an app. 58c5e268c6Sopenharmony_ci * For details, see {@link ICellbatchingInterface}. 59c5e268c6Sopenharmony_ci * 60c5e268c6Sopenharmony_ci * @since 4.0 61c5e268c6Sopenharmony_ci */ 62c5e268c6Sopenharmony_ci[callback] interface ICellbatchingCallback { 63c5e268c6Sopenharmony_ci /** 64c5e268c6Sopenharmony_ci * @brief Called to report the base station trajectory data. 65c5e268c6Sopenharmony_ci * 66c5e268c6Sopenharmony_ci * 67c5e268c6Sopenharmony_ci * @param data Indicates the base station trajectory data. For details, see {@link CellTrajectoryData}. 68c5e268c6Sopenharmony_ci * 69c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the callback is invoked successfully. 70c5e268c6Sopenharmony_ci * @return Returns a negative value if the callback fails to be invoked. 71c5e268c6Sopenharmony_ci * 72c5e268c6Sopenharmony_ci * @since 4.0 73c5e268c6Sopenharmony_ci */ 74c5e268c6Sopenharmony_ci OnCellbatchingChanged([in] struct CellTrajectoryData[] data); 75c5e268c6Sopenharmony_ci 76c5e268c6Sopenharmony_ci /** 77c5e268c6Sopenharmony_ci * @brief Called when the low-power fence service is reset. 78c5e268c6Sopenharmony_ci * 79c5e268c6Sopenharmony_ci * 80c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if the callback is invoked successfully. 81c5e268c6Sopenharmony_ci * @return Returns a negative value if the callback fails to invoked. 82c5e268c6Sopenharmony_ci * 83c5e268c6Sopenharmony_ci * @since 4.0 84c5e268c6Sopenharmony_ci */ 85c5e268c6Sopenharmony_ci OnCellbatchingReset(); 86c5e268c6Sopenharmony_ci} 87c5e268c6Sopenharmony_ci/** @} */ 88