1/* 2 * Copyright (c) 2025 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 HdiLpfenceMntn 18 * @{ 19 * 20 * @brief Provides lpfence mntn APIs for the lpfence mntn service. 21 * 22 * @since 6.0 23 * @version 1.0 24 */ 25 26/** 27 * @file IMntnInterface.idl 28 * 29 * @brief Declares the APIs for the lpfence mntn module. 30 * 31 * @since 6.0 32 * @version 1.0 33 */ 34 35/** 36 * @brief Declares the path of the lpfence mntn module interface package. 37 * 38 * @since 6.0 39 */ 40package ohos.hdi.location.lpfence.mntn.v1_0; 41 42/** 43 * @brief Imports data types of the lpfence mntn module. 44 * 45 * @since 6.0 46 */ 47import ohos.hdi.location.lpfence.mntn.v1_0.MntnTypes; 48 49/** 50 * @brief Imports callbacks of the lpfence mntn module. 51 * 52 * @since 6.0 53 */ 54import ohos.hdi.location.lpfence.mntn.v1_0.IMntnCallback; 55 56/** 57 * @brief Provides APIs for basic lpfence mntn operations. 58 * 59 * You can use the APIs to register or unregister a callback 60 */ 61interface IMntnIntf { 62 /** 63 * @brief Registers a callback. 64 * 65 * Before enabling the lpfence mntn feature, you need to register a callback to report the device has obtained the lpfence mntn information. 66 * 67 * @param callbackObj Indicates the callback to register, which needs to be registered only once. For details, see {@link IMntnCallback}. 68 * 69 * @return Returns <b>0</b> if the operation is successful. 70 * @return Returns a negative value if the operation fails. 71 * 72 * @since 6.0 73 * @version 1.0 74 */ 75 RegisterLpfenceMntnCallback([in] IMntnCallback callbackObj); 76 77 /** 78 * @brief Unregisters a callback. 79 * 80 * When the lpfence mntn feature is no longer required or the registered callback needs to be changed, you need to unregister the callback. 81 * 82 * @param callbackObj Indicates the callback to unregister, which needs to be unregistered only once. For details, see {@link IMntnCallback}. 83 * 84 * @return Returns <b>0</b> if the operation is successful. 85 * @return Returns a negative value if the operation fails. 86 * 87 * @since 6.0 88 * @version 1.0 89 */ 90 UnregisterLpfenceMntnCallback([in] IMntnCallback callbackObj); 91 92 /** 93 * @brief Obtains the latest lpfence mntn information. 94 * 95 * @param type Indicates the lpfence type. For details, see {@link enum LpfenceType}. 96 * 97 * @return Returns <b>0</b> if the operation is successful. 98 * @return Returns a negative value if the operation fails. 99 * 100 * @since 6.0 101 * @version 1.0 102 */ 103 GetCurrentLpfenceMntnInfo([in] enum LpfenceType type); 104} 105/** @} */ 106