2022-06-27 20:45:01 +02:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-24 16:12:03 +02:00
|
|
|
#include <istream>
|
2022-06-27 20:45:01 +02:00
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class ClientAccess {
|
|
|
|
ClientAccess();
|
|
|
|
public:
|
2022-08-24 16:12:03 +02:00
|
|
|
ClientAccess(const std::string& token, uint16_t port);
|
2022-06-27 20:45:01 +02:00
|
|
|
static std::shared_ptr<ClientAccess> find(bool uselockfile = true);
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::string getBasicAuth() const;
|
|
|
|
uint16_t getPort() const;
|
|
|
|
|
|
|
|
std::string getURL() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
std::string authcode;
|
|
|
|
uint16_t port = 0;
|
2022-08-24 16:12:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
std::shared_ptr<ClientAccess> createFromLockfile(std::istream& lockfile);
|