diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-17 15:03:59 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-17 15:03:59 +0000 |
commit | b6867dc9980d19ff6d0954a2a5c7aff7b2b713c3 (patch) | |
tree | 2be5d3bfa85a9363711eff0bccec74d3c13e5d4d /apps/radio/radio.h | |
parent | 4862fe4451e3cf17f1c0e369991c37150d9ba560 (diff) | |
download | rockbox-b6867dc9980d19ff6d0954a2a5c7aff7b2b713c3.tar.gz rockbox-b6867dc9980d19ff6d0954a2a5c7aff7b2b713c3.zip |
split the radio code into multiple files in the hope that makes it more likely for someone to want to work on! :D
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26109 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/radio/radio.h')
-rw-r--r-- | apps/radio/radio.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/apps/radio/radio.h b/apps/radio/radio.h new file mode 100644 index 0000000000..f7b0a0e80b --- /dev/null +++ b/apps/radio/radio.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2003 Linus Nielsen Feltzing | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef RADIO_H | ||
22 | #define RADIO_H | ||
23 | |||
24 | #ifndef FMRADIO_H | ||
25 | #include "fmradio.h" | ||
26 | #endif | ||
27 | #include "screen_access.h" | ||
28 | #include "bmp.h" | ||
29 | |||
30 | enum { | ||
31 | RADIO_SCAN_MODE = 0, | ||
32 | RADIO_PRESET_MODE, | ||
33 | }; | ||
34 | |||
35 | #if CONFIG_TUNER | ||
36 | void radio_load_presets(char *filename); | ||
37 | void radio_init(void) INIT_ATTR; | ||
38 | int radio_screen(void); | ||
39 | void radio_start(void); | ||
40 | void radio_pause(void); | ||
41 | void radio_stop(void); | ||
42 | bool radio_hardware_present(void); | ||
43 | bool in_radio_screen(void); | ||
44 | |||
45 | bool radio_scan_mode(void); /* true for scan mode, false for preset mode */ | ||
46 | bool radio_is_stereo(void); | ||
47 | int radio_current_frequency(void); | ||
48 | int radio_current_preset(void); | ||
49 | int radio_preset_count(void); | ||
50 | const struct fmstation *radio_get_preset(int preset); | ||
51 | |||
52 | /* skin functions */ | ||
53 | void fms_data_load(enum screen_type screen, const char *buf, bool isfile); | ||
54 | void fms_skin_init(void); | ||
55 | |||
56 | /* callbacks for the radio settings */ | ||
57 | void set_radio_region(int region); | ||
58 | void toggle_mono_mode(bool mono); | ||
59 | |||
60 | #define MAX_FMPRESET_LEN 27 | ||
61 | |||
62 | struct fmstation | ||
63 | { | ||
64 | int frequency; /* In Hz */ | ||
65 | char name[MAX_FMPRESET_LEN+1]; | ||
66 | }; | ||
67 | const char* radio_get_preset_name(int preset); | ||
68 | |||
69 | #ifdef HAVE_ALBUMART | ||
70 | void radioart_init(bool entering_screen); | ||
71 | int radio_get_art_hid(struct dim *requested_dim); | ||
72 | #endif | ||
73 | |||
74 | void next_station(int direction); | ||
75 | |||
76 | |||
77 | enum fms_exiting { | ||
78 | FMS_EXIT, | ||
79 | FMS_ENTER | ||
80 | }; | ||
81 | |||
82 | #endif /* CONFIG_TUNER */ | ||
83 | |||
84 | #endif /* RADIO_H */ | ||