1 /*
2  * music player command (mpc)
3  * Copyright 2003-2018 The Music Player Daemon Project
4  * http://www.musicpd.org
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef OPTIONS_H
22 #define OPTIONS_H
23 
24 #include <stdbool.h>
25 
26 #define V_QUIET 0
27 #define V_DEFAULT 1
28 #define V_VERBOSE 2
29 #define F_DEFAULT \
30     "[%name%: &[[%artist%|%performer%|%composer%|%albumartist%] - ]%title%]|%name%|[[%artist%|%performer%|%composer%|%albumartist%] - ]%title%|%file%"
31 
32 struct Range {
33 	unsigned start, end;
34 };
35 
36 struct Options {
37 	const char *host;
38 	const char *port_str;
39 	int port;
40 	const char *password;
41 	const char *format;
42 
43 	struct Range range;
44 
45 	int verbosity; // 0 for quiet, 1 for default, 2 for verbose
46 	bool wait;
47 
48 	bool custom_format;
49 };
50 
51 
52 void print_option_help(void);
53 void parse_options(int * argc_p, char ** argv);
54 
55 extern struct Options options;
56 
57 #endif /* OPTIONS_H */
58