A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 67 lines 2.4 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2006-2007 Dave Chapman 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 _SANSAPATCHER_H 23#define _SANSAPATCHER_H 24 25#ifdef __cplusplus 26extern "C" { 27#endif 28 29#include "sansaio.h" 30 31/* exit codes */ 32#define SANSA_OK 0 33#define SANSA_WRONG_ARGUMENTS 1 34#define SANSA_OPEN_INFILE_FAILED 2 35#define SANSA_PARTITION_ERROR 3 36#define SANSA_CANNOT_REOPEN 5 37#define SANSA_INSTALL_FAILED 6 38#define SANSA_UNINSTALL_FAILED 7 39#define SANSA_ACCESS_DENIED 10 40#define SANSA_NOT_FOUND 11 41#define SANSA_WRONG_DEVICE_COUNT 12 42#define SANSA_MULTIPLE_DEVICES 15 43#define SANSA_WRONG_TYPE 16 44#define SANSA_OLD_INSTALL 17 45#define SANSA_INTERNAL_ERROR 20 46 47extern int sansa_verbose; 48/* Size of buffer for disk I/O - 8MB is large enough for any version 49 of the Apple firmware, but not the Nano's RSRC image. */ 50#define BUFFER_SIZE 8*1024*1024 51 52int sansa_read_partinfo(struct sansa_t* sansa, int silent); 53int is_sansa(struct sansa_t* sansa); 54int sansa_scan(struct sansa_t* sansa); 55int sansa_read_firmware(struct sansa_t* sansa, const char* filename); 56unsigned int sansa_read_bootloader(struct sansa_t* sansa, const char* filename, unsigned char** bl_buffer); 57int sansa_add_bootloader(struct sansa_t* sansa, const unsigned char* buf, unsigned int len); 58int sansa_delete_bootloader(struct sansa_t* sansa); 59int sansa_update_of(struct sansa_t* sansa,const char* filename); 60int sansa_update_ppbl(struct sansa_t* sansa,const char* filename); 61int sansa_list_images(struct sansa_t* sansa); 62 63#ifdef __cplusplus 64} 65#endif 66#endif 67