A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 71 lines 2.3 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2002 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 FILEOP_H 22#define FILEOP_H 23 24#include "file.h" 25 26/* result codes of various file operations */ 27enum fileop_result_code 28{ 29 FORC_PATH_EXISTS = -8, 30 FORC_READ_FAILURE = -7, 31 FORC_WRITE_FAILURE = -6, 32 FORC_NO_BUFFER_AVAIL = -5, 33 FORC_TOO_MANY_SUBDIRS = -4, 34 FORC_PATH_TOO_LONG = -3, 35 FORC_PATH_NOT_EXIST = -2, 36 FORC_UNKNOWN_FAILURE = -1, 37 /* Anything < 0 is failure */ 38 FORC_SUCCESS = 0, /* All operations completed successfully */ 39 FORC_NOOP = 1, /* Operation didn't need to do anything */ 40 FORC_CANCELLED = 2, /* Operation was cancelled by user */ 41 FORC_NOOVERWRT = 3, 42}; 43 44enum file_op_flags 45{ 46 PASTE_CUT = 0x00, /* Is a move (cut) operation (default) */ 47 PASTE_COPY = 0x01, /* Is a copy operation */ 48 PASTE_OVERWRITE = 0x02, /* Overwrite destination */ 49 PASTE_EXDEV = 0x04, /* Actually copy/move across volumes */ 50}; 51 52enum file_op_current 53{ 54 FOC_NONE = 0, 55 FOC_COUNT, 56 FOC_MOVE, 57 FOC_COPY, 58 FOC_DELETE, 59}; 60 61int create_dir(void); 62 63int rename_file(const char *selected_file); 64 65int delete_fileobject(const char *selected_file); 66 67int copy_move_fileobject(const char *src_path, 68 const char *dst_path, 69 unsigned int flags); 70 71#endif /* FILEOP_H */