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 #ifndef GEOFENCE_DEFINITION_H 17 #define GEOFENCE_DEFINITION_H 18 19 namespace OHOS { 20 namespace Location { 21 enum GeofenceTransitionEvent { 22 GEOFENCE_TRANSITION_INIT = -1, 23 GEOFENCE_TRANSITION_EVENT_ENTER = 1, 24 GEOFENCE_TRANSITION_EVENT_EXIT = 2, 25 GEOFENCE_TRANSITION_EVENT_DWELL = 4, 26 }; 27 28 enum CoordinateSystemType { 29 WGS84 = 1, 30 GCJ02, 31 }; 32 33 enum GnssGeofenceOperateResult { 34 GNSS_GEOFENCE_OPERATION_SUCCESS = 0, 35 GNSS_GEOFENCE_OPERATION_ERROR_UNKNOWN = -1, 36 GNSS_GEOFENCE_OPERATION_ERROR_TOO_MANY_GEOFENCES = -2, 37 GNSS_GEOFENCE_OPERATION_ERROR_GEOFENCE_ID_EXISTS = -3, 38 GNSS_GEOFENCE_OPERATION_ERROR_PARAMS_INVALID = -4, 39 GNSS_GEOFENCE_OPERATION_ERROR_GEOFENCE_ID_UNKNOWN = -5, 40 }; 41 42 enum GnssGeofenceOperateType { 43 GNSS_GEOFENCE_OPT_TYPE_ADD = 1, 44 GNSS_GEOFENCE_OPT_TYPE_DELETE = 2, 45 }; 46 47 typedef struct { 48 int fenceId; 49 GeofenceTransitionEvent event; 50 } GeofenceTransition; 51 } // namespace Location 52 } // namespace OHOS 53 #endif // GEOFENCE_DEFINITION_H 54