haiku/headers/private/netservices/Geolocation.h
Niels Sascha Reedijk 2a7090df71 libnetservices.a: move BGeoLocation from libshared.a
The BGeolocation class uses the network interface in libnetservices.a, so it
is moved here for now.

This will break any out of tree projects that depend on it, but it is a source
incompatible change only.

Change-Id: I6f5b1332eb87ad37dd33fbe09fdb11b16f7f26e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3670
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-27 19:53:11 +00:00

46 lines
917 B
C++

/*
* Copyright 2014-2019, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _GEOLOCATION_H
#define _GEOLOCATION_H
#include <Country.h>
#include <Url.h>
namespace BPrivate {
namespace Network {
class BGeolocation {
public:
BGeolocation();
BGeolocation(const BUrl& geolocationService,
const BUrl& geocodingService);
status_t LocateSelf(float& latitude, float& longitude);
status_t Locate(const BString placeName, float& latitude,
float& longitude);
status_t Name(const float latitude, const float longitude,
BString& name);
status_t Country(const float latitude, const float longitude,
BCountry& country);
private:
BUrl fGeolocationService;
BUrl fGeocodingService;
static const char* kDefaultGeolocationService;
static const char* kDefaultGeocodingService;
};
} // namespace Network
} // namespace BPrivate
#endif