<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">

<dictionary title="VPN Tracker Terminology"
	xmlns:xi="http://www.w3.org/2003/XInclude"
>


	<xi:include
		href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef"
		xpointer="xpointer(/dictionary/suite)"
	/>


	<suite name="VPN Tracker Suite" code="VPNT">

		<enumeration name="saveable file format" code="savf" hidden="yes">
			<enumerator name="dummy file format" code="DFF "/>
		</enumeration>


		<record-type  name="ping result" code="PRES">
			<property name="success" code="PSUC" type="boolean"
        		description="Wheter ping was successful or not."
			>
        		<cocoa key="success"/>
			</property>

			<property name="host" code="PHST" type="text"
        		description="The host being ping'ed."
			>
        		<cocoa key="host"/>
			</property>

			<property name="ip" code="PIPA" type="text"
        		description="The IP address of the host."
			>
        		<cocoa key="ip"/>
			</property>

			<property name="rtt" code="PRTT" type="real"
        		description="The Round Trip Time in seconds."
			>
        		<cocoa key="ASPingCommandRTTKey"/>
			</property>

			<property name="loss" code="PLOS" type="real"
        		description="The packet loss (1.0 means 100%)."
			>
        		<cocoa key="loss"/>
			</property>
		</record-type>



		<class name="application" code="capp" inherits="application"
			description="The application's top-level scripting object.">

            <cocoa class="VPNTApplication"/>

			<element type="connection" access="r">
				<cocoa key="ASAllConnections"/>
			</element>

			<element type="group" access="r">
				<cocoa key="ASAllGroups"/>
			</element>

			<property name="version" code="vers"
				type="text" access="r"
				description="The version number of the application."
			>
				<cocoa key="ASApplicationVersion"/>
			</property>


			<property name="startup has finished" code="STFI"
				type="boolean" access="r"
				description="Application startup has finished."
			>
				<cocoa key="ASStartupFinished"/>
			</property>

			<property name="root group" code="RGRP"
				type="group" access="r"
				description="The top level group."
			>
				<cocoa key="ASRootGroup"/>
			</property>
		</class>


		<class name="tracker object" code="TOBJ">
			<cocoa class="TrackerObject"/>

			<property name="id" code="ID  " type="text" access="r"
				description="The unique identifier of at tracker object."
			>
				<cocoa key="ASUUID"/>
			</property>

			<property name="name" code="pnam" type="text" access="r"
				description="The name of at tracker object."
			>
				<cocoa key="ASName"/>
			</property>
		</class>


		<class name="group" code="GRP_" plural="groups"
			inherits="tracker object"
		>
			<cocoa class="TrackerGroup"/>

			<element type="connection" access="r">
				<cocoa key="ASConnections"/>
			</element>

			<responds-to command="start">
				<cocoa method="ASStart:"/>
			</responds-to>

			<responds-to command="stop">
				<cocoa method="ASStop:"/>
			</responds-to>

			<responds-to command="createConnection">
				<cocoa method="ASCreateConnection:"/>
			</responds-to>

		</class>


		<class name="connection" code="CON_" plural="connections"
			inherits="tracker object"
		>
			<cocoa class="TrackerConnection"/>

			<property name="status" code="STUS"
				type="integer" access="r"
				description="Numeric status (DEPRECATED! Use state!)"
			>
				<cocoa key="ASStatus"/>
			</property>

			<property name="state" code="STAT"
				description="Off | Starting | On | Stopping"
				type="text" access="r"
			>
				<cocoa key="ASState"/>
			</property>

			<responds-to command="start">
				<cocoa method="ASStart:"/>
			</responds-to>

			<responds-to command="stop">
				<cocoa method="ASStop:"/>
			</responds-to>

		</class>


		<command name="start" code="vpntSTAR"
			description="Start a connection or all connections of a group."
		>
			<direct-parameter type="tracker object"
				description="Connection or group."
			/>
			<result type="boolean"
				description="Whether start was successful or not."
			/>
		</command>

		<command name="stop" code="vpntSTOP"
			description="Stop a connection or all connections of a group."
		>
			<direct-parameter type="tracker object"
				description="Connection or group."
			/>
			<result type="boolean"
				description="Whether start was successful or not."
			/>
		</command>

		<command name="createConnection" code="vpntCCON"
			description="Creates a new generic IPSec connection."
		>
			<direct-parameter type="group"
				description="The group where the connection is to be created."
			/>
			<result type="connection"
				description="The connection created."
			/>
		</command>

		<command name="ping" code="vpntPING">
			<cocoa class="ASPingCommand"/>
			<direct-parameter type="text"
				description="Host to ping (DNS name or IP address)."
			/>
			<result type="ping result"/>
		</command>

	</suite>
</dictionary>
