<?xml version="1.0" encoding="UTF-8"?>
<?oxygen SCHSchema="http://myurc.org/ns/uisocketdesc/uisocketdesc.sch"?>
<!--
	UI socket description (based on ISO/IEC 24752-2) for a generic DVD player, connected via Serial Interface. 
-->

<uiSocket about="http://res.myurc.org/gc100/dvd-serial.uis" 
	id="dvdsocket" 
	xmlns="http://myurc.org/ns/uisocketdesc" 
	xmlns:uis="http://myurc.org/ns/uisocketdesc" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:dcterms="http://purl.org/dc/terms/" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://myurc.org/ns/uisocketdesc http://myurc.org/ns/uisocketdesc 
		http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd 
		http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd">
	<dc:description xml:lang="en">
		User Interface Socket Description for generic DVD player, connected via Serial.
	</dc:description>
	<dc:creator>Komal Jogi</dc:creator>
	<dc:contributor>Parikshit Thakur</dc:contributor>
	<dc:contributor>Gottfried Zimmermann, Access Technologies Group</dc:contributor>
	<dc:rights>Copyright 2008 Access Technologies Group</dc:rights>
	<dcterms:conformsTo>http://myurc.org/iso24752-2/2007</dcterms:conformsTo>
	<dcterms:modified>2008-09-20</dcterms:modified>
	
	<!-- DVD Player socket - power on/off -->
	<variable id="powerMode" type="powerModeType">
		<dc:description xml:lang="en">
			- 'ON' corresponds to an activated DVD Player device.
			- 'STANDBY' corresponds to a deactivated DVD Player that may still be awaken from the network.
		</dc:description>
	</variable>
		
	<!-- GZ: Add a variable isTrayOpen, if available.  If it makes sense, split toggleTray into openTray and closeTray. 	-->

	<command id="openTray" type="uis:basicCommand">
		<dc:description xml:lang="en">Command opens the DVD tray.  Also stops playing.</dc:description>
	</command>
	<command id="closeTray" type="uis:basicCommand">
		<dc:description xml:lang="en">Command closes the DVD tray</dc:description>
	</command>
	<variable id="isTrayOpen" type="xsd:boolean">
		<dc:description xml:lang="en">Current status of the tray.</dc:description>
			<dependency>
				<write> false() </write>
			</dependency>
	</variable>

	
	
	<command id="switchSubTitle" type="uis:basicCommand">
		<dc:description xml:lang="en">Command for switching to different subtitle type (i.e. JPN, ENG, FRE, GER, ITA, 		etc.) for the movie. One of the values is OFF, which turns off the sub-titles. This is for Denon DVD 		Player.</dc:description>
		<!-- GZ: Can we access the set of available languages?  If so, make it a variable, and add a param to this 		command. -->
		<!-- komal : We can't give direct language directly if we want to move to next one then we need to call this command two times.-->		
		<dependency>
			<relevant>value('powerMode') eq 'ON'</relevant>
			<write>value('powerMode') eq 'ON'</write>
		</dependency>
	</command>
	
	
	
	
	<set id="transport">

		<variable id="currentTrack" type="xsd:unsignedLong">
			<dc:description xml:lang="en">If NumberOfTracks is 0, then CurrentTrack will be 0.
					Otherwise, this state variable will contain the sequence number of the currently
					selected track, starting at value '1', up to and including NumberOfTracks.
			</dc:description>
			<dependency>
				<write> false() </write>
			</dependency>
		</variable>

		<variable id="transportStatus" type="xsd:string">
			<dc:description xml:lang="en">Current state of the transport eg., whether it is playing, stopped or 			paused</dc:description>
			<!-- GZ: Can you define an enumeration type for transportStatus? -->
			<dependency>
				<write> false() </write>
			</dependency>
		</variable> 

		<command id="play" type="uis:basicCommand">
			<dc:description xml:lang="en">This command starts the DVD Player. </dc:description>
			<param id="trackNo" dir="in" type="xsd:positiveInteger"/>
			<!-- GZ: Maybe 0 in which case the last track number will be played. -->
			<!--There is no dependency required as playing is available even if power is STANDBY-->
		</command>


		<command id="pause" type="uis:basicCommand">
			<dc:description xml:lang="en">This command pauses the DVD player.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('play') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="stop" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for stopping the DVD to spin in the DVD 						player.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('play') eq 'inProgress')</write>
			</dependency>
		</command>

		<command id="next" type="uis:basicCommand">
			<dc:description xml:lang="en">Command to play next track.</dc:description>
			
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('play') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="previous" type="uis:basicCommand">
			<dc:description xml:lang="en">Command to play previous track.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('play') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="fastForward" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for fast forwarding. </dc:description>
			<!-- GZ: Are there different speed modes for fastForward and rewind?  Single, double, triple, etc.? 				Add speed as parameter? Same for rewind. -->
			<!-- komal : we can't give direct speed modes for eg if we want to make speed triple we need to 				give this command thrice.-->
			<param id="currentForwardSpeed" dir="out" type="xsd:string">Indicates the current fast forward speed.</param>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and ((value('play') eq 'inProgress') or (value('pause') 					eq 'inProgress'))</write>
			</dependency>
		</command>
	
		<command id="rewind" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for rewind.</dc:description>
			<param id="currentRewindSpeed" dir="out" type="xsd:string">Indicates the current rewind speed.</param>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and ((value('play') eq 'inProgress') or (value('pause') 					eq 'inProgress'))</write>
			</dependency>
		</command>

		<variable id="relativeTimePosition" type="xsd:string">
			<dc:description xml:lang="en">This state variable contains the current time position of the playing 			track.</dc:description>
			<dependency>
				<write> false() </write>
			</dependency>
		</variable>

	</set>

	<!-- DVD Player socket - menu navigation -->

	<set id="menu">

		<command id="toggleMenu" type="uis:basicCommand">
			<!-- GZ: Make two sets: one for transport elements, and one for menu commands. -->
			<dc:description xml:lang="en">Opens/Closes the DVD Main Menu. </dc:description>
			<!-- GZ: How do you exit the menu? Add a command "exitMenu"? -->
			<!-- komal : Response is same for both so how could we distinguish whether it is for exit or open So we make it toggleMenu-->
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>value('powerMode') eq 'ON'</write>
			</dependency>
		</command>
	
		<command id="enter" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for executing the current selection on the DVD menu.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('menu') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="left" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for left navigation in DVD menu.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('menu') eq 'inProgress')</write>
			</dependency>
		</command>

		<command id="right" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for right navigation in DVD menu.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('menu') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="up" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for up navigation in DVD menu. </dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('menu') eq 'inProgress')</write>
			</dependency>
		</command>
	
		<command id="down" type="uis:basicCommand">
			<dc:description xml:lang="en">Command for down navigation in DVD menu.</dc:description>
			<dependency>
				<relevant>value('powerMode') eq 'ON'</relevant>
				<write>(value('powerMode') eq 'ON') and (value('menu') eq 'inProgress')</write>
			</dependency>
		</command>

	</set>

	<notify id="serialConnectError" category="error">
				<dc:description xml:lang="en">This notification is raised when the Serial Port is not 				configured.</dc:description>
				
				<dependency>
					<explicitAck>false()</explicitAck>
				</dependency>
			</notify>

	
	
	

	<schema xmlns="http://www.w3.org/2001/XMLSchema">
		<simpleType name="powerModeType" id="powerModeTypeId">
			<restriction base="xsd:string">
				<enumeration value="STANDBY"/>
				<enumeration value="ON"/>
				
			</restriction>
		</simpleType>	
	
	</schema>	
	
</uiSocket>