<?php


    class X10DeviceUI 
    {
       public static $TYPE_APPLIANCE = 0;
       public static $TYPE_LIGHT = 1;
       public static $TYPE_DIMMER = 2;

       var $name;
       var $floor;
       var $x, $y;
       var $type;

       function X10DeviceUI($flr_, $name_, $x_, $y_, $type_) {

         $this->floor = $flr_;
         $this->name = $name_;
         $this->x = $x_;
         $this->y = $y_;
         $this->type = $type_;
       }
    }

class X10FloorPlan
{

    public static function getFloorPlan($floor)
    {
// "X10 Hu name or alias" => new X10DeviceUI(floor, "DisplayName", x,y,type)
       return array(

             "kettle"=> new X10DeviceUI(0,"Kettle",-180,-90, X10DeviceUI::$TYPE_APPLIANCE),
             "lounge"=> new X10DeviceUI(0,"Lounge",-500,-220,  X10DeviceUI::$TYPE_LIGHT),

             "testbulb"=> new X10DeviceUI(1,"Test ",-560,-250, X10DeviceUI::$TYPE_APPLIANCE),
             "bedroom"=> new X10DeviceUI(1,"Bedroom",-264,-295, X10DeviceUI::$TYPE_LIGHT),
             "studio"=> new X10DeviceUI(1,"Studio",-600,-280, X10DeviceUI::$TYPE_LIGHT),
             "landing"=> new X10DeviceUI(1,"Landing",-560,-70,  X10DeviceUI::$TYPE_LIGHT),
        );

    }

    public static function getFloorList()
    {
       return array("Downstairs", "Upstairs");
    }

}

?>

