diff options
Diffstat (limited to 'src/net/instance.h')
-rw-r--r-- | src/net/instance.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/instance.h b/src/net/instance.h index 2b7eec7..79c0b12 100644 --- a/src/net/instance.h +++ b/src/net/instance.h @@ -1,6 +1,11 @@ #pragma once #include "src/activitypub/appost.h" #include "src/settings_interface.h" +#include <QMetaType> +#include <memory> + +class Instance; +typedef std::shared_ptr<Instance> InstancePtr; class Instance { public: @@ -10,7 +15,7 @@ public: }; virtual ~Instance() {}; - virtual APPost* get_post_from_url(const QString &url) = 0; + virtual APPostPtr get_post_from_url(const QString &url) = 0; // Returns the URI the user has to visit in their browser virtual QString oauth2_step1(); // auth_code is the code given by the user through the URI @@ -18,7 +23,7 @@ public: virtual OAuth2Step2 oauth2_step2(const QString &auth_code); bool supports_oauth2 = false; // Creates an instance by reading the type from settings - static Instance* create_instance(); + static InstancePtr create_instance(); // Creates a specific type of instance, for use with SettingsDialog - static Instance* create_instance(AppSettingsTypes::InstanceType type); + static InstancePtr create_instance(AppSettingsTypes::InstanceType type); }; |