forked from lipnitsk/mocp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.h
59 lines (51 loc) · 1.68 KB
/
interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef INTERFACE_H
#define INTERFACE_H
#include "lists.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The desired state of the client (and server). */
enum want_quit {
NO_QUIT, /* don't want to quit */
QUIT_CLIENT, /* only quit the client */
QUIT_SERVER /* quit the client and the server */
};
/* Information about the currently played file. */
struct file_tags;
struct file_info {
char *file;
struct file_tags *tags;
char *title;
int avg_bitrate;
int bitrate;
int rate;
int curr_time;
int total_time;
int channels;
int state; /* STATE_* */
char *block_file;
int block_start;
int block_end;
};
void init_interface (const int sock, const int logging, lists_t_strs *args);
void interface_loop ();
void interface_end ();
int user_wants_interrupt ();
void interface_error (const char *msg);
void interface_fatal (const char *format, ...) ATTR_PRINTF(1, 2);
void interface_cmdline_clear_plist (int server_sock);
void interface_cmdline_append (int server_sock, lists_t_strs *args);
void interface_cmdline_play_first (int server_sock);
void interface_cmdline_file_info (const int server_sock);
void interface_cmdline_playit (int server_sock, lists_t_strs *args);
void interface_cmdline_seek_by (int server_sock, const int seek_by);
void interface_cmdline_jump_to_percent (int server_sock, const int percent);
void interface_cmdline_jump_to (int server_sock, const int pos);
void interface_cmdline_adj_volume (int server_sock, const char *arg);
void interface_cmdline_set (int server_sock, char *arg, const int val);
void interface_cmdline_formatted_info (const int server_sock, const char *format_str);
void interface_cmdline_enqueue (int server_sock, lists_t_strs *args);
#ifdef __cplusplus
}
#endif
#endif