2019-09-09 22:27:46 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class Credentials
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static Credentials &getInstance();
|
|
|
|
|
2019-09-14 20:45:01 +02:00
|
|
|
void get(const QString &provider, const QString &name, QObject *receiver,
|
2019-09-14 18:38:09 +02:00
|
|
|
std::function<void(const QString &)> &&onLoaded);
|
2019-09-09 22:27:46 +02:00
|
|
|
void set(const QString &provider, const QString &name,
|
|
|
|
const QString &credential);
|
|
|
|
void erase(const QString &provider, const QString &name);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Credentials();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|