so://phie

rx

A terminal-based radio player
git clone git://soophie.de/rx

blob: d2c2fa8720f95d0c49fc161bb4f1e494a6f7db97 (549 bytes)[doc][blame][raw]

1#pragma once

2

3#include <stdbool.h>

4#include <time.h>

5#include <mpv/client.h>

6

7#define RX_UPDATE_COUNT 50

8

9typedef struct {

10 char uid[256];

11 char name[256];

12 char *addr;

13 char *url;

14 char *resolver;

15} rx_station_t;

16

17typedef struct {

18 bool quit;

19 rx_station_t *stations;

20 size_t stations_len;

21 const rx_station_t *curr;

22 mpv_handle *ctx;

23 int idx;

24 int count;

25 char *title;

26 int loading;

27 int error;

28 char message[500];

29} rx_t;

30

31void rx_init(rx_t *self);

32void rx_update(rx_t *self);

33void rx_draw(rx_t *self);

34void rx_free(rx_t *self);