2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4 * Music Player Daemon API
8 * LICENSE: This source file is subject to version 3.01 of the PHP license
9 * that is available thorugh the world-wide-web at the following URI:
10 * http://www.php.net/license/3_01.txt. If you did not receive a copy of
11 * the PHP License and are unable to obtain it through the web, please
12 * send a note to license@php.net so we can mail you a copy immediately.
16 * API for the administrative portion of Music Player Daemon commands
18 * Used for maintaining and controlling various administrative tasks
19 * of the MPD software.
21 * @category Networking
23 * @author Graham Christensen <graham.christensen@itrebal.com>
24 * @copyright 2006 Graham Christensen
25 * @license http://www.php.net/license/3_01.txt
28 class Net_MPD_Admin extends Net_MPD_Common
32 * List available audio outputs
34 * @return array or int on failure
36 public function getOutputs()
38 return $this->runCommand('outputs');
42 * Disables an audio output
44 * @param $id int output Id to disable
47 public function disableOutput($id)
49 return $this->runCommand('disableoutput', $id);
53 * Enables an audio output
55 * @param $id int Id to enable
58 public function enableOutput($id)
60 return $this->runCommand('enableoutput', $id);
64 * Kills the MPD server in a safe way, saving state if possible
68 public function kill()
70 $r = $this->runCommand('kill');
78 * Updates the music database
80 * @param $path string path which to search for music, optional
83 public function updateDatabase($path = '')
85 $this->runCommand('update', $path);