[platform] Separete the location_service lib

Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
This commit is contained in:
Ferenc Géczi
2025-01-01 00:00:00 +00:00
committed by Konstantin Pastbin
parent c7aacb3b64
commit 5110867b38
11 changed files with 39 additions and 49 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "platform/location.hpp"
namespace location
{
class LocationObserver
{
public:
virtual void OnLocationError(TLocationError errorCode) = 0;
virtual void OnLocationUpdated(GpsInfo const & info) = 0;
protected:
virtual ~LocationObserver() = default;
};
class LocationService
{
protected:
LocationObserver & m_observer;
public:
LocationService(LocationObserver & observer) : m_observer(observer) {}
virtual ~LocationService() = default;
virtual void Start() = 0;
virtual void Stop() = 0;
};
} // namespace location
std::unique_ptr<location::LocationService> CreateDesktopLocationService(location::LocationObserver & observer);