result
Coordinates::Set(double latitude, double longitude, double altitude)
{
- SysTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The latitude(%lf) must be in the range [-90.0, 90.0].", latitude);
- SysTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
+
+ SysSecureTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The longitude(%lf) must be in the range [-180.0, 180.0].", longitude);
__latitude = latitude;
result
Coordinates::SetLatitude(double latitude)
{
- SysTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The latitude(%lf) must be in the range [-90.0, 90.0].", latitude);
__latitude = latitude;
return E_SUCCESS;
result
Coordinates::SetLongitude(double longitude)
{
- SysTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The longitude(%lf) must be in the range [-180.0, 180.0].", longitude);
__longitude = longitude;
return E_SUCCESS;
dateTime.SetValue(1970, 1, 1);
dateTime.Add(timespan);
- SysLog(NID_LOC, "The location timeStamp is (%ls)", dateTime.ToString().GetPointer());
+ SysSecureLog(NID_LOC, "The location timeStamp is (%ls)", dateTime.ToString().GetPointer());
return dateTime;
}
result
_LocationManager::SetLocationInformation(double latitude, double longitude, double altitude, time_t timestamp, location_method_e locMethod, Location* pLocation)
{
- SysLog(NID_LOC, "Location Information is: Latitude (%lf), Longitude (%lf), Altitude (%lf), TimeStamp (%ld), Location method (%d)", latitude, longitude, altitude, timestamp, locMethod);
+ SysSecureLog(NID_LOC, "Location Information is: Latitude (%lf), Longitude (%lf), Altitude (%lf), TimeStamp (%ld), Location method (%d)", latitude, longitude, altitude, timestamp, locMethod);
int res = -1;
LocationAccuracy requiredAcc;
int res = location_manager_get_last_position(nativeHandle, &altitude, &latitude, &longitude, ×tampPosition);
SysTryCatch(NID_LOC, res == 0, , E_SYSTEM, "[E_SYSTEM] Failed to fetch last position from nativeHandle(%x).", nativeHandle);
- SysLog(NID_LOC, "Last position(latitude: %lf, longitude: %lf, altitude: %lf, timestamp: %ld",
+ SysSecureLog(NID_LOC, "Last position(latitude: %lf, longitude: %lf, altitude: %lf, timestamp: %ld",
latitude, longitude, altitude, timestampPosition);
Coordinates coord;
SysTryReturn(NID_LOC, radius >= 50.0 && radius <= 100000.00, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The radius is not within the specified limits.");
SysTryReturn(NID_LOC, (!Double::IsNaN(radius) && !Double::IsNaN(regionCenter.GetLatitude()) && !Double::IsNaN(regionCenter.GetLongitude())),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the value is NaN.");
- SysLog(NID_LOC, "Requested to add the monitoring region with center (Latitude: %lf, Longitude %lf) and radius (%lf).", regionCenter.GetLatitude(), regionCenter.GetLongitude(), radius);
+ SysSecureLog(NID_LOC, "Requested to add the monitoring region with center (Latitude: %lf, Longitude %lf) and radius (%lf).", regionCenter.GetLatitude(), regionCenter.GetLongitude(), radius);
static int nextRegionId = 0;
{
TryReturn(location.GetHorizontalAccuracy() >= 0.0, REGION_STATE_UNKNOWN, "Location received with invalid accuracy");
- SysLog(NID_LOC, "[RegionID %d] Region Information is (Center latitude: %lf, Center longitude: %lf, Region radius:%lf", region.GetRegionId(), region.GetCoordinate().GetLatitude(),
+ SysSecureLog(NID_LOC, "[RegionID %d] Region Information is (Center latitude: %lf, Center longitude: %lf, Region radius:%lf", region.GetRegionId(), region.GetCoordinate().GetLatitude(),
region.GetCoordinate().GetLongitude(), region.GetRadius());
- SysLog(NID_LOC, "[RegionID %d] Location Information is (Latitude: %lf, Longitude: %lf, Horizontal accuracy:%lf", region.GetRegionId(), location.GetCoordinates().GetLatitude(),
+ SysSecureLog(NID_LOC, "[RegionID %d] Location Information is (Latitude: %lf, Longitude: %lf, Horizontal accuracy:%lf", region.GetRegionId(), location.GetCoordinates().GetLatitude(),
location.GetCoordinates().GetLongitude(), location.GetHorizontalAccuracy());
_RegionState regionState = REGION_STATE_UNKNOWN;
}
}
- SysLog(NID_LOC, "Shortest distance from location (lat: %lf and lon: %lf) to the nearest region boundary is (%lf) meters", location.GetCoordinates().GetLatitude(), location.GetCoordinates().GetLongitude(), minDistance);
+ SysSecureLog(NID_LOC, "Shortest distance from location (lat: %lf and lon: %lf) to the nearest region boundary is (%lf) meters", location.GetCoordinates().GetLatitude(), location.GetCoordinates().GetLongitude(), minDistance);
return minDistance;
}
} } // Tizen::Locations