#include <cstdio>#include <stdlib.h>#include <assert.h>#include <string.h>#include <libgen.h>#include <qmessagebox.h>#include <unistd.h>#include <sys/wait.h>#include <sys/time.h>#include <sys/resource.h>#include <stdarg.h>#include "index.h"#include "scripts.h"#include "memory.h"#include "bpmplay.h"#include "overseer.h"#include "info.h"
Functions | |
| char * | getRawFilename (const char *rawpath, const char *n) |
| FILE * | openRawFile (Index *index, const char *rawpath) |
| FILE * | openRawFileForWriting (Index *index, const char *d) |
| void | removeRaw (Index *index, char *d) |
| void | dumpAudio (const char *fname, unsigned4 *buffer, long length) |
| FILE * | openScriptFile (const char *name) |
| void | Remote (const char *script,...) |
| char * | escape (const char *in) |
| QString | escape (const QString &in) |
| void | start_mkdir (const QString &dir) |
| void | start_cp (const QString &from, const QString &to) |
| int | start_mv (const QString &from, const QString &to) |
| void | start_rm (const QString &what) |
| void | remove (QString a) |
| void | removeAllRaw (const char *d) |
| void | removeAllLog () |
| int | bpmdjraw (bool synchronous, const char *fname, const char *where) |
| int | bpmdjraw (bool synchronous, const char *fname, QString where) |
| ExitStatus | vexec (const char *description, const char *script,...) |
| bool | execute (QString description, QString script) |
| bool | vexecute (const char *script,...) |
| int bpmdjraw | ( | bool | synchronous, | |
| const char * | fname, | |||
| QString | where | |||
| ) |
References bpmdjraw().
| int bpmdjraw | ( | bool | synchronous, | |
| const char * | fname, | |||
| const char * | where | |||
| ) |
Will start bpmdjraw and wait for the result or not depending on the synchronous flag. The return value is the process id in the asynchronous case, 0 when there was an error. The location to place the rawfile is obtained through the raw_location() function call.
References bpmdj_deallocate, escape(), execute(), spawn(), and sprintf().
Referenced by bpmdjraw(), createFiles(), wave_open(), and DecoderChecker::works().
| void dumpAudio | ( | const char * | fname, | |
| unsigned4 * | buffer, | |||
| long | length | |||
| ) |
References fclose(), FILE, and writesamples().
| QString escape | ( | const QString & | in | ) |
References bpmdj_deallocate, and escape().
| char* escape | ( | const char * | in | ) |
The escaping necessary for ssh to work is ridiculous.. An ordinary containment within " ... " does not work, so we must escape every character on its own. Especially the & is important because this would otherwise spawn a background process.
Referenced by Md5Analyzer::analyze(), bpmdjraw(), ActiveFragmentCreator::createOneFor(), delete_remote(), SongSelectorLogic::doAutoMix(), escape(), from_remote(), SongSlot::getAnalCommand(), SongSlot::getPlayCommand(), remote(), removeAllRaw(), start_cp(), start_mkdir(), start_mv(), start_rm(), and to_remote().
| bool execute | ( | QString | description, | |
| QString | script | |||
| ) |
Two wrappers which will simply return true or false
References assert(), Error(), ExitStatus::error(), exec(), ExitStatus::exit(), ExitStatus::exited(), and status.
Referenced by bpmdjraw(), ActiveFragmentCreator::createOneFor(), remote(), removeAllLog(), start_mv(), and vexecute().
| char* getRawFilename | ( | const char * | rawpath, | |
| const char * | n | |||
| ) |
References sprintf().
Referenced by closeFiles(), openRawFile(), openRawFileForWriting(), removeRaw(), wave_open(), and DecoderChecker::works().
| FILE* openRawFile | ( | Index * | index, | |
| const char * | rawpath | |||
| ) |
References assert(), bpmdj_deallocate, FILE, Index::get_filename(), and getRawFilename().
Referenced by openCoreRawFile().
| FILE* openRawFileForWriting | ( | Index * | index, | |
| const char * | d | |||
| ) |
References assert(), bpmdj_deallocate, FILE, Index::get_filename(), and getRawFilename().
Referenced by createFiles().
| FILE* openScriptFile | ( | const char * | name | ) |
References assert(), FILE, script, and SHELL_HEADER.
Referenced by SongSelectorLogic::doAutoMix().
| void removeAllRaw | ( | const char * | d | ) |
References bpmdj_deallocate, escape(), RAW_EXT, and vexecute().
Referenced by main().
| void removeRaw | ( | Index * | index, | |
| char * | d | |||
| ) |
References bpmdj_deallocate, Index::get_filename(), and getRawFilename().
| void start_cp | ( | const QString & | from, | |
| const QString & | to | |||
| ) |
References escape(), exec(), and sprintf().
Referenced by ActiveSongCopier::fetchNextSong(), and History::save_history().
| void start_mkdir | ( | const QString & | dir | ) |
References escape(), exec(), and sprintf().
Referenced by ActiveSongCopier::fetchNextSong().
| int start_mv | ( | const QString & | from, | |
| const QString & | to | |||
| ) |
References escape(), execute(), and sprintf().
Referenced by UpdateSongFilename::change().
| void start_rm | ( | const QString & | what | ) |
References escape(), and vexecute().
Referenced by main().
| ExitStatus vexec | ( | const char * | description, | |
| const char * | script, | |||
| ... | ||||
| ) |
Two wrappers to make command line arguments easier
References exec().
| bool vexecute | ( | const char * | script, | |
| ... | ||||
| ) |
References execute().
Referenced by Md5Analyzer::analyze(), Mpg321Decoder::checkProgram(), Mpg123Decoder::checkProgram(), delete_remote(), SongSelectorLogic::doBackup(), from_remote(), removeAllRaw(), start_rm(), and to_remote().
1.6.2