2009-08-16 18:23:00 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2010-01-03 14:28:09 +00:00
|
|
|
* $Id$
|
2009-08-16 18:23:00 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Nicolas Pennequin
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _SKIN_TOKENS_H_
|
|
|
|
#define _SKIN_TOKENS_H_
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2010-03-06 14:14:44 +00:00
|
|
|
|
2009-11-09 04:46:19 +00:00
|
|
|
|
2009-08-16 18:23:00 +00:00
|
|
|
enum wps_token_type {
|
2009-11-09 04:46:19 +00:00
|
|
|
|
|
|
|
TOKEN_MARKER_CONTROL_TOKENS = -1,
|
|
|
|
WPS_NO_TOKEN = 0, /* for WPS tags we don't want to save as tokens */
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_UNKNOWN,
|
|
|
|
|
|
|
|
/* Markers */
|
|
|
|
WPS_TOKEN_CHARACTER,
|
|
|
|
WPS_TOKEN_STRING,
|
2009-09-26 00:58:32 +00:00
|
|
|
WPS_TOKEN_TRANSLATEDSTRING,
|
2009-08-16 18:23:00 +00:00
|
|
|
|
|
|
|
/* Alignment */
|
|
|
|
WPS_TOKEN_ALIGN_LEFT,
|
2010-01-07 07:34:15 +00:00
|
|
|
WPS_TOKEN_ALIGN_LEFT_RTL,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_ALIGN_CENTER,
|
|
|
|
WPS_TOKEN_ALIGN_RIGHT,
|
2010-01-07 07:34:15 +00:00
|
|
|
WPS_TOKEN_ALIGN_RIGHT_RTL,
|
2009-08-16 18:23:00 +00:00
|
|
|
|
|
|
|
/* Sublines */
|
|
|
|
WPS_TOKEN_SUBLINE_TIMEOUT,
|
2009-11-09 04:46:19 +00:00
|
|
|
|
|
|
|
/* Conditional */
|
|
|
|
WPS_TOKEN_CONDITIONAL,
|
|
|
|
WPS_TOKEN_CONDITIONAL_START,
|
|
|
|
WPS_TOKEN_CONDITIONAL_OPTION,
|
|
|
|
WPS_TOKEN_CONDITIONAL_END,
|
2009-08-16 18:23:00 +00:00
|
|
|
|
2009-11-09 04:46:19 +00:00
|
|
|
/* Viewport display */
|
|
|
|
WPS_VIEWPORT_ENABLE,
|
2010-01-13 06:02:38 +00:00
|
|
|
WPS_VIEWPORT_CUSTOMLIST,
|
2009-11-09 04:46:19 +00:00
|
|
|
|
2009-08-16 18:23:00 +00:00
|
|
|
/* Battery */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_BATTERY,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_BATTERY_PERCENT,
|
|
|
|
WPS_TOKEN_BATTERY_VOLTS,
|
|
|
|
WPS_TOKEN_BATTERY_TIME,
|
|
|
|
WPS_TOKEN_BATTERY_CHARGER_CONNECTED,
|
|
|
|
WPS_TOKEN_BATTERY_CHARGING,
|
|
|
|
WPS_TOKEN_BATTERY_SLEEPTIME,
|
2009-11-22 19:09:54 +00:00
|
|
|
WPS_TOKEN_USB_POWERED,
|
2009-08-16 18:23:00 +00:00
|
|
|
|
|
|
|
/* Sound */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_SOUND,
|
2009-08-16 18:23:00 +00:00
|
|
|
#if (CONFIG_CODEC != MAS3507D)
|
|
|
|
WPS_TOKEN_SOUND_PITCH,
|
|
|
|
#endif
|
|
|
|
#if (CONFIG_CODEC == SWCODEC)
|
2009-11-09 17:57:17 +00:00
|
|
|
WPS_TOKEN_SOUND_SPEED,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_REPLAYGAIN,
|
|
|
|
WPS_TOKEN_CROSSFADE,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Time */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_RTC,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_RTC_PRESENT,
|
|
|
|
|
|
|
|
/* The begin/end values allow us to know if a token is an RTC one.
|
|
|
|
New RTC tokens should be added between the markers. */
|
|
|
|
|
|
|
|
WPS_TOKENS_RTC_BEGIN, /* just the start marker, not an actual token */
|
|
|
|
|
|
|
|
WPS_TOKEN_RTC_DAY_OF_MONTH,
|
|
|
|
WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED,
|
|
|
|
WPS_TOKEN_RTC_12HOUR_CFG,
|
|
|
|
WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED,
|
|
|
|
WPS_TOKEN_RTC_HOUR_24,
|
|
|
|
WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED,
|
|
|
|
WPS_TOKEN_RTC_HOUR_12,
|
|
|
|
WPS_TOKEN_RTC_MONTH,
|
|
|
|
WPS_TOKEN_RTC_MINUTE,
|
|
|
|
WPS_TOKEN_RTC_SECOND,
|
|
|
|
WPS_TOKEN_RTC_YEAR_2_DIGITS,
|
|
|
|
WPS_TOKEN_RTC_YEAR_4_DIGITS,
|
|
|
|
WPS_TOKEN_RTC_AM_PM_UPPER,
|
|
|
|
WPS_TOKEN_RTC_AM_PM_LOWER,
|
|
|
|
WPS_TOKEN_RTC_WEEKDAY_NAME,
|
|
|
|
WPS_TOKEN_RTC_MONTH_NAME,
|
|
|
|
WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON,
|
|
|
|
WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN,
|
|
|
|
|
|
|
|
WPS_TOKENS_RTC_END, /* just the end marker, not an actual token */
|
|
|
|
|
|
|
|
/* Database */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_DATABASE,
|
2009-08-16 18:23:00 +00:00
|
|
|
#ifdef HAVE_TAGCACHE
|
|
|
|
WPS_TOKEN_DATABASE_PLAYCOUNT,
|
|
|
|
WPS_TOKEN_DATABASE_RATING,
|
|
|
|
WPS_TOKEN_DATABASE_AUTOSCORE,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* File */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_FILE,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_FILE_BITRATE,
|
|
|
|
WPS_TOKEN_FILE_CODEC,
|
|
|
|
WPS_TOKEN_FILE_FREQUENCY,
|
|
|
|
WPS_TOKEN_FILE_FREQUENCY_KHZ,
|
|
|
|
WPS_TOKEN_FILE_NAME,
|
|
|
|
WPS_TOKEN_FILE_NAME_WITH_EXTENSION,
|
|
|
|
WPS_TOKEN_FILE_PATH,
|
|
|
|
WPS_TOKEN_FILE_SIZE,
|
|
|
|
WPS_TOKEN_FILE_VBR,
|
|
|
|
WPS_TOKEN_FILE_DIRECTORY,
|
|
|
|
|
|
|
|
/* Image */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_IMAGES,
|
2009-11-09 05:03:33 +00:00
|
|
|
#ifdef HAVE_LCD_BITMAP
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_IMAGE_BACKDROP,
|
|
|
|
WPS_TOKEN_IMAGE_PROGRESS_BAR,
|
|
|
|
WPS_TOKEN_IMAGE_PRELOAD,
|
|
|
|
WPS_TOKEN_IMAGE_PRELOAD_DISPLAY,
|
|
|
|
WPS_TOKEN_IMAGE_DISPLAY,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_ALBUMART
|
|
|
|
/* Albumart */
|
|
|
|
WPS_TOKEN_ALBUMART_DISPLAY,
|
|
|
|
WPS_TOKEN_ALBUMART_FOUND,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Metadata */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_METADATA,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_METADATA_ARTIST,
|
|
|
|
WPS_TOKEN_METADATA_COMPOSER,
|
|
|
|
WPS_TOKEN_METADATA_ALBUM_ARTIST,
|
|
|
|
WPS_TOKEN_METADATA_GROUPING,
|
|
|
|
WPS_TOKEN_METADATA_ALBUM,
|
|
|
|
WPS_TOKEN_METADATA_GENRE,
|
|
|
|
WPS_TOKEN_METADATA_DISC_NUMBER,
|
|
|
|
WPS_TOKEN_METADATA_TRACK_NUMBER,
|
|
|
|
WPS_TOKEN_METADATA_TRACK_TITLE,
|
|
|
|
WPS_TOKEN_METADATA_VERSION,
|
|
|
|
WPS_TOKEN_METADATA_YEAR,
|
|
|
|
WPS_TOKEN_METADATA_COMMENT,
|
|
|
|
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_PLAYBACK_INFO,
|
2009-08-16 18:23:00 +00:00
|
|
|
/* Mode */
|
|
|
|
WPS_TOKEN_REPEAT_MODE,
|
|
|
|
WPS_TOKEN_PLAYBACK_STATUS,
|
|
|
|
/* Progressbar */
|
|
|
|
WPS_TOKEN_PROGRESSBAR,
|
|
|
|
#ifdef HAVE_LCD_CHARCELLS
|
|
|
|
WPS_TOKEN_PLAYER_PROGRESSBAR,
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
/* Peakmeter */
|
|
|
|
WPS_TOKEN_PEAKMETER,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Current track */
|
|
|
|
WPS_TOKEN_TRACK_ELAPSED_PERCENT,
|
|
|
|
WPS_TOKEN_TRACK_TIME_ELAPSED,
|
|
|
|
WPS_TOKEN_TRACK_TIME_REMAINING,
|
|
|
|
WPS_TOKEN_TRACK_LENGTH,
|
2010-03-18 07:08:49 +00:00
|
|
|
WPS_TOKEN_TRACK_STARTING,
|
|
|
|
WPS_TOKEN_TRACK_ENDING,
|
2009-08-16 18:23:00 +00:00
|
|
|
|
|
|
|
/* Playlist */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_PLAYLIST,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_PLAYLIST_ENTRIES,
|
|
|
|
WPS_TOKEN_PLAYLIST_NAME,
|
|
|
|
WPS_TOKEN_PLAYLIST_POSITION,
|
|
|
|
WPS_TOKEN_PLAYLIST_SHUFFLE,
|
|
|
|
|
|
|
|
|
|
|
|
/* buttons */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_MISC,
|
2010-03-06 00:29:46 +00:00
|
|
|
WPS_TOKEN_DRAW_INBUILTBAR,
|
2010-02-26 03:45:41 +00:00
|
|
|
WPS_TOKEN_LIST_TITLE_TEXT,
|
|
|
|
WPS_TOKEN_LIST_TITLE_ICON,
|
2009-08-16 18:23:00 +00:00
|
|
|
WPS_TOKEN_BUTTON_VOLUME,
|
|
|
|
WPS_TOKEN_LASTTOUCH,
|
2009-11-09 04:46:19 +00:00
|
|
|
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
|
|
|
|
/* Virtual LED */
|
|
|
|
WPS_TOKEN_VLED_HDD,
|
|
|
|
#endif
|
|
|
|
/* Volume level */
|
|
|
|
WPS_TOKEN_VOLUME,
|
|
|
|
/* hold */
|
|
|
|
WPS_TOKEN_MAIN_HOLD,
|
|
|
|
#ifdef HAS_REMOTE_BUTTON_HOLD
|
|
|
|
WPS_TOKEN_REMOTE_HOLD,
|
|
|
|
#endif
|
2009-08-16 18:23:00 +00:00
|
|
|
|
|
|
|
/* Setting option */
|
|
|
|
WPS_TOKEN_SETTING,
|
2009-10-16 19:14:33 +00:00
|
|
|
WPS_TOKEN_CURRENT_SCREEN,
|
2009-11-15 21:39:39 +00:00
|
|
|
WPS_TOKEN_LANG_IS_RTL,
|
2009-11-03 07:58:10 +00:00
|
|
|
|
|
|
|
/* Recording Tokens */
|
2009-11-09 04:46:19 +00:00
|
|
|
TOKEN_MARKER_RECORDING,
|
2009-11-03 07:58:10 +00:00
|
|
|
WPS_TOKEN_HAVE_RECORDING,
|
|
|
|
WPS_TOKEN_REC_FREQ,
|
|
|
|
WPS_TOKEN_REC_ENCODER,
|
|
|
|
WPS_TOKEN_REC_BITRATE, /* SWCODEC: MP3 bitrate, HWCODEC: MP3 "quality" */
|
|
|
|
WPS_TOKEN_REC_MONO,
|
2009-11-09 04:46:19 +00:00
|
|
|
|
|
|
|
TOKEN_MARKER_END, /* this needs to be the last value in this enum */
|
2009-08-16 18:23:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct wps_token {
|
|
|
|
unsigned char type; /* enough to store the token type */
|
|
|
|
|
|
|
|
/* Whether the tag (e.g. track name or the album) refers the
|
|
|
|
current or the next song (false=current, true=next) */
|
|
|
|
bool next;
|
|
|
|
|
|
|
|
union {
|
|
|
|
char c;
|
|
|
|
unsigned short i;
|
2010-01-03 10:50:34 +00:00
|
|
|
void* data;
|
2009-08-16 18:23:00 +00:00
|
|
|
} value;
|
|
|
|
};
|
2010-03-06 14:14:44 +00:00
|
|
|
|
2009-08-16 18:23:00 +00:00
|
|
|
struct skin_token_list {
|
|
|
|
struct wps_token *token;
|
|
|
|
struct skin_token_list *next;
|
|
|
|
};
|
|
|
|
|
2010-01-13 06:02:38 +00:00
|
|
|
char* get_dir(char* buf, int buf_size, const char* path, int level);
|
2010-03-06 14:14:44 +00:00
|
|
|
|
2009-08-16 18:23:00 +00:00
|
|
|
#endif
|