1 |
ben |
1 |
#ifndef CONTROLLER_H |
2 |
|
|
#define CONTROLLER_H |
3 |
|
|
typedef struct { |
4 |
|
|
gchar* config_path; |
5 |
|
|
gchar* ip; /* MPD ip address */ |
6 |
|
|
gint port; /* MPD tcp port */ |
7 |
|
|
int sock; |
8 |
|
|
GtkMenu* right_menu; |
9 |
|
|
GtkStatusIcon* status_icon; |
10 |
|
|
GtkWindow* pref_window; |
11 |
|
|
GtkEntry* ip_entry; |
12 |
|
|
GtkSpinButton* port_spin; |
13 |
|
|
GtkMenuItem* pref_item; |
14 |
ben |
17 |
GtkWidget* volume; |
15 |
ben |
1 |
} AppData; |
16 |
|
|
|
17 |
|
|
void quit(AppData* d); |
18 |
|
|
void read_config (AppData* d); |
19 |
|
|
void write_config (AppData* d); |
20 |
|
|
int mpd_connect (const char* host, int port); |
21 |
|
|
void mpd_disconnect (int sockfd); |
22 |
|
|
gboolean mpd_control (int sockfd, const gchar* ctl); |
23 |
|
|
gint mpd_get_vol(int sockfd); |
24 |
|
|
gchar* mpd_get_song(int sockfd); |
25 |
|
|
#endif |