#pragma once
#include "pan/pan.hpp"
#include <mutex>
#include <vector>
class DefaultSelector : public Pan::PathSelector
{
public:
DefaultSelector() = default;
protected:
Pan::Path path() override;
void initialize(
Pan::udp::Endpoint local, Pan::udp::Endpoint remote,
std::vector<Pan::Path>& paths) override;
void refresh(std::vector<Pan::Path>& paths) override;
void pathDown(Pan::PathFingerprint pf, Pan::PathInterface pi) override;
void close() override;
private:
mutable std::mutex mutex;
std::vector<Pan::Path> paths;
unsigned int currentPath = 0;
};