-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlastfm_client.cpp
More file actions
58 lines (47 loc) · 1.19 KB
/
lastfm_client.cpp
File metadata and controls
58 lines (47 loc) · 1.19 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// lastfm_client.cpp
// foo_scrobbler_win
//
// (c) 2025-2026 by Konstantinos Kyriakopoulos
//
#include "stdafx.h"
#include "lastfm_client.h"
#include "lastfm_auth.h"
#include "lastfm_state.h"
bool LastfmClient::isSuspended() const
{
return lastfmIsSuspended();
}
bool LastfmClient::isAuthenticated() const
{
return lastfmIsAuthenticated();
}
LastfmScrobbleResult LastfmClient::updateNowPlaying(const LastfmTrackInfo& track)
{
return api.updateNowPlaying(track);
}
LastfmScrobbleResult LastfmClient::scrobble(const LastfmTrackInfo& track, double playbackSeconds,
std::time_t startTimestamp)
{
return api.scrobble(track, playbackSeconds, startTimestamp);
}
LastfmScrobbleResult LastfmClient::scrobbleBatch(const std::vector<LastfmScrobbleRequest>& requests)
{
return api.scrobbleBatch(requests);
}
bool LastfmClient::startAuth(std::string& outUrl)
{
return beginAuth(outUrl);
}
bool LastfmClient::completeAuth(LastfmAuthState& outState)
{
return completeAuthFromCallbackUrl("", outState);
}
void LastfmClient::logout()
{
clearAuthentication();
}
bool LastfmClient::hasPendingToken() const
{
return ::hasPendingToken();
}