mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-01 01:53:23 -05:00
f82b22042f
In preparation for the new endpoints the following refactorings where done in lastfm.c: - Initialize lastfm.c in main.c instead of on first scrobble attempt (necessary to retrieve the correct lastfm status) - Return error messages if login attempt failed - Add api function for status and logout - Notify about Last.fm status changes Unrelated changes in lastfm.c are: - Refactoring of request_post - Add request parameters sorted alphabetically and remove calling the sort method in request_post
26 lines
320 B
C
26 lines
320 B
C
|
|
#ifndef __LASTFM_H__
|
|
#define __LASTFM_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
int
|
|
lastfm_login_user(const char *user, const char *password, char **errmsg);
|
|
|
|
void
|
|
lastfm_login(char **arglist);
|
|
|
|
void
|
|
lastfm_logout(void);
|
|
|
|
int
|
|
lastfm_scrobble(int id);
|
|
|
|
bool
|
|
lastfm_is_enabled(void);
|
|
|
|
int
|
|
lastfm_init(void);
|
|
|
|
#endif /* !__LASTFM_H__ */
|