History

Add JSDoc missing for callback parameter

David Rowe committed 6 years ago

Commit 5359efe1 parent 13abf7f1 file · +47 −0Browse files

Showing the changes to libraries/script-engine/src/WebSocketClass.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/WebSocketClass.cpp+47−0
@@ -96,6 +96,53 @@ void WebSocketClass::handleOnClose() { · 95 unmodified lines
96/**jsdoc96/**jsdoc
97 * Called when an error occurs.97 * Called when an error occurs.
98 * @callback WebSocket~onErrorCallback98 * @callback WebSocket~onErrorCallback
99 * @param {WebSocket.SocketError} error - The error.
100 */
101/**jsdoc
102 * Information on a socket error.
103 * <table>
104 * <thead>
105 * <tr><th>Value</th><th>Name</th><th>Description</th></tr>
106 * </thead>
107 * <tbody>
108 * <tr><td><code>0</code></td><td>ConnectionRefusedError</td><td>The connection was refused or timed out.</td></tr>
109 * <tr><td><code>1</code></td><td>RemoteHostClosedError</td><td>The remote host closed the connection.</td></tr>
110 * <tr><td><code>2</code></td><td>HostNotFoundError</td><td>The host address was not found.</td></tr>
111 * <tr><td><code>3</code></td><td>SocketAccessError</td><td>The socket operation failed because the application doesn't have
112 * the necessary privileges.</td></tr>
113 * <tr><td><code>4</code></td><td>SocketResourceError</td><td>The local system ran out of resources (e.g., too many
114 * sockets).</td></tr>
115 * <tr><td><code>5</code></td><td>SocketTimeoutError</td><td>The socket operation timed out.</td></tr>
116 * <tr><td><code>6</code></td><td>DatagramTooLargeError</td><td>The datagram was larger than the OS's limit.</td></tr>
117 * <tr><td><code>7</code></td><td>NetworkError</td><td>An error occurred with the network.</td></tr>
118 * <tr><td><code>8</code></td><td>AddressInUseError</td><td>The is already in use and cannot be reused.</td></tr>
119 * <tr><td><code>9</code></td><td>SocketAddressNotAvailableError</td><td>The address specified does not belong to the
120 * host.</td></tr>
121 * <tr><td><code>10</code></td><td>UnsupportedSocketOperationError</td><td>The requested socket operation is not supported
122* by the local OS.</td></tr>
123 * <tr><td><code>11</code></td><td>ProxyAuthenticationRequiredError</td><td>The socket is using a proxy and requires
124 * authentication.</td></tr>
125 * <tr><td><code>12</code></td><td>SslHandshakeFailedError</td><td>The SSL/TLS handshake failed.</td></tr>
126 * <tr><td><code>13</code></td><td>UnfinishedSocketOperationError</td><td>The last operation has not finished yet.</td></tr>
127 * <tr><td><code>14</code></td><td>ProxyConnectionRefusedError</td><td>Could not contact the proxy server because connection
128 * was denied.</td></tr>
129 * <tr><td><code>15</code></td><td>ProxyConnectionClosedError</td><td>The connection to the proxy server was unexpectedly
130 * closed.</td></tr>
131 * <tr><td><code>16</code></td><td>ProxyConnectionTimeoutError</td><td>The connection to the proxy server timed
132* out.</td></tr>
133 * <tr><td><code>17</code></td><td>ProxyNotFoundError</td><td>The proxy address was not found.</td></tr>
134 * <tr><td><code>18</code></td><td>ProxyProtocolError</td><td>Connection to the proxy server failed because the server
135 * response could not be understood.</td></tr>
136 * <tr><td><code>19</code></td><td>OperationError</td><td>An operation failed because the socket state did not permit
137 * it.</td></tr>
138 * <tr><td><code>20</code></td><td>SslInternalError</td><td>Internal error in the SSL library being used.</td></tr>
139 * <tr><td><code>21</code></td><td>SslInvalidUserDataError</td><td>Error in the SSL library because of invalid
140 * data.</td></tr>
141 * <tr><td><code>22</code></td><td>TemporaryError</td><td>A temporary error occurred.</td></tr>
142 * <tr><td><code>-1</code></td><td>UnknownSocketError</td><td>An unknown error occurred.</td></tr>
143 * </tbody>
144 * </table>
145 * @typedef {number} WebSocket.SocketError
99 */146 */
100void WebSocketClass::handleOnError(QAbstractSocket::SocketError error) {147void WebSocketClass::handleOnError(QAbstractSocket::SocketError error) {
101 if (_onErrorEvent.isFunction()) {148 if (_onErrorEvent.isFunction()) {