-- phpMyAdmin SQL Dump
-- version 3.3.7deb6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 15, 2011 at 09:58 AM
-- Server version: 5.1.48
-- PHP Version: 5.3.3-7+squeeze3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


-- --------------------------------------------------------

--
-- Table structure for table `Layer`
--

CREATE TABLE IF NOT EXISTS `Layer` (
  `layer` varchar(255) NOT NULL,
  `refreshInterval` int(10) DEFAULT '300',
  `refreshDistance` int(10) DEFAULT '100',
  `fullRefresh` tinyint(1) DEFAULT '1',
  `showMessage` varchar(255) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `biwStyle` enum('classic','collapsed') DEFAULT 'classic',
  PRIMARY KEY (`id`),
  UNIQUE KEY `layer` (`layer`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `Layer`
--
INSERT INTO `Layer` (`layer`, `refreshInterval`, `refreshDistance`, `fullRefresh`, `showMessage`, `id`, `biwStyle`) VALUES
('layername', 300, 100, 1, NULL, 1, 'classic');
-- --------------------------------------------------------

--
-- Table structure for table `POI`
--

CREATE TABLE IF NOT EXISTS `POI` (
  `id` varchar(255) NOT NULL,
  `footnote` varchar(150) DEFAULT NULL,
  `title` varchar(150) NOT NULL,
  `lat` decimal(13,10) NOT NULL,
  `lon` decimal(13,10) NOT NULL,
  `imageURL` varchar(255) DEFAULT NULL,
  `description` varchar(150) DEFAULT NULL,
  `biwStyle` enum('classic','collapsed') DEFAULT 'classic',
  `alt` int(10) DEFAULT NULL,
  `doNotIndex` tinyint(1) DEFAULT '0',
  `showSmallBiw` tinyint(1) DEFAULT '1',
  `showBiwOnClick` tinyint(1) DEFAULT '1',
  `poiType` enum('geo','vision') NOT NULL DEFAULT 'geo',
  `layerID` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `layerID` (`layerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `POI`
--

INSERT INTO `POI` (`id`, `footnote`, `title`, `lat`, `lon`, `imageURL`, `description`, `biwStyle`, `alt`, `doNotIndex`, `showSmallBiw`, `showBiwOnClick`, `poiType`, `layerID`) VALUES
('geo_1', 'powered by Layar', 'The Layar Office', '52.3741180000', '4.9342500000', 'http://custom.layar.nl/Layar_banner_icon.png', 'The Location of the Layar Office', 'classic', NULL, 0, 1, 1, 'geo', 1);


-- --------------------------------------------------------

--
-- Table structure for table `LayerAction`
--

CREATE TABLE IF NOT EXISTS `LayerAction` (
  `layerID` int(11) NOT NULL,
  `label` varchar(30) NOT NULL,
  `uri` varchar(255) NOT NULL,
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `contentType` varchar(255) DEFAULT 'application/vnd.layar.internal',
  `method` enum('GET','POST') DEFAULT 'GET',
  `activityType` int(2) DEFAULT NULL,
  `params` varchar(255) DEFAULT NULL,
  `closeBiw` tinyint(1) DEFAULT '0',
  `showActivity` tinyint(1) DEFAULT '1',
  `activityMessage` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `layerID` (`layerID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `LayerAction`
--

INSERT INTO `LayerAction` (`layerID`, `label`, `uri`, `id`, `contentType`, `method`, `activityType`, `params`, `closeBiw`, `showActivity`, `activityMessage`) VALUES
(1, 'layer level action', 'http://layar.com', 2, 'application/vnd.layar.internal', 'GET', NULL, NULL, 0, 1, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `POIAction`
--

CREATE TABLE IF NOT EXISTS `POIAction` (
  `poiID` varchar(255) NOT NULL,
  `label` varchar(30) NOT NULL,
  `uri` varchar(255) NOT NULL,
  `autoTriggerRange` int(10) DEFAULT NULL,
  `autoTriggerOnly` tinyint(1) DEFAULT '0',
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contentType` varchar(255) DEFAULT 'application/vnd.layar.internal',
  `method` enum('GET','POST') DEFAULT 'GET',
  `activityType` int(2) DEFAULT NULL,
  `params` varchar(255) DEFAULT NULL,
  `closeBiw` tinyint(1) DEFAULT '0',
  `showActivity` tinyint(1) DEFAULT '1',
  `activityMessage` varchar(255) DEFAULT NULL,
  `autoTrigger` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `poiID` (`poiID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `POIAction`
--

INSERT INTO `POIAction` (`poiID`, `label`, `uri`, `autoTriggerRange`, `autoTriggerOnly`, `id`, `contentType`, `method`, `activityType`, `params`, `closeBiw`, `showActivity`, `activityMessage`, `autoTrigger`) VALUES
('geo_1', 'Layar Website', 'http://layar.com', NULL, 0, 1, 'application/vnd.layar.internal', 'GET', 1, 'lat,lon,alt,lang,countrycode,localCountryCode,version', 0, 1, NULL, 0),
('geo_1', 'Call Layar', 'tel:1234567890', NULL, 0, 2, 'application/vnd.layar.internal', 'POST', 4, NULL, 0, 0, NULL, 0),
('geo_1', 'Email Layar', 'mailto:info@layar.com', NULL, 0, 3, 'application/vnd.layar.internal', 'GET', 5, NULL, 0, 1, 'Send an email to Layar', 0),
('geo_1', 'Play audio', 'http://maomao.fixedpoint.nl/temp/layar_images/music.mp3', NULL, 0, 4, 'audio/mpeg', 'GET', 2, NULL, 0, 1, 'Play some music', 0),
('geo_1', 'Play video', 'http://demo.jsource.nl/g1p.mp4', NULL, 0, 5, 'video/mp4', 'GET', 3, NULL, 0, 0, NULL, 0);


--
-- Constraints for dumped tables
--
--
-- Constraints for table `POI`
--
ALTER TABLE `POI`
  ADD CONSTRAINT `POI_ibfk_8` FOREIGN KEY (`layerID`) REFERENCES `Layer` (`id`);

--
-- Constraints for table `LayerAction`
--
ALTER TABLE `LayerAction`
  ADD CONSTRAINT `LayerAction_ibfk_1` FOREIGN KEY (`layerID`) REFERENCES `Layer` (`id`);

--
-- Constraints for table `POIAction`
--
ALTER TABLE `POIAction`
  ADD CONSTRAINT `POIAction_ibfk_1` FOREIGN KEY (`poiID`) REFERENCES `POI` (`id`);
