-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start using NewSimpleFuture in ServerConnection
- Loading branch information
1 parent
24ededb
commit 044ac8f
Showing
24 changed files
with
132 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
/* | ||
Copyright (C) 2017-2023, Kevin Andre <[email protected]> | ||
Copyright (C) 2017-2024, Kevin Andre <[email protected]> | ||
This file is part of PMP (Party Music Player). | ||
|
@@ -21,7 21,7 @@ | |
#define PMP_PLAYERCONTROLLER_H | ||
|
||
#include "common/tribool.h" | ||
#include "common/future.h" | ||
#include "common/newfuture.h" | ||
#include "common/playermode.h" | ||
#include "common/playerstate.h" | ||
#include "common/resultmessageerrorcode.h" | ||
|
@@ -54,11 54,11 @@ namespace PMP::Client | |
virtual int volume() const = 0; | ||
|
||
virtual QDateTime delayedStartServerDeadline() = 0; | ||
virtual SimpleFuture<AnyResultMessageCode> activateDelayedStart( | ||
virtual NewSimpleFuture<AnyResultMessageCode> activateDelayedStart( | ||
qint64 delayMilliseconds) = 0; | ||
virtual SimpleFuture<AnyResultMessageCode> activateDelayedStart( | ||
virtual NewSimpleFuture<AnyResultMessageCode> activateDelayedStart( | ||
QDateTime startTime) = 0; | ||
virtual SimpleFuture<AnyResultMessageCode> deactivateDelayedStart() = 0; | ||
virtual NewSimpleFuture<AnyResultMessageCode> deactivateDelayedStart() = 0; | ||
|
||
public Q_SLOTS: | ||
virtual void play() = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
/* | ||
Copyright (C) 2020-2022, Kevin Andre <[email protected]> | ||
Copyright (C) 2020-2024, Kevin Andre <[email protected]> | ||
This file is part of PMP (Party Music Player). | ||
|
@@ -145,13 145,13 @@ namespace PMP::Client | |
return _delayedStartServerDeadline; | ||
} | ||
|
||
SimpleFuture<AnyResultMessageCode> PlayerControllerImpl::activateDelayedStart( | ||
NewSimpleFuture<AnyResultMessageCode> PlayerControllerImpl::activateDelayedStart( | ||
qint64 delayMilliseconds) | ||
{ | ||
return _connection->activateDelayedStart(delayMilliseconds); | ||
} | ||
|
||
SimpleFuture<AnyResultMessageCode> PlayerControllerImpl::activateDelayedStart( | ||
NewSimpleFuture<AnyResultMessageCode> PlayerControllerImpl::activateDelayedStart( | ||
QDateTime startTime) | ||
{ | ||
auto delayMilliseconds = | ||
|
@@ -160,7 160,7 @@ namespace PMP::Client | |
return activateDelayedStart(delayMilliseconds); | ||
} | ||
|
||
SimpleFuture<AnyResultMessageCode> PlayerControllerImpl::deactivateDelayedStart() | ||
NewSimpleFuture<AnyResultMessageCode> PlayerControllerImpl::deactivateDelayedStart() | ||
{ | ||
return _connection->deactivateDelayedStart(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
/* | ||
Copyright (C) 2022-2023, Kevin Andre <[email protected]> | ||
Copyright (C) 2022-2024, Kevin Andre <[email protected]> | ||
This file is part of PMP (Party Music Player). | ||
|
@@ -20,7 20,7 @@ | |
#ifndef PMP_SCROBBLINGCONTROLLER_H | ||
#define PMP_SCROBBLINGCONTROLLER_H | ||
|
||
#include "common/future.h" | ||
#include "common/newfuture.h" | ||
#include "common/nullable.h" | ||
#include "common/resultmessageerrorcode.h" | ||
#include "common/scrobblerstatus.h" | ||
|
@@ -38,7 38,7 @@ namespace PMP::Client | |
virtual Nullable<bool> lastFmEnabled() const = 0; | ||
virtual ScrobblerStatus lastFmStatus() const = 0; | ||
|
||
virtual SimpleFuture<AnyResultMessageCode> authenticateLastFm( | ||
virtual NewSimpleFuture<AnyResultMessageCode> authenticateLastFm( | ||
QString usernameOrEmail, | ||
QString password) = 0; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
/* | ||
Copyright (C) 2022-2023, Kevin Andre <[email protected]> | ||
Copyright (C) 2022-2024, Kevin Andre <[email protected]> | ||
This file is part of PMP (Party Music Player). | ||
|
@@ -91,7 91,7 @@ namespace PMP::Client | |
return _lastFmStatus; | ||
} | ||
|
||
SimpleFuture<AnyResultMessageCode> ScrobblingControllerImpl::authenticateLastFm( | ||
NewSimpleFuture<AnyResultMessageCode> ScrobblingControllerImpl::authenticateLastFm( | ||
QString usernameOrEmail, | ||
QString password) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
/* | ||
Copyright (C) 2022-2023, Kevin Andre <[email protected]> | ||
Copyright (C) 2022-2024, Kevin Andre <[email protected]> | ||
This file is part of PMP (Party Music Player). | ||
|
@@ -35,7 35,7 @@ namespace PMP::Client | |
Nullable<bool> lastFmEnabled() const override; | ||
ScrobblerStatus lastFmStatus() const override; | ||
|
||
SimpleFuture<AnyResultMessageCode> authenticateLastFm(QString usernameOrEmail, | ||
NewSimpleFuture<AnyResultMessageCode> authenticateLastFm(QString usernameOrEmail, | ||
QString password) override; | ||
|
||
public Q_SLOTS: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.