owntone-server/src/lastfm.h
chme f82b22042f [lastfm/jsonapi/ws/main] New JSON-API-endpoints for Last.fm integration
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
2017-10-28 12:22:45 +02:00

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__ */