Fixed constructor to use move constructors.
This commit is contained in:
parent
fa2b801690
commit
a65c8d64b5
@ -21,7 +21,7 @@ namespace ehs
|
|||||||
Str_8 id;
|
Str_8 id;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Spotify
|
class Spotify final
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
SSL client;
|
SSL client;
|
||||||
@ -40,14 +40,14 @@ namespace ehs
|
|||||||
|
|
||||||
Spotify();
|
Spotify();
|
||||||
|
|
||||||
Spotify(const Str_8& clientId, const Str_8& secret, const Str_8& redURI, const Array<Str_8>& scopes, const bool forceVerify);
|
Spotify(Str_8 clientId, Str_8 secret, Str_8 redURI, Array<Str_8> scopes, bool forceVerify);
|
||||||
|
|
||||||
bool Authorize();
|
bool Authorize();
|
||||||
|
|
||||||
/// Sets the volume for a device.
|
/// Sets the volume for a device.
|
||||||
/// @param [in] level The percentage to set the volume to.
|
/// @param [in] level The percentage to set the volume to.
|
||||||
/// @returns The response code.
|
/// @returns The response code.
|
||||||
UInt_32 SetVolume(const UInt_8 level);
|
UInt_32 SetVolume(UInt_8 level);
|
||||||
|
|
||||||
/// Resume playback for a device.
|
/// Resume playback for a device.
|
||||||
/// @returns The response code.
|
/// @returns The response code.
|
||||||
@ -60,12 +60,12 @@ namespace ehs
|
|||||||
/// Repeats playback for a device.
|
/// Repeats playback for a device.
|
||||||
/// @param [in] status The status to set it to.
|
/// @param [in] status The status to set it to.
|
||||||
/// @returns The response code.
|
/// @returns The response code.
|
||||||
UInt_32 SetRepeat(const SpotifyState state);
|
UInt_32 SetRepeat(SpotifyState state);
|
||||||
|
|
||||||
/// Shuffles playback for a device.
|
/// Shuffles playback for a device.
|
||||||
/// @param [in] state The state to set shuffle to.
|
/// @param [in] state The state to set shuffle to.
|
||||||
/// @returns The response code.
|
/// @returns The response code.
|
||||||
UInt_32 SetShuffle(const bool state);
|
UInt_32 SetShuffle(bool state);
|
||||||
|
|
||||||
UInt_32 SearchTrack(Vector<Str_8>& artists, Str_8& id, Str_8& name);
|
UInt_32 SearchTrack(Vector<Str_8>& artists, Str_8& id, Str_8& name);
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ namespace ehs
|
|||||||
/// Seeks to a position of the currently playing track in milliseconds.
|
/// Seeks to a position of the currently playing track in milliseconds.
|
||||||
/// @param [in] pos The position in milliseconds to seek to.
|
/// @param [in] pos The position in milliseconds to seek to.
|
||||||
/// @returns The response code.
|
/// @returns The response code.
|
||||||
UInt_32 Seek(const UInt_32 pos);
|
UInt_32 Seek(UInt_32 pos);
|
||||||
|
|
||||||
Str_8 GetClientId() const;
|
Str_8 GetClientId() const;
|
||||||
|
|
||||||
|
@ -17,8 +17,9 @@ namespace ehs
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Spotify::Spotify(const Str_8& clientId, const Str_8& secret, const Str_8& redURI, const Array<Str_8>& scopes, const bool forceVerify)
|
Spotify::Spotify(Str_8 clientId, Str_8 secret, Str_8 redURI, Array<Str_8> scopes, const bool forceVerify)
|
||||||
: client(AddrType::IPV4), clientId(clientId), secret(secret), redURI(redURI), scopes(scopes), forceVerify(forceVerify)
|
: client(AddrType::IPV4), clientId((Str_8 &&)clientId), secret((Str_8 &&)secret), redURI((Str_8 &&)redURI),
|
||||||
|
scopes((Array<Str_8> &&)scopes), forceVerify(forceVerify)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user