summaryrefslogtreecommitdiff
path: root/utils/wpseditor/libwps/src
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/libwps/src')
-rw-r--r--utils/wpseditor/libwps/src/api.c289
-rw-r--r--utils/wpseditor/libwps/src/api.h106
-rw-r--r--utils/wpseditor/libwps/src/defs.h62
-rw-r--r--utils/wpseditor/libwps/src/dummies.c389
-rw-r--r--utils/wpseditor/libwps/src/dummies.h65
-rw-r--r--utils/wpseditor/libwps/src/include/lang.h31
-rw-r--r--utils/wpseditor/libwps/src/include/remote_rockboxlogo.h1
-rw-r--r--utils/wpseditor/libwps/src/include/rockboxlogo.h1
-rw-r--r--utils/wpseditor/libwps/src/include/sysfont.h22
-rw-r--r--utils/wpseditor/libwps/src/include/system-target.h1
-rw-r--r--utils/wpseditor/libwps/src/lcd.c179
-rw-r--r--utils/wpseditor/libwps/src/proxy.c152
-rw-r--r--utils/wpseditor/libwps/src/proxy.h48
-rw-r--r--utils/wpseditor/libwps/src/wpsstate.h55
14 files changed, 0 insertions, 1401 deletions
diff --git a/utils/wpseditor/libwps/src/api.c b/utils/wpseditor/libwps/src/api.c
deleted file mode 100644
index f926f8bd90..0000000000
--- a/utils/wpseditor/libwps/src/api.c
+++ /dev/null
@@ -1,289 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#include <stdio.h>
23#include <stdlib.h>
24#include "sound.h"
25#include "api.h"
26#include "proxy.h"
27#include "dummies.h"
28#include "scroll_engine.h"
29#include "wpsstate.h"
30#include <string.h>
31
32struct proxy_api *xapi;
33
34void get_current_vp(struct viewport_api *avp);
35/*************************************************************
36
37*************************************************************/
38#ifdef HAVE_LCD_BITMAP
39void screen_clear_area(struct screen * display, int xstart, int ystart,
40 int width, int height) {
41 display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
42 display->fillrect(xstart, ystart, width, height);
43 display->set_drawmode(DRMODE_SOLID);
44}
45#endif
46
47bool load_wps_backdrop(char* filename) {
48 return xapi->load_wps_backdrop(filename);
49}
50
51bool load_remote_wps_backdrop(char* filename) {
52 return xapi->load_remote_wps_backdrop(filename);
53}
54
55int read_bmp_file(const char* filename,struct bitmap *bm, int maxsize,int format) {
56 if (!xapi->read_bmp_file) {
57 DEBUGF1("can't read bmp file! NULL api!\n");
58 return -1;
59 }
60 bm->format = 3;//FORMAT_ANY?
61 bm->data = (unsigned char*)malloc(255);
62 memset(bm->data,0,255);
63 strcpy((char*)bm->data,filename);
64 //bm->data[strlen(filename)] = '\0';
65 xapi->read_bmp_file(filename,&bm->width, &bm->height);
66 return 1;
67}
68
69bool load_wps_backdrop2(char* filename) {
70 DEBUGF1("load_wps_backdrop(char* filename='%s')",filename);
71 return true;
72}
73
74bool load_remote_wps_backdrop2(char* filename) {
75 DEBUGF1("load_remote_wps_backdrop2(char* filename='%s')",filename);
76 return true;
77}
78
79void stop_scroll() {
80 DEBUGF3("stop_scroll\n");
81 return;
82}
83
84void puts_scroll(int x, int y, const unsigned char *string) {
85 DEBUGF2("puts_scroll(int x=%d, int y=%d, const unsigned char *string='%s'\n",x,y,string);
86}
87
88void putsxy(int x, int y, const unsigned char *str) {
89 DEBUGF2("putsxy(int =%d, int y=%d, const unsigned char *str='%s')\n",x,y,str);
90}
91
92void lcd_update() {
93 DEBUGF3("update\n");
94}
95
96void clear_viewport(int x, int y, int w, int h, int color) {
97 DEBUGF3("clear_viewport(int x=%d, int y=%d, int w=%d, int h=%d, int color=%d)\n", x, y, w, h, color);
98};
99
100int getstringsize(const unsigned char *str, int *w, int *h) {
101 //DEBUGF1("getstringsize(const unsigned char *str=\"%s\", int *w=%d, int *h=%d \n",str,*w,*h);
102 *w=strlen((char*)str)*sysfont.maxwidth;
103 *h=sysfont.height;
104 return 1;
105}
106
107void set_wpsstate(struct wpsstate state) {
108 sysfont.height = state.fontheight;
109 sysfont.maxwidth = state.fontwidth;
110 global_settings.volume = state.volume;
111 battery_percent = state.battery_level;
112 _audio_status = state.audio_status;
113}
114
115void set_trackstate(struct trackstate state) {
116 if (!(gui_wps[0].state) ||
117 !(gui_wps[0].state->id3))
118 return;
119 gui_wps[0].state->id3->title = state.title;
120 gui_wps[0].state->id3->artist = state.artist;
121 gui_wps[0].state->id3->album = state.album;
122 gui_wps[0].state->id3->elapsed = state.elapsed;
123 gui_wps[0].state->id3->length = state.length;
124}
125
126void set_next_trackstate(struct trackstate state) {
127 gui_wps[0].state->nid3->title = state.title;
128 gui_wps[0].state->nid3->artist = state.artist;
129 gui_wps[0].state->nid3->album = state.album;
130 gui_wps[0].state->nid3->elapsed = state.elapsed;
131 gui_wps[0].state->nid3->length = state.length;
132}
133
134enum api_playmode playmodes[PLAYMODES_NUM] = {
135 API_STATUS_PLAY,
136 API_STATUS_STOP,
137 API_STATUS_PAUSE,
138 API_STATUS_FASTFORWARD,
139 API_STATUS_FASTBACKWARD
140 };
141
142const char *playmodeNames[] = {
143 "Play", "Stop", "Pause", "FastForward", "FastBackward"
144 };
145
146
147void set_audio_status(int status) {
148 DEBUGF1("%s",playmodeNames[status]);
149 switch (status) {
150 case API_STATUS_PLAY:
151 _audio_status = AUDIO_STATUS_PLAY;
152 status_set_ffmode(STATUS_PLAY);
153 break;
154 case API_STATUS_STOP:
155 _audio_status = 0;
156 status_set_ffmode(STATUS_STOP);
157 break;
158 case API_STATUS_PAUSE:
159 _audio_status = AUDIO_STATUS_PAUSE;
160 status_set_ffmode(STATUS_PLAY);
161 break;
162 case API_STATUS_FASTFORWARD:
163 status_set_ffmode(STATUS_FASTFORWARD);
164 break;
165 case API_STATUS_FASTBACKWARD:
166 status_set_ffmode(STATUS_FASTBACKWARD);
167 break;
168 default:
169 DEBUGF1("ERR: Unknown status");
170 }
171}
172
173void test_api(struct proxy_api *api) {
174 if (!api->stop_scroll)
175 api->stop_scroll=stop_scroll;
176 if (!api->set_viewport)
177 api->set_viewport=lcd_set_viewport;
178 if (!api->clear_viewport)
179 api->clear_viewport=clear_viewport;
180 if (!api->getstringsize)
181 api->getstringsize=getstringsize;
182 if (!api->getwidth)
183 api->getwidth=lcd_getwidth;
184 if (!api->getheight)
185 api->getheight=lcd_getheight;
186 if (!api->set_drawmode)
187 api->set_drawmode=lcd_set_drawmode;
188 if (!api->puts_scroll)
189 api->puts_scroll=puts_scroll;
190 if (!api->update)
191 api->update=lcd_update;
192 if (!api->clear_display)
193 api->clear_display=lcd_clear_display;
194 if (!api->getfont)
195 api->getfont=lcd_getfont;
196 if (!api->putsxy)
197 api->putsxy=putsxy;
198
199#if LCD_DEPTH > 1
200 if (!api->get_foreground)
201 api->get_foreground=lcd_get_foreground;
202 if (!api->get_background)
203 api->get_background=lcd_get_background;
204#endif
205 if (!api->load_remote_wps_backdrop)
206 api->load_remote_wps_backdrop = load_remote_wps_backdrop2;
207 if (!api->load_wps_backdrop)
208 api->load_wps_backdrop = load_wps_backdrop2;
209 //dbgf = printf;
210}
211
212/**************************************************************
213
214**************************************************************/
215
216int set_api(struct proxy_api* api) {
217 if (api->debugf)
218 dbgf = api->debugf;
219 screens[0].screen_type=SCREEN_MAIN;
220 screens[0].lcdwidth=LCD_WIDTH;
221 screens[0].lcdheight=LCD_HEIGHT;
222 screens[0].depth=LCD_DEPTH;
223#ifdef HAVE_LCD_COLOR
224 screens[0].is_color=true;
225#else
226 screens[0].is_color=false;
227#endif
228 if (api->stop_scroll)
229 screens[0].stop_scroll=api->stop_scroll;
230 screens[0].scroll_stop = lcd_scroll_stop;
231 if (api->set_viewport)
232 screens[0].set_viewport=api->set_viewport;
233 if (api->clear_viewport)
234 screens[0].clear_viewport=lcd_clear_viewport;
235 if (api->getstringsize)
236 screens[0].getstringsize=api->getstringsize;
237 if (api->getwidth)
238 screens[0].getwidth=api->getwidth;
239 if (api->getheight)
240 screens[0].getheight=api->getheight;
241 if (api->set_drawmode)
242 screens[0].set_drawmode=api->set_drawmode;
243 if (api->fillrect)
244 screens[0].fillrect=api->fillrect;
245 if (api->puts_scroll)
246 screens[0].puts_scroll=api->puts_scroll;
247 if (api->transparent_bitmap_part)
248 screens[0].transparent_bitmap_part=api->transparent_bitmap_part;
249 if (api->update)
250 screens[0].update=api->update;
251 if (api->clear_display)
252 screens[0].clear_display=api->clear_display;
253 if (api->getfont)
254 screens[0].getfont=api->getfont;
255 if (api->hline)
256 screens[0].hline=api->hline;
257 if (api->vline)
258 screens[0].vline=api->vline;
259 if (api->drawpixel)
260 screens[0].drawpixel=api->drawpixel;
261 if (api->putsxy)
262 screens[0].putsxy=api->putsxy;
263#if LCD_DEPTH > 1
264 if (api->get_foreground)
265 screens[0].get_foreground=api->get_foreground;
266 if (api->get_background)
267 screens[0].get_background=api->get_background;
268#endif
269
270 screens[0].bitmap_part = api->bitmap_part;
271 /**************************
272 * OUT *
273 **************************/
274 api->get_model_name = get_model_name;
275 api->get_current_vp = get_current_vp;
276 api->set_wpsstate = set_wpsstate;
277 api->set_trackstate = set_trackstate;
278 api->set_next_trackstate= set_next_trackstate;
279 api->set_audio_status= set_audio_status;
280 xapi = api;
281 return 0;
282}
283
284
285
286
287
288
289
diff --git a/utils/wpseditor/libwps/src/api.h b/utils/wpseditor/libwps/src/api.h
deleted file mode 100644
index 3fa351609f..0000000000
--- a/utils/wpseditor/libwps/src/api.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#ifndef API_H_INCLUDED
23#define API_H_INCLUDED
24#include <stdbool.h>
25#include <stddef.h>
26#include "defs.h"
27#include "wpsstate.h"
28#ifdef __PCTOOL__
29#include "dummies.h"
30#endif
31
32struct viewport_api {
33 int x;
34 int y;
35 int width;
36 int height;
37 int font;
38 int drawmode;
39 unsigned fg_pattern;
40 unsigned bg_pattern;
41 unsigned lss_pattern;
42 unsigned lse_pattern;
43 unsigned lst_pattern;
44
45 //TODO: ??
46 int fontheight;
47 int fontwidth;
48};
49
50struct proxy_api
51{
52 bool (*load_remote_wps_backdrop)(char* file_name);
53 bool (*load_wps_backdrop)(char* file_name);
54
55 unsigned (*get_foreground)(void);
56 unsigned (*get_background)(void);
57 int (*getwidth)(void);
58 int (*getheight)(void);
59
60 void (*puts_scroll)(int x, int y, const unsigned char *string);
61 void (*putsxy)(int x, int y, const unsigned char *str);
62 int (*getfont)();
63 int (*getstringsize)(const unsigned char *str, int *w, int *h);
64 void (*stop_scroll)();
65
66 void (*transparent_bitmap_part)(const void *src, int src_x, int src_y,
67 int stride, int x, int y, int width, int height);
68 void (*bitmap_part)(const void *src, int src_x, int src_y,
69 int stride, int x, int y, int width, int height);
70 void (*hline)(int x1, int x2, int y);
71 void (*vline)(int x, int y1, int y2);
72 void (*drawpixel)(int x, int y);
73 void (*set_drawmode)(int mode);
74 void (*fillrect)(int x, int y, int width, int height);
75
76
77 void (*update)();
78 void (*set_viewport)(struct viewport* vp);
79 void (*clear_display)(void);
80 void (*clear_viewport)(int x,int y,int w,int h, int color);
81
82 void* (*plugin_get_buffer)(size_t *buffer_size);
83 int (*read_bmp_file)(const char* filename,int *width, int *height);
84 void (*set_wpsstate)(struct wpsstate state);
85 void (*set_trackstate)(struct trackstate state);
86 void (*set_next_trackstate)(struct trackstate state);
87 void (*set_audio_status)(int status);
88
89 pfdebugf debugf;
90 int verbose;
91
92
93/**************************
94* OUT *
95**************************/
96 const char* (*get_model_name)();
97 void (*get_current_vp)(struct viewport_api *avp);
98
99
100};
101
102extern struct proxy_api *xapi;
103
104EXPORT int set_api(struct proxy_api* api);
105
106#endif // API_H_INCLUDED
diff --git a/utils/wpseditor/libwps/src/defs.h b/utils/wpseditor/libwps/src/defs.h
deleted file mode 100644
index 077fc5894c..0000000000
--- a/utils/wpseditor/libwps/src/defs.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#ifndef DEFS_H_INCLUDED
23#define DEFS_H_INCLUDED
24
25typedef int (*pfdebugf)(const char* fmt,...);
26extern pfdebugf dbgf;
27
28#ifdef BUILD_DLL
29# define EXPORT __declspec(dllexport)
30#else
31# define EXPORT
32#endif
33
34#ifndef MIN
35# define MIN(a, b) (((a)<(b))?(a):(b))
36#endif
37
38#ifndef MAX
39# define MAX(a, b) (((a)>(b))?(a):(b))
40#endif
41
42#define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \
43 ((unsigned short)(x) << 8)))
44
45#define SWAP_32(x) ((typeof(x))(unsigned long)( ((unsigned long)(x) >> 24) | \
46 (((unsigned long)(x) & 0xff0000ul) >> 8) | \
47 (((unsigned long)(x) & 0xff00ul) << 8) | \
48 ((unsigned long)(x) << 24)))
49
50#define PLAYMODES_NUM 5
51enum api_playmode {
52 API_STATUS_PLAY,
53 API_STATUS_STOP,
54 API_STATUS_PAUSE,
55 API_STATUS_FASTFORWARD,
56 API_STATUS_FASTBACKWARD
57};
58
59extern enum api_playmode playmodes[PLAYMODES_NUM];
60extern const char *playmodeNames[];
61
62#endif // DEFS_H_INCLUDED
diff --git a/utils/wpseditor/libwps/src/dummies.c b/utils/wpseditor/libwps/src/dummies.c
deleted file mode 100644
index faeba63ea7..0000000000
--- a/utils/wpseditor/libwps/src/dummies.c
+++ /dev/null
@@ -1,389 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#include <string.h>
23#include <stdio.h>
24#include "dummies.h"
25#include "proxy.h"
26
27struct user_settings global_settings;
28
29struct wps_state wps_state;
30struct gui_wps gui_wps[NB_SCREENS];
31struct wps_data wps_datas[NB_SCREENS];
32struct cuesheet *curr_cue;
33struct system_status global_status;
34struct gui_syncstatusbar statusbars;
35struct playlist_info current_playlist;
36struct font sysfont;
37int battery_percent = 100;
38struct mp3entry current_song, next_song;
39int _audio_status;
40
41charger_input_state_type charger_input_state;
42#if CONFIG_CHARGING >= CHARGING_MONITOR
43charge_state_type charge_state;
44#endif
45
46#if defined(CPU_PP) && defined(BOOTLOADER)
47/* We don't enable interrupts in the iPod bootloader, so we need to fake
48the current_tick variable */
49#define current_tick (signed)(USEC_TIMER/10000)
50#else
51volatile long current_tick;
52#endif
53
54
55void dummies_init(){
56 sysfont.height = 9;
57 sysfont.maxwidth = 6;
58 global_settings.statusbar=true;
59}
60
61int playlist_amount_ex(const struct playlist_info* playlist);
62void sound_set_volume(int value)
63{
64 DEBUGF3("sound_set_volume(int value=%d)",value);
65 global_settings.volume = value;
66}
67int sound_get_pitch(void)
68{
69 return 0;
70}
71int sound_min(int setting)
72{
73 DEBUGF3("sound_min(int setting=%d)",setting);
74 return -78; //audiohw_settings[setting].minval;
75}
76
77void sleep(int hz)
78{
79}
80
81void audio_init(void){}
82void audio_wait_for_init(void){}
83void audio_play(long offset){}
84void audio_stop(void){}
85void audio_pause(void){}
86void audio_resume(void){}
87void audio_next(void){}
88void audio_prev(void){}
89int audio_status(void)
90{
91 return _audio_status;
92}
93
94#if CONFIG_CODEC == SWCODEC
95int audio_track_count(void){return 0;} /* SWCODEC only */
96long audio_filebufused(void){return 0;} /* SWCODEC only */
97void audio_pre_ff_rewind(void){} /* SWCODEC only */
98#endif /* CONFIG_CODEC == SWCODEC */
99void audio_ff_rewind(long newtime){}
100void audio_flush_and_reload_tracks(void){}
101#ifdef HAVE_ALBUMART
102int audio_current_aa_hid(void){return -1;}
103#endif
104struct mp3entry* audio_current_track(void){return 0;}
105struct mp3entry* audio_next_track(void){return 0;}
106bool audio_has_changed_track(void)
107{
108 return false;
109}
110
111int get_sleep_timer(void){return 0;}
112
113
114int battery_level(void){return battery_percent;} /* percent */
115int battery_time(void){return 0;} /* minutes */
116unsigned int battery_adc_voltage(void){return 0;} /* voltage from ADC in millivolts */
117unsigned int battery_voltage(void){return 0;} /* filtered batt. voltage in millivolts */
118int get_radio_status(void){return 0;}
119
120
121/* returns full path of playlist (minus extension) */
122char *playlist_name(const struct playlist_info* playlist, char *buf,
123int buf_size)
124{
125 char *sep;
126
127 if (!playlist)
128 return "no";
129
130 snprintf(buf, buf_size, "%s", playlist->filename+playlist->dirlen);
131
132 if (!buf[0])
133 return NULL;
134
135 /* Remove extension */
136 sep = strrchr(buf, '.');
137 if(sep)
138 *sep = 0;
139
140 return buf;
141}
142int playlist_get_display_index(void)
143{
144 return 1;
145}
146
147void gui_syncsplash(int ticks, const unsigned char *fmt, ...)
148{
149
150}
151
152void splash(int ticks, const unsigned char *fmt, ...)
153{
154
155}
156
157void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw){
158 DEBUGF3("gui_statusbar_draw");
159}
160
161void yield(void){}
162
163
164/* returns true if cuesheet support is initialised */
165bool cuesheet_is_enabled(void){return false;}
166
167/* allocates the cuesheet buffer */
168void cuesheet_init(void){}
169
170/* looks if there is a cuesheet file that has a name matching "trackpath" */
171bool look_for_cuesheet_file(const char *trackpath, char *found_cue_path){return false;}
172
173/* parse cuesheet "file" and store the information in "cue" */
174bool parse_cuesheet(char *file, struct cuesheet *cue){return false;}
175
176/* reads a cuesheet to find the audio track associated to it */
177bool get_trackname_from_cuesheet(char *filename, char *buf){return false;}
178
179/* display a cuesheet struct */
180void browse_cuesheet(struct cuesheet *cue){}
181
182/* display a cuesheet file after parsing and loading it to the plugin buffer */
183bool display_cuesheet_content(char* filename){return false;}
184
185/* finds the index of the current track played within a cuesheet */
186int cue_find_current_track(struct cuesheet *cue, unsigned long curpos){return 0;}
187
188/* update the id3 info to that of the currently playing track in the cuesheet */
189void cue_spoof_id3(struct cuesheet *cue, struct mp3entry *id3){}
190
191/* skip to next track in the cuesheet towards "direction" (which is 1 or -1) */
192bool curr_cuesheet_skip(int direction, unsigned long curr_pos){return false;}
193
194#ifdef HAVE_LCD_BITMAP
195/* draw track markers on the progressbar */
196void cue_draw_markers(struct screen *screen, unsigned long tracklen,
197int x, int y, int w, int h){}
198#endif
199
200#ifdef HAVE_ALBUMART
201void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
202{
203 if (!gwps || !gwps->data || !gwps->display || handle_id < 0)
204 return;
205
206 struct wps_data *data = gwps->data;
207
208#ifdef HAVE_REMOTE_LCD
209 /* No album art on RWPS */
210 if (data->remote_wps)
211 return;
212#endif
213
214 struct bitmap *bmp;
215 /* if (bufgetdata(handle_id, 0, (void *)&bmp) <= 0)
216 return;*/
217
218 short x = data->albumart_x;
219 short y = data->albumart_y;
220 short width = bmp->width;
221 short height = bmp->height;
222
223 if (data->albumart_max_width > 0)
224 {
225 /* Crop if the bitmap is too wide */
226 width = MIN(bmp->width, data->albumart_max_width);
227
228 /* Align */
229 if (data->albumart_xalign & WPS_ALBUMART_ALIGN_RIGHT)
230 x += data->albumart_max_width - width;
231 else if (data->albumart_xalign & WPS_ALBUMART_ALIGN_CENTER)
232 x += (data->albumart_max_width - width) / 2;
233 }
234
235 if (data->albumart_max_height > 0)
236 {
237 /* Crop if the bitmap is too high */
238 height = MIN(bmp->height, data->albumart_max_height);
239
240 /* Align */
241 if (data->albumart_yalign & WPS_ALBUMART_ALIGN_BOTTOM)
242 y += data->albumart_max_height - height;
243 else if (data->albumart_yalign & WPS_ALBUMART_ALIGN_CENTER)
244 y += (data->albumart_max_height - height) / 2;
245 }
246
247 if (!clear)
248 {
249 /* Draw the bitmap */
250 gwps->display->set_drawmode(DRMODE_FG);
251 gwps->display->bitmap_part((fb_data*)bmp->data, 0, 0, bmp->width,
252 x, y, width, height);
253 gwps->display->set_drawmode(DRMODE_SOLID);
254 }
255 else
256 {
257 /* Clear the bitmap */
258 gwps->display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
259 gwps->display->fillrect(x, y, width, height);
260 gwps->display->set_drawmode(DRMODE_SOLID);
261 }
262}
263#endif
264/* Update the "data" pointer to make the handle's data available to the caller.
265Return the length of the available linear data or < 0 for failure (handle
266not found).
267The caller is blocked until the requested amount of data is available.
268size is the amount of linear data requested. it can be 0 to get as
269much as possible.
270The guard buffer may be used to provide the requested size. This means it's
271unsafe to request more than the size of the guard buffer.
272*/
273size_t bufgetdata(int handle_id, size_t size, void **data)
274{
275
276
277 return size;
278}
279
280
281void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars,
282bool force_redraw)
283{
284#ifdef HAVE_LCD_BITMAP
285 if(!global_settings.statusbar)
286 return;
287#endif /* HAVE_LCD_BITMAP */
288 int i;
289 FOR_NB_SCREENS(i) {
290 gui_statusbar_draw( &(bars->statusbars[i]), force_redraw );
291 }
292}
293void unload_wps_backdrop(void)
294{
295
296}
297void unload_remote_wps_backdrop(void)
298{
299
300}
301
302#if CONFIG_CODEC == SWCODEC
303int get_replaygain_mode(bool have_track_gain, bool have_album_gain)
304{
305 int type;
306
307 bool track = ((global_settings.replaygain_type == REPLAYGAIN_TRACK)
308 || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE)
309 && global_settings.playlist_shuffle));
310
311 type = (!track && have_album_gain) ? REPLAYGAIN_ALBUM
312 : have_track_gain ? REPLAYGAIN_TRACK : -1;
313
314 return type;
315}
316#endif
317
318/* Common functions for all targets */
319void rtc_init(void){}
320int rtc_read_datetime(unsigned char* buf){return 0;}
321int rtc_write_datetime(unsigned char* buf){return 0;}
322
323void backlight_on(void){}
324void backlight_off(void){}
325
326void remote_backlight_on(void){}
327void remote_backlight_off(void){}
328
329void debugf(const char *fmt, ...)
330{}
331void panicf( const char *fmt, ...)
332{
333}
334
335off_t filesize(int fd){return 0;}
336
337int playlist_amount(void)
338{
339 return playlist_amount_ex(NULL);
340}
341int playlist_amount_ex(const struct playlist_info* playlist)
342{
343 if (!playlist)
344 playlist = &current_playlist;
345
346 return playlist->amount;
347}
348
349int get_action(int context, int timeout)
350{
351 return 0;
352}
353
354void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
355 int height){}
356
357void pcm_calculate_rec_peaks(int *left, int *right)
358{
359}
360void pcm_calculate_peaks(int *left, int *right)
361{
362}
363bool led_read(int delayticks) /* read by status bar update */
364{
365 return false;
366}
367
368#ifndef HAS_BUTTON_HOLD
369bool is_keys_locked(void)
370{
371 return false;
372}
373#endif
374
375long default_event_handler_ex(long event, void (*callback)(void *), void *parameter)
376{
377 return 0;
378}
379
380long default_event_handler(long event)
381{
382 return default_event_handler_ex(event, NULL, NULL);
383}
384
385void ab_draw_markers(struct screen * screen, int capacity,
386 int x, int y, int w, int h)
387 {
388 }
389void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude){}
diff --git a/utils/wpseditor/libwps/src/dummies.h b/utils/wpseditor/libwps/src/dummies.h
deleted file mode 100644
index 15ee29cca1..0000000000
--- a/utils/wpseditor/libwps/src/dummies.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22
23#ifndef DUMMIES_H_INCLUDED
24#define DUMMIES_H_INCLUDED
25
26#include <stdio.h>
27
28#include "settings.h"
29#include "gwps.h"
30#include "lang.h"
31#include "powermgmt.h"
32#include "font.h"
33#include "playlist.h"
34
35#include "defs.h"
36
37extern struct font sysfont;
38extern struct user_settings global_settings;
39extern struct wps_state wps_state;
40extern struct gui_wps gui_wps[NB_SCREENS];
41extern struct wps_data wps_datas[NB_SCREENS];
42extern struct cuesheet *curr_cue;
43extern struct system_status global_status;
44extern struct gui_syncstatusbar statusbars;
45extern struct playlist_info current_playlist;
46extern int battery_percent;
47extern struct mp3entry current_song, next_song;
48extern int _audio_status;
49
50charger_input_state_type charger_input_state;
51#if CONFIG_CHARGING >= CHARGING_MONITOR
52extern charge_state_type charge_state;
53#endif
54
55#if defined(CPU_PP) && defined(BOOTLOADER)
56/* We don't enable interrupts in the iPod bootloader, so we need to fake
57the current_tick variable */
58#define current_tick (signed)(USEC_TIMER/10000)
59#else
60extern volatile long current_tick;
61#endif
62
63void dummies_init();
64
65#endif /*DUMMIES_H_INCLUDED*/
diff --git a/utils/wpseditor/libwps/src/include/lang.h b/utils/wpseditor/libwps/src/include/lang.h
deleted file mode 100644
index 87fc5ec012..0000000000
--- a/utils/wpseditor/libwps/src/include/lang.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#define LANG_END_PLAYLIST (signed char)1
23#define LANG_KEYLOCK_ON (signed char)2
24#define LANG_KEYLOCK_OFF (signed char)3
25#define LANG_WEEKDAY_SUNDAY (signed char)4
26#define LANG_MONTH_JANUARY (signed char)5
27#define VOICE_PAUSE (signed char)6
28#define LANG_BATTERY_TIME (signed char)7
29#define UNIT_PERCENT (signed char)8
30
31#define str(...) "empty"
diff --git a/utils/wpseditor/libwps/src/include/remote_rockboxlogo.h b/utils/wpseditor/libwps/src/include/remote_rockboxlogo.h
deleted file mode 100644
index 8d1c8b69c3..0000000000
--- a/utils/wpseditor/libwps/src/include/remote_rockboxlogo.h
+++ /dev/null
@@ -1 +0,0 @@
1
diff --git a/utils/wpseditor/libwps/src/include/rockboxlogo.h b/utils/wpseditor/libwps/src/include/rockboxlogo.h
deleted file mode 100644
index 8d1c8b69c3..0000000000
--- a/utils/wpseditor/libwps/src/include/rockboxlogo.h
+++ /dev/null
@@ -1 +0,0 @@
1
diff --git a/utils/wpseditor/libwps/src/include/sysfont.h b/utils/wpseditor/libwps/src/include/sysfont.h
deleted file mode 100644
index 0b25ed836e..0000000000
--- a/utils/wpseditor/libwps/src/include/sysfont.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#define SYSFONT_HEIGHT 9
diff --git a/utils/wpseditor/libwps/src/include/system-target.h b/utils/wpseditor/libwps/src/include/system-target.h
deleted file mode 100644
index 8d1c8b69c3..0000000000
--- a/utils/wpseditor/libwps/src/include/system-target.h
+++ /dev/null
@@ -1 +0,0 @@
1
diff --git a/utils/wpseditor/libwps/src/lcd.c b/utils/wpseditor/libwps/src/lcd.c
deleted file mode 100644
index d78024d374..0000000000
--- a/utils/wpseditor/libwps/src/lcd.c
+++ /dev/null
@@ -1,179 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#include "font.h"
23#include "screen_access.h"
24//#include <windef.h>
25#include "api.h"
26#include "defs.h"
27#include "proxy.h"
28#include "dummies.h"
29
30static struct viewport default_vp =
31{
32 .x = 0,
33 .y = 0,
34 .width = LCD_WIDTH,
35 .height = LCD_HEIGHT,
36#ifdef HAVE_LCD_BITMAP
37 .font = FONT_SYSFIXED,
38 .drawmode = DRMODE_SOLID,
39#endif
40#if LCD_DEPTH > 1
41 .fg_pattern = LCD_DEFAULT_FG,
42 .bg_pattern = LCD_DEFAULT_BG,
43#ifdef HAVE_LCD_COLOR
44 .lss_pattern = LCD_DEFAULT_BG,
45 .lse_pattern = LCD_DEFAULT_BG,
46 .lst_pattern = LCD_DEFAULT_BG,
47#endif
48#endif
49};
50
51struct viewport* current_vp = &default_vp;
52
53void get_current_vp(struct viewport_api *avp){
54 avp->x = current_vp->x;
55 avp->y = current_vp->y;
56 avp->width = current_vp->width;
57 avp->height = current_vp->height;
58
59 //TODO: font_get(current_vp->font)->height;
60 avp->fontheight = sysfont.height;
61}
62
63void lcd_set_viewport(struct viewport* vp)
64{
65 if (vp == NULL){
66 current_vp = &default_vp;
67 DEBUGF3("lcd_set_viewport(struct viewport* vp= DEFAULT)\n");
68 }
69 else{
70 current_vp = vp;
71 DEBUGF3("lcd_set_viewport(struct viewport* vp=%x,vpx=%d,vpy=%d,vpw=%d,vph=%d)\n",vp,vp->x,vp->y,vp->width,vp->height);
72 }
73}
74
75void lcd_update_viewport(void)
76{
77 //lcd_update_rect(current_vp->x, current_vp->y,current_vp->width, current_vp->height);
78}
79
80void lcd_update_viewport_rect(int x, int y, int width, int height)
81{
82 //lcd_update_rect(current_vp->x + x, current_vp->y + y, width, height);
83}
84/*** parameter handling ***/
85
86void lcd_set_drawmode(int mode)
87{
88 current_vp->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
89}
90
91int lcd_get_drawmode(void)
92{
93 return current_vp->drawmode;
94}
95#if LCD_DEPTH > 1
96void lcd_set_foreground(unsigned color)
97{
98 current_vp->fg_pattern = color;
99}
100
101unsigned lcd_get_foreground(void)
102{
103 return current_vp->fg_pattern;
104}
105
106void lcd_set_background(unsigned color)
107{
108 current_vp->bg_pattern = color;
109}
110
111unsigned lcd_get_background(void)
112{
113 return current_vp->bg_pattern;
114}
115
116#ifdef HAVE_LCD_COLOR
117void lcd_set_selector_start(unsigned color)
118{
119 current_vp->lss_pattern = color;
120}
121
122void lcd_set_selector_end(unsigned color)
123{
124 current_vp->lse_pattern = color;
125}
126
127void lcd_set_selector_text(unsigned color)
128{
129 current_vp->lst_pattern = color;
130}
131
132void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
133{
134 //lcd_set_drawmode(mode);
135 current_vp->fg_pattern = fg_color;
136 current_vp->bg_pattern = bg_color;
137}
138#endif
139#endif
140int lcd_getwidth(void)
141{
142 return current_vp->width;
143}
144
145int lcd_getheight(void)
146{
147 return current_vp->height;
148}
149
150void lcd_setfont(int newfont)
151{
152 current_vp->font = newfont;
153}
154
155int lcd_getfont(void)
156{
157 return current_vp->font;
158}
159
160/* Clear the whole display */
161void lcd_clear_display(void)
162{
163 struct viewport* old_vp = current_vp;
164
165 current_vp = &default_vp;
166
167 lcd_clear_viewport();
168
169 current_vp = old_vp;
170}
171
172void lcd_clear_viewport(){
173 DEBUGF2("lcd_clear_viewport()\n");
174 xapi->clear_viewport(current_vp->x,current_vp->y,current_vp->width,current_vp->height,current_vp->bg_pattern);
175
176}
177void lcd_scroll_stop(struct viewport* vp){
178 DEBUGF3("lcd_scroll_stop(struct viewport* vp=%x)\n",vp);
179}
diff --git a/utils/wpseditor/libwps/src/proxy.c b/utils/wpseditor/libwps/src/proxy.c
deleted file mode 100644
index 315cf971ab..0000000000
--- a/utils/wpseditor/libwps/src/proxy.c
+++ /dev/null
@@ -1,152 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#include <stdio.h>
23#include <stdlib.h>
24#include "dummies.h"
25#include "proxy.h"
26#include "api.h"
27#include "gwps.h"
28#include "gwps-common.h"
29#include <string.h>
30
31struct screen screens[NB_SCREENS];
32struct wps_data wpsdata;
33struct gui_wps gwps;
34struct mp3entry id3;
35struct mp3entry nid3;
36
37extern void test_api(struct proxy_api *api);
38
39bool debug_wps = true;
40int wps_verbose_level = 0;
41int errno_;
42pfdebugf dbgf = 0;
43
44static char pluginbuf[PLUGIN_BUFFER_SIZE];
45
46const char* get_model_name(){
47#ifdef MODEL_NAME
48 return MODEL_NAME;
49#else
50 return "unknown";
51#endif
52}
53
54int read_line(int fd, char* buffer, int buffer_size)
55{
56 int count = 0;
57 int num_read = 0;
58
59 errno_ = 0;
60
61 while (count < buffer_size)
62 {
63 unsigned char c;
64
65 if (1 != read(fd, &c, 1))
66 break;
67
68 num_read++;
69
70 if ( c == '\n' )
71 break;
72
73 if ( c == '\r' )
74 continue;
75
76 buffer[count++] = c;
77 }
78
79 buffer[MIN(count, buffer_size - 1)] = 0;
80
81 return errno_ ? -1 : num_read;
82}
83
84void* plugin_get_buffer(size_t *buffer_size)
85{
86 *buffer_size = PLUGIN_BUFFER_SIZE;
87 return pluginbuf;
88}
89
90int checkwps(const char *filename, int verbose){
91 int res;
92 int fd;
93
94 struct wps_data wps;
95 wps_verbose_level = verbose;
96
97 fd = open(filename, O_RDONLY);
98 if (fd < 0) {
99 DEBUGF1("Failed to open %s\n",filename);
100 return 2;
101 }
102 close(fd);
103
104 res = wps_data_load(&wps, &screens[0], filename, true);
105
106 if (!res) {
107 DEBUGF1("WPS parsing failure\n");
108 return 3;
109 }
110
111 DEBUGF1("WPS parsed OK\n");
112 return 0;
113}
114
115int wps_init(const char* filename,struct proxy_api *api, bool isfile){
116 int res;
117 if (!api)
118 return 4;
119 dummies_init();
120 test_api(api);
121 set_api(api);
122 wps_data_init(&wpsdata);
123 wps_verbose_level = api->verbose;
124 res = wps_data_load(&wpsdata, &screens[0], filename, isfile);
125 if (!res)
126 {
127 DEBUGF1("ERR: WPS parsing failure\n");
128 } else
129 DEBUGF1("WPS parsed OK\n");
130 DEBUGF1("\n-------------------------------------------------\n");
131 wps_state.paused = true;
132 gwps.data = &wpsdata;
133 gwps.display = &screens[0];
134 gwps.state = &wps_state;
135 gwps.state->id3 = &id3;
136 gwps.state->nid3 = &nid3;
137 gui_wps[0] = gwps;
138 return (res?res:3);
139}
140
141int wps_display(){
142 DEBUGF3("wps_display(): begin\n");
143 int res = gui_wps_display();
144 DEBUGF3("\nWPS %sdisplayed\n", (res ? "" : "not "));
145 return res;
146}
147int wps_refresh(){
148 DEBUGF3("-----------------<wps_refresh(): begin>-----------------\n");
149 int res = gui_wps_refresh(&gwps, 0, WPS_REFRESH_ALL);
150 DEBUGF3("\nWPS %srefreshed\n", (res ? "" : "not "));
151 return res;
152}
diff --git a/utils/wpseditor/libwps/src/proxy.h b/utils/wpseditor/libwps/src/proxy.h
deleted file mode 100644
index 2f8e984aaa..0000000000
--- a/utils/wpseditor/libwps/src/proxy.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#ifndef PROXY_H
23#define PROXY_h
24
25#include <stdio.h>
26
27#include "screen_access.h"
28#include "api.h"
29#include "defs.h"
30
31#define DEBUGF dbgf
32#define DEBUGF1 dbgf
33#define DEBUGF2(...)
34#define DEBUGF3(...)
35#define DEBUGF4(...)
36
37EXPORT int checkwps(const char *filename, int verbose);
38EXPORT int wps_init(const char* filename,struct proxy_api *api,bool isfile);
39EXPORT int wps_display();
40EXPORT int wps_refresh();
41EXPORT const char* get_model_name();
42
43extern struct screen screens[NB_SCREENS];
44extern bool debug_wps;
45extern int wps_verbose_level;
46
47
48#endif
diff --git a/utils/wpseditor/libwps/src/wpsstate.h b/utils/wpseditor/libwps/src/wpsstate.h
deleted file mode 100644
index 3fa36436e2..0000000000
--- a/utils/wpseditor/libwps/src/wpsstate.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Rostilav Checkan
10 * $Id$
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
22#ifndef STATES_H
23#define STATES_H
24//
25struct trackstate
26{
27 char* title;
28 char* artist;
29 char* album;
30 char* genre_string;
31 char* disc_string;
32 char* track_string;
33 char* year_string;
34 char* composer;
35 char* comment;
36 char* albumartist;
37 char* grouping;
38 int discnum;
39 int tracknum;
40 int version;
41 int layer;
42 int year;
43
44 int length;
45 int elapsed;
46};
47
48struct wpsstate{
49 int volume;
50 int fontheight;
51 int fontwidth;
52 int battery_level;
53 int audio_status;
54};
55#endif