Documentation is available at Settings.class.php
- <?php
- class Settings {
- /**
- * Set the name of the dreambox
- * @access private
- * @var string
- */
- private static $dreamboxName = "Yoshie's Dreambox";
- /**
- * Set the local IP address of your dreambox. Should be an internal IP number.
- * @access private
- * @var string
- */
- private static $dreamboxIP = "dreambox.theyosh.lan";
- /**
- * Set the username for the dreambox webinterface. Leave empty when no authentication is required.
- * @access private
- * @var string
- */
- private static $dreamboxUserName = "root";
- /**
- * Set the password for the dreambox webinterface. Leave empty when no authentication is required.
- * @access private
- * @var string
- */
- private static $dreamboxPassword = "dreambox";
- /**
- * Set the enigma version of the dreambox. Valid values are enigma1 of enigma2
- * @access private
- * @var string
- */
- private static $dreamboxEnigmaVersion = "enigma2";
- /**
- * Set the streaming protocol. This is the protocal between the VLC server and the dreambox
- * @access private
- * @var string
- */
- private static $streamProtocol = "http";
- /**
- * Set the local IP address of the VLS Server. Should be internal
- * @access private
- * @var string
- */
- private static $vlcLanIP = "192.168.5.1";
- /**
- * Set the the internal port number for streaming.
- * @access private
- * @var string
- */
- private static $vlcLanStreamPort = "8888";
- /**
- * Set the RSTP port number.
- * @access private
- * @var string
- */
- private static $vlcRTSPControlPort = "8889";
- /**
- * Set the external IP or hostname for external connections to the VLC Server
- * @access private
- * @var string
- */
- private static $vlcWanIP = "theyosh.nl";
- /**
- * Set the the external port number for streaming.
- * @access private
- * @var string
- */
- private static $vlcWanStreamPort = "8888";
- /**
- * Set the the program name. Should not be changed
- * @access private
- * @var string
- */
- private static $lProgramName = "Dreambox ReStream";
- /**
- * Set the program version. Should not be changed
- * @access private
- * @var string
- */
- private static $lVersion = "1.1 Beta";
- /**
- * Set the location of the VLC server executable
- * @access private
- * @var string
- */
- private static $lVLCLocation = "/usr/bin/vlc";
- /**
- * Get the next program from the program guide.
- * @return string
- */
- static public function getVLCLocation() {
- return Settings::$lVLCLocation;
- }
- /**
- * Get the next program from the program guide.
- * @return string
- */
- static public function getDreamboxName() {
- return Settings::$dreamboxName;
- }
- /**
- * Get the IP number of the dreambox.
- * @return string
- */
- static public function getDreamboxIP() {
- return Settings::$dreamboxIP;
- }
- /**
- * Get the username of the dreambox.
- * @return string
- */
- static public function getDreamboxUserName() {
- return Settings::$dreamboxUserName;
- }
- /**
- * Get the password of the dreambox.
- * @return string
- */
- static public function getDreamboxPassword() {
- return Settings::$dreamboxPassword;
- }
- /**
- * Get the enigma version of the dreambox.
- * @return string
- */
- static public function getEnigmaVersion() {
- return Settings::$dreamboxEnigmaVersion;
- }
- /**
- * Get the streaming protocol of the dreambox.
- * @return string
- */
- static public function getStreamProtocol() {
- return Settings::$streamProtocol;
- }
- /**
- * Get the VLC Server internal IP number.
- * @return string
- */
- static public function getVLCLanIP() {
- return Settings::$vlcLanIP;
- }
- /**
- * Get the internal streaming port of the VLC Server.
- * @return string
- */
- static public function getVLCStreamPort() {
- return Settings::$vlcLanStreamPort;
- }
- /**
- * Get the RTPS Control port of the VLC Server.
- * @return string
- */
- static public function getVLCControlPort() {
- return Settings::$vlcRTSPControlPort;
- }
- /**
- * Get the external IP number of the VLC Server. When you connect from internal, you should get the internal IP number of the VLC Server
- * @return string
- */
- static public function getVLCWanIP() {
- $lServerAddress = explode(".",Settings::getVLCLanIP());
- $lClientAddress = explode(".",$_SERVER["REMOTE_ADDR"]);
- if ($lServerAddress[0] == $lClientAddress[0] && $lServerAddress[1] == $lClientAddress[1] && $lServerAddress[2] == $lClientAddress[2]) { // Lan connection
- return Settings::$vlcLanIP;
- } else { // Internet connection
- return Settings::$vlcWanIP;
- }
- }
- /**
- * Get the external streaming port of the VLC Server.
- * @return string
- */
- static public function getVLCWanStreamPort() {
- return Settings::$vlcWanStreamPort;
- }
- /**
- * Get the program name.
- * @return string
- */
- static public function getProgramName() {
- return Settings::$lProgramName;
- }
- /**
- * Get the program version number.
- * @return string
- */
- static public function getVersionNumber() {
- return Settings::$lVersion;
- }
- }
- ?>
Documentation generated on Sat, 19 Jan 2008 12:56:19 +0100 by phpDocumentor 1.3.0RC3