lolautoaccept/include/clientaccess.h

27 lines
437 B
C
Raw Normal View History

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 <memory>
2023-05-31 22:22:23 +02:00
#include <QString>
2022-06-27 20:45:01 +02:00
class ClientAccess {
ClientAccess();
public:
2023-05-31 22:22:23 +02:00
ClientAccess(const QString& token, uint16_t port);
2022-08-24 19:24:18 +02:00
static std::shared_ptr<ClientAccess> find();
2022-06-27 20:45:01 +02:00
public:
2023-05-31 22:22:23 +02:00
QString getBasicAuth() const;
2022-06-27 20:45:01 +02:00
uint16_t getPort() const;
2023-05-31 22:22:23 +02:00
QString getURL() const;
2022-06-27 20:45:01 +02:00
private:
2023-05-31 22:22:23 +02:00
QString authcode;
2022-06-27 20:45:01 +02:00
uint16_t port = 0;
2022-08-24 16:12:03 +02:00
};
std::shared_ptr<ClientAccess> createFromLockfile(std::istream& lockfile);