-- ===============================================================================
-- Device Monitoring
-- ===============================================================================
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/fs/cd0', 1, 'CD/DVD', 2, 5000);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/mnt/hbmedia/entertainmentserver/', 1, 'HardDrive', 3, 0);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/mnt/hbdata/IBA', 1, 'IBA', 3, 0);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/fs/usb0', 1, 'USB', 1, 5000);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/fs/usb1', 1, 'USB', 1, 5000);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/fs/ipod0', 1, 'iPod', 4, 0);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/fs/pfs0', 1, 'PlaysForSure', 4, 0);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/dev/wms/player1', 1, 'Bluetooth', 9, 0);
INSERT INTO slots(path,zoneid, name, slottype, max_lib_entries) VALUES('/dev/vdev-mpegts', 1, 'DMB-Radio', 12,0);
-- *******************************************************************************
-- *******************************************************************************
-- @table OUTPUTDEVICES
--
-- The <fname>outputdevices</fname> table lists known output devices. Output
-- devices define where media can be sent. An output device could be a GF layer, an
-- <fname>io-audio</fname> PCM name, a Bluetooth headset, etc.
--
-- @field outputdeviceid The ID of the output device.
-- @field type The type of device, as defined by the enumerated type
-- <dtype>mme_outputtype_t</dtype> values: <const>OUTPUTTYPE_*</const>.
-- @field available The availability of the output device. Set to 1 for available.
-- @field permanent The device permanency. Set to 1 to make the device permanent
-- and forbid its removal.
-- @field name The name of the device. This name can be shared with end users.
-- @field devicepath The location of the output device, used to connect to the
-- output device. This path is not shared with end users.
-- *******************************************************************************
-- *******************************************************************************
CREATE TABLE outputdevices (
outputdeviceid INTEGER PRIMARY KEY AUTOINCREMENT,
type INTEGER DEFAULT 0 NOT NULL,
available INTEGER DEFAULT 1 NOT NULL,
permanent INTEGER NOT NULL,
name TEXT NOT NULL UNIQUE,
devicepath TEXT NOT NULL UNIQUE
);
-- *******************************************************************************
-- *******************************************************************************
-- @table SLOTS
-- The <fname>slots</fname> table lists the slots known to the MME. Slots define the
-- physical locations where the MME looks for new mediastores. The default setup
-- assumes two USB mass storage devices, one CD/DVD drive, and the hard drive.
-- You may wish to customize where the location of the hard drive. In addition, if
-- you add control contexts and they have their own slots, you must add them to
-- this table. Note that the local control context's hard drive must be the first
-- entry in the table, with <var>msid</var> = 1.
--
-- @field slotid The ID for the slot.
-- @field active Indicates whether the slot is active (available), or
-- unavailable:
-- * 1 = active
-- @field msid The ID of the mediastore associated with this slot.
-- @field slottype The type of slot. These correspond to the
-- <const>MME_SLOTTYPE_*</const> types defined in <fname sh>mme/interface.h</fname>:
-- * 0 = standard
-- * 1 = USB
-- * 2 = CD/DVD
-- * 3 = harddrive
-- * 4 = media file system (<cmd>io-fs</cmd>)
-- @field zoneid The ID of the zone associated with this slot.
-- @field max_lib_entries The maximum number of library table entries an
-- active media store in this slot is permitted to use.
-- A value of 0 means there is no limit enforced.
-- @delete_at_start If non-zero, mediastores that were listed as active
-- at shutdown in this slot are deleted instead of
-- being set to unvavailable.
-- @field path The filesystem path to this slot.
-- @field name The slot name. This name is used as the default for mediastores
-- without names.
-- *******************************************************************************
-- *******************************************************************************
CREATE TABLE slots (
slotid INTEGER PRIMARY KEY AUTOINCREMENT,
active INTEGER DEFAULT 0 NOT NULL,
msid INTEGER DEFAULT 0 NOT NULL REFERENCES mediastores,
multimsid INTEGER DEFAULT 0 NOT NULL,
slottype INTEGER DEFAULT 0 NOT NULL,
zoneid INTEGER NOT NULL REFERENCES zones,
max_lib_entries INTEGER DEFAULT 0 NOT NULL,
delete_at_start INTEGER DEFAULT 0 NOT NULL,
path TEXT NOT NULL,
name TEXT DEFAULT NULL
);