<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary xmlns:xi="http://www.w3.org/2003/XInclude">

	<xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)"/>
	
	<suite name="OnTheAir Video Suite" code="OnTV" description="OnTheAir specific classes.">
		
		<!-- Dummy file format to suppress warning in console -->
		<enumeration name="saveable file format" code="savf" hidden="yes">
			<enumerator name="dummy" code="VTdm" description="Dummy file format."/>
		</enumeration>

		<class-extension description="OnTheAir&apos;s top level scripting object." extends="application">
			<cocoa class="OnTheAirVideoApplication"/>
			<property name="selected output device" code="CDEV" type="output device" description="The currently selected output device.">
				<cocoa key="ASSelectedOutputDevice"/>
			</property>
			<element type="playlist">
				<cocoa key="orderedDocuments"/>
			</element>
			<element type="output device">
				<cocoa key="ASOutputDevices"/>
			</element>
		</class-extension>

		<command name="reread schedule" code="OnTVREAS" description="Forces a re-read of the schedule file (and enables scheduling if needed).">
			<cocoa class="ASReReadScheduleScriptCommand"/>
		</command>
		
		<command name="push play" code="OnTVPLAY" description="Emulates pushing on the Play button.">
			<cocoa method="ASPushPlay:"/>
			<direct-parameter type="playlist"/>
		</command>
		
		<command name="play" code="OnTVSTAR" description="Starts playback.">
			<cocoa method="ASStartPlayback:"/>
			<direct-parameter type="playlist"/>
		</command>
		
		<command name="cue" code="OnTVCUE " description="Cues the specified clip.">
			<cocoa method="ASCue:"/>
			<direct-parameter type="clip"/>
		</command>

		<command name="stop" code="OnTVSTOP" description="Stops playback.">
			<cocoa method="ASStopPlayback:"/>
			<direct-parameter type="playlist"/>
		</command>

		<command name="pause" code="OnTVPAUS" description="Pauses/resumes playback.">
			<cocoa method="ASPausePlayback:"/>
			<direct-parameter type="playlist"/>
		</command>
		
		<command name="update" code="OnTVUPDA" description="Updates the document (= check for missing clips).">
			<cocoa method="ASUpdate:"/>
			<direct-parameter type="playlist"/>
		</command>

		<command name="shuffle" code="OnTVSHUF" description="Randomizes the playlist.">
			<cocoa method="ASShuffle:"/>
			<direct-parameter type="playlist"/>
		</command>

		<class name="output device" code="DEVI" description="A video/audio output device.">
			<cocoa class="ASOutputDevice"/>
			<property name="name" code="pnam" type="text" access="r" description="The device name.">
				<cocoa key="displayName"/>
			</property>
			<property name="selected display mode" code="VMOD" type="display mode" description="The device current video mode.">
				<cocoa key="selectedDisplayMode"/>
			</property>
			<element type="display mode" access="r">
				<cocoa key="displayModes"/>
			</element>
		</class>

		<class name="display mode" code="MODE" description="A video output display mode.">
			<cocoa class="ASOutputDeviceDisplayMode"/>
			<property name="name" code="pnam" type="text" access="r" description="The display mode name.">
				<cocoa key="displayName"/>
			</property>
		</class>

		<class name="playlist" code="vpls" description="An OnTheAir Video playlist document." inherits="document">
			<cocoa class="PlaylistDocument"/>
			<property name="name" code="pnam" type="text" access="r"
				description="The playlist's name.">
				<cocoa key="displayName"/>
			</property>
			<property name="modified" code="imod" type="boolean" access="r"
				description="Has the playlist been modified since the last save?">
				<cocoa key="isDocumentEdited"/>
			</property>
			<property name="file" code="file" type="file" access="r"
				description="The playlist's location on disk.">
				<cocoa key="fileURL"/>
			</property>
			<property name="is playing" code="ispl" type="number" access="r"
				description="Is the playlist playing or paused ?">
				<cocoa key="ASIsPlaying"/>
			</property>
			<property name="is paused" code="ispa" type="number" access="r"
				description="Is the playlist paused ?">
				<cocoa key="ASIsPaused"/>
			</property>
			<property name="playing clip index" code="indx" type="number" access="r"
				description="The currently playing clip index.">
				<cocoa key="ASPlayingClipIndex"/>
			</property>
			<property name="duration" code="dura" type="number" access="r"
				description="The entire playlist duration (in seconds).">
				<cocoa key="ASPlaylistDuration"/>
			</property>
			<property name="playing item duration" code="itmd" type="number" access="r"
				description="The currently playing item's duration (in seconds).">
				<cocoa key="ASItemDuration"/>
			</property>
			<property name="elapsed time" code="elap" type="number" access="r"
				description="The playlist elapsed time (in seconds).">
				<cocoa key="ASElapsedPlaylistTime"/>
			</property>
			<property name="remaining time" code="rema" type="number" access="r"
				description="The playlist remaining time (in seconds).">
				<cocoa key="ASRemainingPlaylistTime"/>
			</property>
			<property name="item elapsed time" code="elit" type="number" access="r"
				description="The currently playing item's elapsed time (in seconds).">
				<cocoa key="ASElapsedItemTime"/>
			</property>
			<property name="item remaining time" code="rmit" type="number" access="r"
				description="The currently playing item's remaining time (in seconds).">
				<cocoa key="ASRemainingItemTime"/>
			</property>
			<element type="clip">
				<cocoa key="ASClips"/>
				<synonym name="playlist item" code="plit"/>
			</element>
			<responds-to name="push play" description="Emulates pushing on the Play button.">
				<cocoa method="ASPushPlay:"/>
			</responds-to>
			<responds-to name="play" description="Starts playback.">
				<cocoa method="ASStartPlayback:"/>
			</responds-to>
			<responds-to name="stop" description="Stops playback.">
				<cocoa method="ASStopPlayback:"/>
			</responds-to>
			<responds-to name="pause" description="Pauses/resumes playback.">
				<cocoa method="ASPausePlayback:"/>
			</responds-to>
			<responds-to name="update" description="Updates the playlist (= check for missing clips).">
				<cocoa method="ASUpdate:"/>
			</responds-to>
			<responds-to name="shuffle" description="Randomizes the playlist.">
				<cocoa method="ASShuffle:"/>
			</responds-to>
		</class>

		<class name="clip" code="clip" description="This class represents an item of a playlist document." inherits="item">
			<cocoa class="PlaylistItem"/>
			<synonym name="playlist item" code="plit"/>
			<property name="name" code="pnam" description="The display name of the playlist item." type="text">
				<cocoa key="ASName"/>
			</property>
			<property name="is valid" code="vali" description="Tells if the current item really exists and is playable." type="number" access="r">
				<cocoa key="ASIsPlayable"/>
			</property>
			<property name="duration" code="dura" description="The duration of the clip in seconds." type="number" access="r">
				<cocoa key="ASDurationInSeconds"/>
			</property>
			<property name="file path" code="path" description="The path to the playlist item." type="text">
				<cocoa key="ASMediaFilePath"/>
			</property>
			<property name="file URL" code="url " description="The URL to the playlist item." type="text">
				<cocoa key="ASMediaFileURL"/>
			</property>
			<property name="in point" code="in  " description="The in point (expressed in seconds)." type="number">
				<cocoa key="ASInPointInSeconds"/>
			</property>
			<property name="out point" code="out " description="The out point (expressed in seconds)." type="number">
				<cocoa key="ASOutPointInSeconds"/>
			</property>
			<responds-to name="play" description="Plays the specified clip.">
				<cocoa method="ASPlay:"/>
			</responds-to>
			<responds-to name="cue" description="Cues the specified clip.">
				<cocoa method="ASCue:"/>
			</responds-to>
		</class>
		
	</suite>
</dictionary>