2014-03-11 23:20:29 +01:00
|
|
|
|
|
|
|
#ifndef __SPOTIFY_H__
|
|
|
|
#define __SPOTIFY_H__
|
|
|
|
|
2015-10-19 21:15:29 +02:00
|
|
|
#include <event2/event.h>
|
|
|
|
#include <event2/buffer.h>
|
2016-11-05 13:44:23 +01:00
|
|
|
#include <event2/http.h>
|
2017-08-19 08:36:43 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
|
|
|
|
struct spotify_status_info
|
|
|
|
{
|
|
|
|
bool libspotify_installed;
|
|
|
|
bool libspotify_logged_in;
|
|
|
|
char libspotify_user[100];
|
|
|
|
};
|
2014-03-11 23:20:29 +01:00
|
|
|
|
2018-03-01 17:29:10 +01:00
|
|
|
#define SPOTIFY_SETUP_ERROR_IS_LOADING -2
|
|
|
|
|
2014-03-11 23:20:29 +01:00
|
|
|
int
|
2016-10-26 19:37:41 +02:00
|
|
|
spotify_playback_setup(const char *path);
|
2015-09-12 07:45:31 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
spotify_playback_play();
|
|
|
|
|
|
|
|
int
|
|
|
|
spotify_playback_pause();
|
2014-03-11 23:20:29 +01:00
|
|
|
|
2014-03-23 21:45:06 +01:00
|
|
|
void
|
|
|
|
spotify_playback_pause_nonblock(void);
|
2014-03-11 23:20:29 +01:00
|
|
|
|
|
|
|
int
|
|
|
|
spotify_playback_stop(void);
|
|
|
|
|
2014-03-23 21:45:06 +01:00
|
|
|
void
|
|
|
|
spotify_playback_stop_nonblock(void);
|
|
|
|
|
2014-03-11 23:20:29 +01:00
|
|
|
int
|
|
|
|
spotify_playback_seek(int ms);
|
|
|
|
|
2017-12-27 18:51:11 +01:00
|
|
|
int
|
|
|
|
spotify_artwork_get(struct evbuffer *evbuf, char *path, int max_w, int max_h);
|
|
|
|
|
2017-08-28 21:14:35 +02:00
|
|
|
int
|
2018-03-02 19:24:35 +01:00
|
|
|
spotify_relogin();
|
2016-11-05 13:44:23 +01:00
|
|
|
|
2017-08-27 07:20:50 +02:00
|
|
|
int
|
|
|
|
spotify_login_user(const char *user, const char *password, char **errmsg);
|
|
|
|
|
2014-03-11 23:20:29 +01:00
|
|
|
void
|
2017-06-14 23:49:18 +02:00
|
|
|
spotify_login(char **arglist);
|
2014-03-11 23:20:29 +01:00
|
|
|
|
2017-08-19 08:36:43 +02:00
|
|
|
void
|
|
|
|
spotify_status_info_get(struct spotify_status_info *info);
|
|
|
|
|
2018-03-02 19:24:35 +01:00
|
|
|
void
|
|
|
|
spotify_uri_register(const char *uri);
|
|
|
|
|
2014-03-11 23:20:29 +01:00
|
|
|
int
|
|
|
|
spotify_init(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
spotify_deinit(void);
|
|
|
|
|
|
|
|
#endif /* !__SPOTIFY_H__ */
|