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];
|
|
|
|
|
|
|
|
bool webapi_token_valid;
|
|
|
|
char webapi_user[100];
|
|
|
|
};
|
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);
|
|
|
|
|
2014-04-04 17:14:43 -04:00
|
|
|
int
|
|
|
|
spotify_artwork_get(struct evbuffer *evbuf, char *path, int max_w, int max_h);
|
|
|
|
|
2016-11-05 08:44:23 -04:00
|
|
|
void
|
|
|
|
spotify_oauth_interface(struct evbuffer *evbuf, const char *redirect_uri);
|
|
|
|
|
|
|
|
void
|
|
|
|
spotify_oauth_callback(struct evbuffer *evbuf, struct evkeyvalq *param, const char *redirect_uri);
|
|
|
|
|
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);
|
|
|
|
|
2014-03-11 18:20:29 -04:00
|
|
|
int
|
|
|
|
spotify_init(void);
|
|
|
|
|
|
|
|
void
|
|
|
|
spotify_deinit(void);
|
|
|
|
|
|
|
|
#endif /* !__SPOTIFY_H__ */
|