aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/instance.cpp
blob: 8b2ad2de90f867379f26791e0f1534f19be162d3 (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"

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

InstancePtr Instance::create_instance(AppSettingsTypes::InstanceType type) {
    switch (type) {
#ifdef MASTODONPP_BUILD
        case AppSettingsTypes::InstanceType::MASTODON:
            return std::make_shared<MastodonInstance>();
#endif
        default:
            return nullptr;
    }
}

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

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