Add https support to localredirectserver

This commit is contained in:
Jonas Kvinge
2019-04-15 22:17:40 +02:00
parent e9bf04031b
commit 7f23b9b424
12 changed files with 290 additions and 66 deletions

View File

@@ -59,13 +59,14 @@ class ScrobblingAPI20 : public ScrobblerService {
virtual ScrobblerCache *cache() = 0;
bool IsEnabled() const { return enabled_; }
bool IsUseHTTPS() const { return https_; }
bool IsAuthenticated() const { return !username_.isEmpty() && !session_key_.isEmpty(); }
bool IsSubscriber() const { return subscriber_; }
bool IsSubmitted() const { return submitted_; }
void Submitted() { submitted_ = true; }
QString username() const { return username_; }
void Authenticate();
void Authenticate(const bool https = false);
void Logout();
void UpdateNowPlaying(const Song &song);
void Scrobble(const Song &song);
@@ -143,6 +144,7 @@ class ScrobblingAPI20 : public ScrobblerService {
Application *app_;
bool enabled_;
bool https_;
bool subscriber_;
QString username_;