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