Home
last modified time | relevance | path

Searched full:location (Results 1 – 25 of 716) sorted by relevance

12345678910>>...29

/base/location/
Dbundle.json2 "name": "@ohos/location",
4 "description": "Location service, providing location and geocoding capabilities.",
13 "destPath": "base/location"
16 "name": "location",
17 "subsystem": "location",
19 "SystemCapability.Location.Location.Core",
20 "SystemCapability.Location.Location.Gnss",
21 "SystemCapability.Location.Location.Geofence",
22 "SystemCapability.Location.Location.Geocoder",
23 "SystemCapability.Location.Location.Lite"
[all …]
DREADME.en.md1 # Location<a name="EN-US_TOPIC_0000001080646118"></a>
14 …ta from a workout. All these activities are so much associated with the location services on mobil…
16 …the location awareness capability offered by OpenHarmony, mobile devices will be able to obtain re…
18 Your application can call location-specific APIs to obtain the location information of a mobile dev…
22 Location awareness helps determine where a mobile device locates. The system identifies the locatio…
26 …A coordinate describes a location on the earth using the longitude and latitude in reference to th…
30location algorithm offered by the device chip to compute the location information provided by the …
34 …Base station positioning estimates the current location of a mobile device based on the location o…
38location of a mobile device based on the locations of WLANs and Bluetooth devices that can be disc…
41 **Figure 1** Location subsystem architecture<a name="fig4460722185514"></a>
[all …]
/base/location/services/location_locator/locator/source/
Dfusion_controller.cpp27 namespace Location { namespace
64 std::unique_ptr<Location> FusionController::chooseBestLocation(const std::unique_ptr<Location>& loc… in chooseBestLocation() argument
65 const std::unique_ptr<Location>& lastFuseLocation) in chooseBestLocation()
67 if (location == nullptr) { in chooseBestLocation()
71 return std::make_unique<Location>(*location); in chooseBestLocation()
73 if (location->GetLocationSourceType() == LocationSourceType::INDOOR_TYPE) { in chooseBestLocation()
74 if (CheckIfLastGnssLocationValid(location, std::make_unique<Location>(*lastFuseLocation)) && in chooseBestLocation()
76 return std::make_unique<Location>(*lastFuseLocation); in chooseBestLocation()
78 return std::make_unique<Location>(*location); in chooseBestLocation()
79 } else if (location->GetLocationSourceType() == LocationSourceType::GNSS_TYPE || in chooseBestLocation()
[all …]
Dreport_manager.cpp33 namespace Location { namespace
58 bool ReportManager::OnReportLocation(const std::unique_ptr<Location>& location, std::string ability… in OnReportLocation() argument
64 UpdateCacheLocation(location, abilityName); in OnReportLocation()
81 WriteNetWorkReportEvent(abilityName, request, location); in OnReportLocation()
83 if (request->GetUuid() == location->GetUuid() || location->GetIsFromMock()) { in OnReportLocation()
84 ProcessRequestForReport(request, deadRequests, location, abilityName); in OnReportLocation()
88 ProcessRequestForReport(request, deadRequests, location, abilityName); in OnReportLocation()
110 std::unique_ptr<Location>& location) in UpdateLocationByRequest() argument
112 if (location == nullptr) { in UpdateLocationByRequest()
116 location->SetIsSystemApp(0); in UpdateLocationByRequest()
[all …]
/base/location/frameworks/base_module/source/
Dlocation.cpp16 #include "location.h"
23 namespace Location { namespace
27 Location::Location() in Location() function in OHOS::Location::Location
51 Location::Location(Location& location) in Location() argument
53 latitude_ = location.GetLatitude(); in Location()
54 longitude_ = location.GetLongitude(); in Location()
55 altitude_ = location.GetAltitude(); in Location()
56 accuracy_ = location.GetAccuracy(); in Location()
57 speed_ = location.GetSpeed(); in Location()
58 direction_ = location.GetDirection(); in Location()
[all …]
/base/location/services/location_locator/locator/include/
Dreport_manager.h25 #include "location.h"
30 namespace Location {
36 bool OnReportLocation(const std::unique_ptr<Location>& location, std::string abilityName);
37 …bool ResultCheck(const std::unique_ptr<Location>& location, const std::shared_ptr<Request>& reques…
38 void UpdateCacheLocation(const std::unique_ptr<Location>& location, std::string abilityName);
39 std::unique_ptr<Location> GetLastLocation();
40 std::unique_ptr<Location> GetCacheLocation(const std::shared_ptr<Request>& request);
41 std::unique_ptr<Location> GetPermittedLocation(const std::shared_ptr<Request>& request,
42 const std::unique_ptr<Location>& location);
46 std::unique_ptr<Location>& location);
[all …]
Dfusion_controller.h22 #include "location.h"
26 namespace Location {
30 std::unique_ptr<Location> chooseBestLocation(const std::unique_ptr<Location>& gnssLocation,
31 const std::unique_ptr<Location>& networkLocation);
32 std::unique_ptr<Location> GetFuseLocation(
33 const std::unique_ptr<Location>& location, const sptr<Location>& lastFuseLocation);
37 bool CheckIfLastIndoorLocationValid(const std::unique_ptr<Location>& location,
38 const std::unique_ptr<Location>& lastFuseLocation);
39 bool CheckIfLastGnssLocationValid(const std::unique_ptr<Location>& location,
40 const std::unique_ptr<Location>& lastFuseLocation);
[all …]
Dsubability_common.h25 #include "location.h"
30 namespace Location {
38 const std::vector<std::shared_ptr<Location>> &location) = 0;
52 …SetMockedLocations(const int timeInterval, const std::vector<std::shared_ptr<Location>> &location);
56 std::vector<std::shared_ptr<Location>> GetLocationMock();
58 …oid ReportLocationInfo(const std::string& systemAbility, const std::shared_ptr<Location> location);
66 void CacheLocationMock(const std::vector<std::shared_ptr<Location>> &location);
78 std::vector<std::shared_ptr<Location>> mockLoc_;
81 } // namespace Location
/base/location/frameworks/native/location_ndk/source/
Dlocator_c_impl.cpp37 std::vector<OHOS::sptr<OHOS::Location::LocationInfoCallbackHost>> g_locationCallbackVector;
38 auto g_locatorProxy = OHOS::Location::Locator::GetInstance();
47 if (errCode != OHOS::Location::ERRCODE_SUCCESS) { in OH_Location_IsLocatingEnabled()
56 LBSLOGI(OHOS::Location::LOCATION_CAPI, "OH_Location_StartLocating "); in OH_Location_StartLocating()
61 LBSLOGE(OHOS::Location::LOCATION_CAPI, "%{public}s callback has registered.", __func__); in OH_Location_StartLocating()
64 auto locatorCallbackHost = OHOS::sptr<OHOS::Location::LocationInfoCallbackHost>( in OH_Location_StartLocating()
65 new (std::nothrow) OHOS::Location::LocationInfoCallbackHost()); in OH_Location_StartLocating()
67 auto locatorCallback = OHOS::sptr<OHOS::Location::ILocatorCallback>(locatorCallbackHost); in OH_Location_StartLocating()
68 auto requestConfigV9 = std::make_unique<OHOS::Location::RequestConfig>(); in OH_Location_StartLocating()
69 if (requestConfig->scenario_ == OHOS::Location::SCENE_UNSET) { in OH_Location_StartLocating()
[all …]
Dlocation_info_callback_host.cpp21 #include "location.h"
29 namespace Location { namespace
40 std::unique_ptr<Location> location = Location::Unmarshalling(data); in OnRemoteRequest() local
41 OnLocationReport(location); in OnRemoteRequest()
52 void LocationInfoCallbackHost::OnLocationReport(const std::unique_ptr<Location>& location) in OnLocationReport() argument
57 location_info.latitude = location->GetLatitude(); in OnLocationReport()
58 location_info.longitude = location->GetLongitude(); in OnLocationReport()
59 location_info.altitude = location->GetAltitude(); in OnLocationReport()
60 location_info.accuracy = location->GetAccuracy(); in OnLocationReport()
61 location_info.speed = location->GetSpeed(); in OnLocationReport()
[all …]
/base/location/interfaces/inner_api/include/
Dlocator_impl.h36 namespace Location {
59 * @brief Obtain current location switch status.
61 * @return Returns true if the location switch on, returns false otherwise.
69 * @brief Enable location switch.
71 * @param enable Status of the location switch to be set.
76 * @brief Subscribe location changed.
78 * @param requestConfig Indicates the location request parameters.
79 * @param callback Indicates the callback for reporting the location result.
85 * @brief Unsubscribe location changed.
87 * @param callback Indicates the callback for reporting the location result.
[all …]
/base/location/test/location_locator/source/
Dreport_manager_test.cpp24 #include "location.h"
37 namespace Location { namespace
74 std::unique_ptr<Location> ReportManagerTest::MockLocation() in MockLocation()
76 std::unique_ptr<Location> location = std::make_unique<Location>(); in MockLocation() local
89 location->ReadFromParcel(parcel); in MockLocation()
90 return location; in MockLocation()
98 std::unique_ptr<Location> location = std::make_unique<Location>(); variable
123 auto location = MockLocation(); variable
125 EXPECT_EQ(true, reportManager_->ResultCheck(location, request));
126 EXPECT_EQ(false, reportManager_->ResultCheck(nullptr, request)); // no location
[all …]
Dfusion_controller_test.cpp24 namespace Location { namespace
115 std::unique_ptr<Location> location = std::make_unique<Location>(); variable
116 location->ReadFromParcel(parcel);
117 EXPECT_EQ(nullptr, fusionController_->chooseBestLocation(nullptr, location));
119 std::unique_ptr<Location> location_gnss = std::make_unique<Location>();
121 std::unique_ptr<Location> location_network = std::make_unique<Location>();
152 std::unique_ptr<Location> location_gnss = std::make_unique<Location>();
154 std::unique_ptr<Location> location_network = std::make_unique<Location>(*location_gnss);
166 std::unique_ptr<Location> location = std::make_unique<Location>(); variable
167 sptr<Location> lastFuseLocation = new (std::nothrow) Location();
[all …]
/base/location/services/etc/
DBUILD.gn18 ":location.para",
19 ":location.para.dac",
24 ohos_prebuilt_etc("location.para") {
25 source = "./param/location.para"
26 part_name = "location"
27 subsystem_name = "location"
31 ohos_prebuilt_etc("location.para.dac") {
32 source = "./param/location.para.dac"
33 part_name = "location"
34 subsystem_name = "location"
[all …]
/base/location/services/location_network/network/source/
Dnetwork_callback_host.cpp28 namespace Location { namespace
39 std::unique_ptr<Location> location = Location::Unmarshalling(data); in OnRemoteRequest() local
40 OnLocationReport(location); in OnRemoteRequest()
44 std::unique_ptr<Location> location = Location::Unmarshalling(data); in OnRemoteRequest() local
45 OnLocationReport(location); in OnRemoteRequest()
63 void NetworkCallbackHost::OnLocationReport(const std::unique_ptr<Location>& location) in OnLocationReport() argument
72 LBSLOGE(NETWORK, "location mock is enabled, do not report network location!"); in OnLocationReport()
75 std::shared_ptr<Location> locationNew = std::make_shared<Location>(*location); in OnLocationReport()
80 … WriteLocationInnerEvent(NETWORK_CALLBACK_LOCATION, {"speed", std::to_string(location->GetSpeed()), in OnLocationReport()
81 "accuracy", std::to_string(location->GetAccuracy()), in OnLocationReport()
[all …]
/base/location/interfaces/c_api/include/
Doh_location_type.h17 * @addtogroup Location
20 …* @brief Provide functions for querying the status of location switch, starting and stopping locat…
28 * @brief Declares the common location attributes.
30 * @syscap SystemCapability.Location.Location.Core
44 * @brief Enumerates the location result codes.
68 * @error The location service is unavailable.
69 * Possible reasons: Abnormal startup of location services.\n
73 * @error The location switch is off.
94 * This feature applies to scenarios where user location tracks are recorded,
108 * This mode applies to scenarios where precise user location is not required,
[all …]
Doh_location.h17 * @addtogroup Location
20 …* @brief Provide functions for querying the status of location switch, starting and stopping locat…
26 …* @brief Define interfaces for querying location switch status, starting locating, and stopping lo…
28 * @syscap SystemCapability.Location.Location.Core
42 * @brief Check whether the location switch is enabled.
44 * @param enabled - It is a boolean pointer used to receive location switch status values.\n
45 * Equal to true indicates that the location switch is turned on, false indicates that\n
46 * the location switch is turned off.\n
48 * @return Location functions result code.\n
50 * {@link LOCAION_SUCCESS} Successfully obtained the location switch status.\n
[all …]
/base/location/frameworks/location_common/common/
Dliblbsservice_common_version_script.txt17 "*Location*Location*";
18 "*Location*CountDownLatch*";
19 "*Location*GeoAddress*";
20 "*Location*UIExtensionAbilityConnection*";
21 "*Location*WriteGnssStateEvent*";
22 "*Location*SatelliteStatus*";
23 "*Location*WriteAppLocatingStateEvent*";
/base/location/test/mock/src/
Dmock_service_registry.cpp27 LBSLOGI(Location::LOCATOR, "%{public}s return instance", __func__); in GetInstance()
34 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in GetSystemAbilityManager()
40 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in GetSystemAbility()
47 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in GetSystemAbility()
53 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in CheckSystemAbilityWrapper()
59 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in CheckSystemAbility()
65 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in CheckSystemAbility()
71 LBSLOGI(Location::LOCATOR, "%{public}s return nullptr", __func__); in CheckSystemAbility()
78 LBSLOGI(Location::LOCATOR, "%{public}s return ERR_OK", __func__); in AddOnDemandSystemAbilityInfo()
84 LBSLOGI(Location::LOCATOR, "%{public}s return ERR_OK", __func__); in RemoveSystemAbilityWrapper()
[all …]
/base/web/webview/ohos_adapter/location_adapter/src/
Dlocation_callback_adapter_impl.cpp41 std::unique_ptr<OHOS::Location::Location> location = in OnRemoteRequest() local
42 OHOS::Location::Location::Unmarshalling(data); in OnRemoteRequest()
43 OnLocationReport(location); in OnRemoteRequest()
65 const std::unique_ptr<OHOS::Location::Location>& location) in OnLocationReport() argument
67 std::unique_ptr<OHOS::Location::Location> tempLocation = in OnLocationReport()
68 std::make_unique<OHOS::Location::Location>(*location); in OnLocationReport()
/base/location/services/location_gnss/gnss/include/
Dgeofence_event_callback.h24 namespace Location {
25 using HDI::Location::Geofence::V2_0::IGeofenceCallback;
26 using HDI::Location::Geofence::V2_0::GeofenceEvent;
27 using HDI::Location::Geofence::V2_0::GeofenceOperateType;
28 using HDI::Location::Geofence::V2_0::GeofenceOperateResult;
29 using HDI::Location::Geofence::V2_0::TYPE_DELETE;
30 using HDI::Location::Geofence::V2_0::GEOFENCE_OPERATION_SUCCESS;
31 using HDI::Location::Geofence::V2_0::TYPE_ADD;
38 …const HDI::Location::Geofence::V2_0::LocationInfo& location, GeofenceEvent event, int64_t timestam…
42 } // namespace Location
Dagnss_ni_manager.h32 namespace Location {
33 using HDI::Location::Gnss::V2_0::IGnssInterface;
34 using HDI::Location::Gnss::V2_0::GnssNiNotificationRequest;
35 using HDI::Location::Gnss::V2_0::GnssNiRequestCategory;
36 using HDI::Location::Gnss::V2_0::GnssNiResponseCmd;
37 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_NOTIFY;
38 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_VERIFY;
39 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_PRIVACY_OVERRIDE;
40 using HDI::Location::Gnss::V2_0::GNSS_NI_RESPONSE_CMD_ACCEPT;
41 using HDI::Location::Gnss::V2_0::GNSS_NI_RESPONSE_CMD_REJECT;
[all …]
/base/location/frameworks/location_common/common/source/
Drequest.cpp21 namespace Location { namespace
33 lastLocation_ = new (std::nothrow) Location(); in Request()
34 bestLocation_ = new (std::nothrow) Location(); in Request()
52 lastLocation_ = new (std::nothrow) Location(); in Request()
53 bestLocation_ = new (std::nothrow) Location(); in Request()
176 sptr<Location> Request::GetLastLocation() in GetLastLocation()
191 void Request::SetLastLocation(const std::unique_ptr<Location>& location) in SetLastLocation() argument
193 if (lastLocation_ == nullptr || location == nullptr) { in SetLastLocation()
196 lastLocation_->SetLatitude(location->GetLatitude()); in SetLastLocation()
197 lastLocation_->SetLongitude(location->GetLongitude()); in SetLastLocation()
[all …]
/base/location/frameworks/native/locator_agent/source/
Dnative_location_callback_host.cpp21 #include "location.h"
25 namespace Location { namespace
36 std::unique_ptr<Location> location = Location::Unmarshalling(data); in OnRemoteRequest() local
37 OnLocationReport(location); in OnRemoteRequest()
48 void NativeLocationCallbackHost::OnLocationReport(const std::unique_ptr<Location>& location) in OnLocationReport() argument
53 locationCallback.locationUpdate(location); in OnLocationReport()
64 } // namespace Location
/base/web/webview/ohos_adapter/location_adapter/include/
Dlocation_proxy_adapter_impl.h23 #include "location.h"
42 std::unique_ptr<OHOS::Location::RequestConfig>& GetConfig();
44 std::unique_ptr<OHOS::Location::RequestConfig> config_;
52 explicit LocationInfoImpl(std::unique_ptr<OHOS::Location::Location>& location);
66 std::unique_ptr<OHOS::Location::Location>& GetLocation();
68 std::unique_ptr<OHOS::Location::Location> location_;
74 std::map<int32_t, sptr<OHOS::Location::ILocatorCallback>>;
78 std::unique_ptr<OHOS::Location::RequestConfig>& requestConfig,
79 OHOS::sptr<OHOS::Location::ILocatorCallback>& callback);
81 OHOS::sptr<OHOS::Location::ILocatorCallback>& callback);

12345678910>>...29