aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/instance.cpp
blob: 6982f64d31bf34dd51fac25e6c021f5a47f13cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "instance.h"
#ifdef MASTODONPP_BUILD
#include "mastodon_instance.h"
#endif
#include "src/settings_interface.h"

Instance* Instance::create_instance() {
    return create_instance(SettingsInterface::quick_read_setting<AppSettingsTypes::InstanceType>("net/instance/type"));
}

Instance* Instance::create_instance(AppSettingsTypes::InstanceType type) {
    switch (type) {
#ifdef MASTODONPP_BUILD
        case AppSettingsTypes::InstanceType::MASTODON:
            return new MastodonInstance;
#endif
        default:
            return nullptr;
    }
}

QString Instance::oauth2_step1() {
    return "";
}

Instance::OAuth2Step2 Instance::oauth2_step2(const QString &auth_code) {
    return {false};
}