<?xml version="1.0" ?>
<!DOCTYPE extension SYSTEM "../extension.dtd">
<extension name="Gorilla" version="0.1.2">
  <summary>API for talking to serialport</summary>
  <description>
    API for talking to serialport.
  </description>
  <maintainers>
    <maintainer>
      <user>oasynnoum</user>
      <name>Keng-ichi Ahagon</name>
      <email>k.ahagon@n-3.so</email>
      <role>lead</role>
    </maintainer>
  </maintainers>
  <license>PHP</license>
  <release>
    <version>0.5.0</version>
    <state>beta</state>
    <notes>
        introduce namespace 'PHPMake'.
        remove 'Arduino' class definition.
</notes>
    <date>2013-12-25</date>
  </release>
  <changelog>
  <release>
    <version>0.1.2</version>
    <date>2012-12-09</date>
    <state>alpha</state>
    <notes>
      fix a bug which cause memory leak when call SerialPort::read()
    </notes>
  </release>
    <release>
      <version>0.1.1</version>
      <date>2012-12-08</date>
      <state>alpha</state>
      <notes>
        fix a bug which cause echo-back on Linux
      </notes>
    </release>
    <release>
      <version>0.1.0</version>
      <date>2012-11-21</date>
      <state>alpha</state>
      <notes>
        implement SerialPort class for Windows.
      </notes>
    </release>
    <release>
      <version>0.0.1</version>
      <date>2012-10-31</date>
      <state>alpha</state>
      <notes>
        First release. 
        implement SerialPort class for POSIX.
      </notes>
    </release>
  </changelog>

  <resources>
    <resource name="Win32Handle" payload="void" alloc="no"></resource>
    <resource name="CanonicalBuffer" payload="SerialPort_canonical_buffer" alloc="yes"></resource>
  </resources>

  <constants>
    <constant name="GORILLA_VERSION" type="string" value="PHP_GORILLA_VERSION" />
  </constants>

  <class name="SerialPort">
    <constant type="int" name="BAUD_RATE_50" value="50"></constant>
    <constant type="int" name="BAUD_RATE_75" value="75"></constant>
    <constant type="int" name="BAUD_RATE_110" value="110"></constant>
    <constant type="int" name="BAUD_RATE_134" value="134"></constant>
    <constant type="int" name="BAUD_RATE_150" value="150"></constant>
    <constant type="int" name="BAUD_RATE_200" value="200"></constant>
    <constant type="int" name="BAUD_RATE_300" value="300"></constant>
    <constant type="int" name="BAUD_RATE_600" value="600"></constant>
    <constant type="int" name="BAUD_RATE_1200" value="1200"></constant>
    <constant type="int" name="BAUD_RATE_1800" value="1800"></constant>
    <constant type="int" name="BAUD_RATE_2400" value="2400"></constant>
    <constant type="int" name="BAUD_RATE_4800" value="4800"></constant>
    <constant type="int" name="BAUD_RATE_9600" value="9600"></constant>
    <constant type="int" name="BAUD_RATE_19200" value="19200"></constant>
    <constant type="int" name="BAUD_RATE_38400" value="38400"></constant>
    <constant type="int" name="BAUD_RATE_57600" value="57600"></constant>
    <constant type="int" name="BAUD_RATE_115200" value="115200"></constant>
    <constant type="int" name="BAUD_RATE_230400" value="230400"></constant>
    <constant type="int" name="CHAR_SIZE_5" value="5"></constant>
    <constant type="int" name="CHAR_SIZE_6" value="6"></constant>
    <constant type="int" name="CHAR_SIZE_7" value="7"></constant>
    <constant type="int" name="CHAR_SIZE_8" value="8"></constant>
    <constant type="int" name="CHAR_SIZE_DEFAULT" value="8"></constant>
    <constant type="int" name="STOP_BITS_1_0" value="10"></constant>
    <constant type="int" name="STOP_BITS_1_5" value="15"></constant>
    <constant type="int" name="STOP_BITS_2_0" value="20"></constant>
    <constant type="string" name="FLOW_CONTROL_HARD" value="FLOW_CONTROL_HARD"></constant>
    <constant type="string" name="FLOW_CONTROL_SOFT" value="FLOW_CONTROL_SOFT"></constant>
    <constant type="string" name="FLOW_CONTROL_NONE" value="FLOW_CONTROL_NONE"></constant>
    <constant type="string" name="FLOW_CONTROL_DEFAULT" value="FLOW_CONTROL_NONE"></constant>
    <constant type="string" name="PARITY_EVEN" value="PARITY_EVEN"></constant>
    <constant type="string" name="PARITY_ODD" value="PARITY_ODD"></constant>
    <constant type="string" name="PARITY_MARK" value="PARITY_MARK"></constant>
    <constant type="string" name="PARITY_SPACE" value="PARITY_SPACE"></constant>
    <constant type="string" name="PARITY_NONE" value="PARITY_NONE"></constant>
    <constant type="string" name="PARITY_DEFAULT" value="PARITY_NONE"></constant>
    <property name="_device" access="protected" type="string"></property>
    <property name="_stream" access="private" ></property>
    <property name="_streamFd" access="private" type="int"></property>
    <property name="_win32Handle" access="private" ></property>
    <property name="_win32CanonicalBuffer" access="private" ></property>
    <property name="_win32IsCanonical" access="private" ></property>
    <property name="_win32NewLine" access="private" type="string"></property>
    <property name="_win32Dtr" access="private" ></property>
    <property name="_win32Rts" access="private" ></property>
    <property name="_win32VTime" access="private" type="int"></property>
    <property name="_win32VMin" access="private" type="int"></property>
    <function name="__construct">
      <proto>object __construct([string device])</proto>
    </function>
    <function name="__destruct">
      <proto>void __destruct()</proto>
    </function>
    <function name="open">
      <proto>object open(string device)</proto>
    </function>
    <function name="close">
      <proto>bool close()</proto>
    </function>
    <function name="isOpen">
      <proto>bool isOpen()</proto>
    </function>
    <function name="read">
      <proto>string read([int length])</proto>
    </function>
    <function name="write">
      <proto>int write(string data)</proto>
    </function>
    <function name="getCTS">
      <proto>bool getCTS()</proto>
    </function>
    <function name="getRTS">
      <proto>bool getRTS()</proto>
    </function>
    <function name="setRTS">
      <proto>object setRTS(bool rts)</proto>
    </function>
    <function name="getDSR">
      <proto>bool getDSR()</proto>
    </function>
    <function name="getDTR">
      <proto>bool getDTR()</proto>
    </function>
    <function name="setDTR">
      <proto>object setDTR(bool dtr)</proto>
    </function>
    <function name="getDCD">
      <proto>bool getDCD()</proto>
    </function>
    <function name="getRNG">
      <proto>bool getRNG()</proto>
    </function>
    <function name="getBaudRate">
      <proto>int getBaudRate()</proto>
    </function>
    <function name="setBaudRate">
      <proto>object setBaudRate(int baudRate)</proto>
    </function>
    <function name="getCharSize">
      <proto>int getCharSize()</proto>
    </function>
    <function name="setCharSize">
      <proto>object setCharSize(int charSize)</proto>
    </function>
    <function name="getFlowControl">
      <proto>string getFlowControl()</proto>
    </function>
    <function name="setFlowControl">
      <proto>object setFlowControl(string flowControl)</proto>
    </function>
    <function name="getNumOfStopBits">
      <proto>int getNumOfStopBits()</proto>
    </function>
    <function name="setNumOfStopBits">
      <proto>object setNumOfStopBits(int numOfStopBits)</proto>
    </function>
    <function name="getParity">
      <proto>string getParity()</proto>
    </function>
    <function name="setParity">
      <proto>object setParity(string parity)</proto>
    </function>
    <function name="setCanonical">
      <proto>object setCanonical(bool canonical)</proto>
    </function>
    <function name="isCanonical">
      <proto>bool isCanonical()</proto>
    </function>
    <function name="getWin32NewLine">
      <proto>string getWin32NewLine()</proto>
    </function>
    <function name="setWin32NewLine">
      <proto>object setWin32NewLine(string nl)</proto>
    </function>
    <function name="getVMin">
      <proto>int getVMin()</proto>
    </function>
    <function name="setVMin">
      <proto>object setVMin(int vMin)</proto>
    </function>
    <function name="getVTime">
      <proto>int getVTime()</proto>
    </function>
    <function name="setVTime">
      <proto>object setVTime(int vTime)</proto>
    </function>
    <function name="getWin32ReadIntervalTimeout">
      <proto>int getWin32ReadIntervalTimeout()</proto>
    </function>
    <function name="setWin32ReadIntervalTimeout">
      <proto>object setWin32ReadIntervalTimeout(int time)</proto>
    </function>
    <function name="getWin32ReadTotalTimeoutMultiplier">
      <proto>int getWin32ReadTotalTimeoutMultiplier()</proto>
    </function>
    <function name="setWin32ReadTotalTimeoutMultiplier">
      <proto>object setWin32ReadTotalTimeoutMultiplier(int time)</proto>
    </function>
    <function name="getWin32ReadTotalTimeoutConstant">
      <proto>int getWin32ReadTotalTimeoutConstant()</proto>
    </function>
    <function name="setWin32ReadTotalTimeoutConstant">
      <proto>object setWin32ReadTotalTimeoutConstant(int time)</proto>
    </function>
    <function name="getWin32WriteTotalTimeoutMultiplier">
      <proto>int getWin32WriteTotalTimeoutMultiplier()</proto>
    </function>
    <function name="setWin32WriteTotalTimeoutMultiplier">
      <proto>object setWin32WriteTotalTimeoutMultiplier(int time)</proto>
    </function>
    <function name="getWin32WriteTotalTimeoutConstant">
      <proto>int getWin32WriteTotalTimeoutConstant()</proto>
    </function>
    <function name="setWin32WriteTotalTimeoutConstant">
      <proto>object setWin32WriteTotalTimeoutConstant(int time)</proto>
    </function>
  </class>
</extension>
