1/* 2 * Copyright (c) 2024 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 * @file 18 * @kit LocationKit 19 */ 20 21import type FenceExtensionContext from './@ohos.app.ability.FenceExtensionContext'; 22import geoLocationManager from './@ohos.geoLocationManager'; 23 24/** 25 * Class of fence extension ability. 26 * 27 * @syscap SystemCapability.Location.Location.Geofence 28 * @stagemodelonly 29 * @since 14 30 */ 31export default class FenceExtensionAbility { 32 /** 33 * Indicates fence extension context. 34 * 35 * @type { FenceExtensionContext } 36 * @syscap SystemCapability.Location.Location.Geofence 37 * @stagemodelonly 38 * @since 14 39 */ 40 context: FenceExtensionContext; 41 42 /** 43 * Called back when geofence status is change. 44 * 45 * @param { geoLocationManager.GeofenceTransition } transition - Geofence transition status 46 * @param { Record<string, string> } additions - Indicates additional information 47 * @syscap SystemCapability.Location.Location.Geofence 48 * @stagemodelonly 49 * @since 14 50 */ 51 onFenceStatusChange(transition: geoLocationManager.GeofenceTransition, additions: Record<string, string>): void; 52 53 /** 54 * Called back before a fence extension is destroyed. 55 * 56 * @syscap SystemCapability.Location.Location.Geofence 57 * @stagemodelonly 58 * @since 14 59 */ 60 onDestroy(): void; 61} 62