summaryrefslogtreecommitdiffstats
path: root/lib/class/localplay.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-04-02 08:49:58 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-04-02 08:49:58 +0000
commit3b0791a0e038937b6d1dab49e6599aff5f48a4ab (patch)
tree1ec896c50cc8ecb9337eb692dde59058eb74209a /lib/class/localplay.class.php
parent05e6d947be96664074d95f9d6f4635415186ecac (diff)
downloadampache-3b0791a0e038937b6d1dab49e6599aff5f48a4ab.tar.gz
ampache-3b0791a0e038937b6d1dab49e6599aff5f48a4ab.tar.bz2
ampache-3b0791a0e038937b6d1dab49e6599aff5f48a4ab.zip
empty localplay api class... just a concept right now...
Diffstat (limited to 'lib/class/localplay.class.php')
-rw-r--r--lib/class/localplay.class.php125
1 files changed, 125 insertions, 0 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php
new file mode 100644
index 00000000..4c96f559
--- /dev/null
+++ b/lib/class/localplay.class.php
@@ -0,0 +1,125 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+class Localplay {
+
+ /* Base Variables */
+
+
+
+
+ /* Built Variables */
+ var $_function_map = array();
+ var $_template;
+ var $_preferences = array();
+ var $_player;
+
+
+ /**
+ * Constructor
+ * This must be called with a localplay type, it then loads the config
+ * file for the specified type and attempts to load in the function
+ * map, the preferences and the template
+ */
+ function Localplay($type) {
+
+
+
+
+
+ } // Localplay
+
+
+ /**
+ * _get_info
+ * This functions takes the type and attempts to get all the
+ * information needed to load it. Will log errors if there are
+ * any failures, fatal errors will actually return something to the
+ * gui
+ */
+ function _get_info() {
+
+
+
+
+ } // _get_info
+
+
+ /**
+ * has_function
+ * This is used to check the function map and see if the current
+ * player type supports the indicated function.
+ */
+ function has_function($function_name) {
+
+
+
+
+ } // has_function
+
+
+ /**
+ * _map_functions
+ * This takes the results from the loaded from the target player
+ * and maps them to the defined functions that Ampache currently
+ * supports, this is broken into require and optional componets
+ * Failure of required componets will cause log entry and gui
+ * warning. The value of the elements in the $data array should
+ * be function names that are called on the action in question
+ */
+ function _map_functions($data) {
+
+ /* Required Functions */
+ $this->_function_map['add'] = $data['add'];
+ $this->_function_map['delete'] = $data['delete'];
+ $this->_function_map['play'] = $data['play'];
+ $this->_function_map['stop'] = $data['stop'];
+
+ /* Recommended Functions */
+ $this->_function_map['next'] = $data['next'];
+ $this->_function_map['prev'] = $data['prev'];
+ $this->_function_map['get_playlist'] = $data['get_playlist'];
+ $this->_function_map['get_playing'] = $data['get_playing'];
+
+ /* Optional Functions */
+ $this->_function_map['volume_set'] = $data['volume_set'];
+ $this->_function_map['volume_up'] = $data['volume_up'];
+ $this->_function_map['volume_down'] = $data['volume_down'];
+
+ } // _map_functions
+
+ /**
+ * add
+ * This function takes an array of song_ids and then passes the full URL
+ * to the player, this is a required function.
+ */
+ function add($songs) {
+
+
+ /* Call the Function Specified in the Function Map */
+
+
+ } // add
+
+
+} //end localplay class
+?>