1f09035bfb
Use full path in includes Sort includes Move anon namespace out of chatterino namespace Use auto * where possible Disable convert-member-function-to-static check for all member functions Don't use else after return Removed empty constructor Replace use of `boost::variant` with `std::variant` Co-authored-by: nerix <nerixdev@outlook.de>
26 lines
538 B
C++
26 lines
538 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
#include <functional>
|
|
|
|
namespace chatterino {
|
|
|
|
class Credentials
|
|
{
|
|
public:
|
|
static Credentials &instance();
|
|
|
|
void get(const QString &provider, const QString &name, QObject *receiver,
|
|
std::function<void(const QString &)> &&onLoaded);
|
|
void set(const QString &provider, const QString &name,
|
|
const QString &credential);
|
|
void erase(const QString &provider, const QString &name);
|
|
|
|
private:
|
|
Credentials() = default;
|
|
};
|
|
|
|
} // namespace chatterino
|