Home
last modified time | relevance | path

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

12345678910>>...32

/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/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 CheckIfLastGnssLocationValid(const std::unique_ptr<Location>& location,
38 const std::unique_ptr<Location>& lastFuseLocation);
42 } // namespace Location
/base/location/frameworks/cj/source/
Dlocator_callback.cpp41 auto cFunc = reinterpret_cast<void(*)(CJLocation location)>(callbackId); in LocatorCallback()
42 …back_ = [ lambda = CJLambda::Create(cFunc)](const std::unique_ptr<Location::Location>& location) -> in LocatorCallback()
43 void { lambda(NativeLocationToCJLocation(*location)); }; in LocatorCallback() argument
48 latch_ = new Location::CountDownLatch(); in InitLatch()
50 LBSLOGE(Location::LOCATOR_CALLBACK, "latch_ is nullptr."); in InitLatch()
65 LBSLOGE(Location::LOCATOR_CALLBACK, "invalid token."); in OnRemoteRequest()
70 case Location::ILocatorCallback::RECEIVE_LOCATION_INFO_EVENT: { in OnRemoteRequest()
71 std::unique_ptr<Location::Location> location = Location::Location::Unmarshalling(data); in OnRemoteRequest() local
72 LocatorCallback::OnLocationReport(location); in OnRemoteRequest()
73 if (location->GetLocationSourceType() == Location::LocationSourceType::NETWORK_TYPE && in OnRemoteRequest()
[all …]
Dgeolocationmanager_impl.cpp38 std::unique_ptr<Location::CachedGnssLocationsRequest> cachedRequest =
39 std::make_unique<Location::CachedGnssLocationsRequest>();
41 auto g_locatorProxy = Location::Locator::GetInstance();
42 auto g_geofenceClient = Location::GeofenceManager::GetInstance();
56 bool CjIsRequestConfigValid(const std::unique_ptr<Location::RequestConfig>& config) in CjIsRequestConfigValid()
61 …if ((config->GetScenario() > Location::SCENE_NO_POWER || config->GetScenario() < Location::SCENE_U… in CjIsRequestConfigValid()
62 (config->GetScenario() > Location::LOCATION_SCENE_DAILY_LIFE_SERVICE || in CjIsRequestConfigValid()
63 config->GetScenario() < Location::LOCATION_SCENE_NAVIGATION) && in CjIsRequestConfigValid()
64 (config->GetScenario() > Location::LOCATION_SCENE_NO_POWER_CONSUMPTION || in CjIsRequestConfigValid()
65 config->GetScenario() < Location::LOCATION_SCENE_HIGH_POWER_CONSUMPTION)) { in CjIsRequestConfigValid()
[all …]
Dcached_locations_callback.cpp19 #include "location.h"
33 …ambda = CJLambda::Create(cFunc)](const std::vector<std::unique_ptr<Location::Location>>& locations) in CachedLocationsCallback()
44 LBSLOGD(Location::CACHED_LOCATIONS_CALLBACK, "CachedLocationsCallback::OnRemoteRequest!"); in OnRemoteRequest()
46 LBSLOGE(Location::CACHED_LOCATIONS_CALLBACK, "invalid token."); in OnRemoteRequest()
50 …LBSLOGD(Location::CACHED_LOCATIONS_CALLBACK, "Failed to `%{public}s`,Remote service is died!", __f… in OnRemoteRequest()
55 case Location::ICachedLocationsCallback::RECEIVE_CACHED_LOCATIONS_EVENT: { in OnRemoteRequest()
57 if (size > 0 && size < Location::MAXIMUM_CACHE_LOCATIONS) { in OnRemoteRequest()
58 std::vector<std::unique_ptr<Location::Location>> locations(size); in OnRemoteRequest()
60 locations.push_back(Location::Location::Unmarshalling(data)); in OnRemoteRequest()
79 …Callback::OnCacheLocationsReport(const std::vector<std::unique_ptr<Location::Location>>& locations) in OnCacheLocationsReport()
[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()
74 fusionInfo.location = *location; in chooseBestLocation()
76 if (fusionInfo.location.GetLocationSourceType() == LocationSourceType::NETWORK_TYPE) { in chooseBestLocation()
77 …if (CheckIfLastGnssLocationValid(location, std::make_unique<Location>(fusionInfo.lastFuseLocation)… in chooseBestLocation()
80 fusionInfo.resultLocation = fusionInfo.location; in chooseBestLocation()
85 return std::make_unique<Location>(fusionInfo.resultLocation); 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
61 UpdateCacheLocation(location, abilityName); in OnReportLocation()
75 WriteNetWorkReportEvent(abilityName, request, location); in OnReportLocation()
77 if (request->GetUuid() == location->GetUuid() || location->GetIsFromMock()) { in OnReportLocation()
78 ProcessRequestForReport(request, deadRequests, location, abilityName); in OnReportLocation()
82 ProcessRequestForReport(request, deadRequests, location, abilityName); in OnReportLocation()
104 std::unique_ptr<Location>& location) in UpdateLocationByRequest() argument
106 if (location == nullptr) { in UpdateLocationByRequest()
110 location->SetIsSystemApp(0); in UpdateLocationByRequest()
[all …]
/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.h37 namespace Location {
60 * @brief Obtain current location switch status.
62 * @return Returns true if the location switch on, returns false otherwise.
70 * @brief Enable location switch.
72 * @param enable Status of the location switch to be set.
77 * @brief Subscribe location changed.
79 * @param requestConfig Indicates the location request parameters.
80 * @param callback Indicates the callback for reporting the location result.
86 * @brief Unsubscribe location changed.
88 * @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/frameworks/cj/include/
Dlocator_callback.h25 #include "location.h"
30 class LocatorCallback : public IRemoteStub<Location::ILocatorCallback> {
38 void OnLocationReport(const std::unique_ptr<Location::Location>& location) override;
68 inline std::shared_ptr<Location::Location> GetSingleLocation() in GetSingleLocation()
79 bool NeedSetSingleLocation(const std::unique_ptr<Location::Location>& location);
81 void SetSingleLocation(const std::unique_ptr<Location::Location>& location);
85 std::function<void(const std::unique_ptr<Location::Location>& location)> callback_ = nullptr;
88 Location::CountDownLatch* latch_;
89 std::shared_ptr<Location::Location> singleLocation_;
/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()
77 … WriteLocationInnerEvent(NETWORK_CALLBACK_LOCATION, {"speed", std::to_string(location->GetSpeed()), in OnLocationReport()
78 "accuracy", std::to_string(location->GetAccuracy()), in OnLocationReport()
[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/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/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::UnmarshallingMakeUnique(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/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/services/location_gnss/gnss/include/
Dagnss_ni_manager.h33 namespace Location {
34 using HDI::Location::Gnss::V2_0::IGnssInterface;
35 using HDI::Location::Gnss::V2_0::GnssNiNotificationRequest;
36 using HDI::Location::Gnss::V2_0::GnssNiRequestCategory;
37 using HDI::Location::Gnss::V2_0::GnssNiResponseCmd;
38 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_NOTIFY;
39 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_VERIFY;
40 using HDI::Location::Gnss::V2_0::GNSS_NI_NOTIFICATION_REQUIRE_PRIVACY_OVERRIDE;
41 using HDI::Location::Gnss::V2_0::GNSS_NI_RESPONSE_CMD_ACCEPT;
42 using HDI::Location::Gnss::V2_0::GNSS_NI_RESPONSE_CMD_REJECT;
[all …]
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

12345678910>>...32