A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 68 lines 2.5 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2002 by Björn Stenberg 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 _DISK_H_ 22#define _DISK_H_ 23 24#include "config.h" 25#include "mv.h" /* for volume definitions */ 26 27struct partinfo 28{ 29 sector_t start; /* first sector (LBA) */ 30 sector_t size; /* number of sectors */ 31 unsigned char type; 32}; 33 34#define PARTITION_TYPE_FAT32 0x0b 35#define PARTITION_TYPE_FAT32_LBA 0x0c 36#define PARTITION_TYPE_FAT16 0x06 37#define PARTITION_TYPE_OS2_HIDDEN_C_DRIVE 0x84 38#define PARTITION_TYPE_GPT_GUARD 0xee 39 40#define MAX_PARTITIONS_PER_DRIVE 4 /* Needs to be at least 4 */ 41 42bool disk_init(IF_MD_NONVOID(int drive)); 43bool disk_partinfo(int partition, struct partinfo *info); 44 45int disk_mount_all(void); /* returns the # of successful mounts */ 46int disk_mount(int drive); 47int disk_unmount_all(void); 48int disk_unmount(int drive); 49 50/* Used when the drive's logical sector size is smaller than the sector size used by the partition table and filesystem. Notably needed for ipod 5.5G/6G. */ 51#ifdef MAX_VIRT_SECTOR_SIZE 52int disk_get_sector_multiplier(IF_MD_NONVOID(int drive)); 53/* The logical sector size to use when we have no valid paritions */ 54#ifdef DEFAULT_VIRT_SECTOR_SIZE 55void disk_set_sector_multiplier(IF_MD(int drive,) int mult); 56#endif 57#endif 58 59#ifdef MAX_VARIABLE_LOG_SECTOR 60/* The size of the drive's smallest addressible unit */ 61int disk_get_log_sector_size(IF_MD_NONVOID(int drive)); 62#else 63#define disk_get_log_sector_size(...) SECTOR_SIZE 64#endif 65 66bool disk_present(IF_MD_NONVOID(int drive)); 67 68#endif /* _DISK_H_ */