PageRenderTime 53ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/qyoto-4.8.97/network/QAbstractSocket.cs

#
C# | 255 lines | 249 code | 1 blank | 5 comment | 0 complexity | b9d66923dd07508fc0995f112fc5f08d MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0
  1. //Auto-generated by kalyptus. DO NOT EDIT.
  2. namespace Qyoto {
  3. using System;
  4. /// <remarks> See <see cref="IQAbstractSocketSignals"></see> for signals emitted by QAbstractSocket
  5. /// </remarks>
  6. [SmokeClass("QAbstractSocket")]
  7. public abstract class QAbstractSocket : QIODevice {
  8. protected QAbstractSocket(Type dummy) : base((Type) null) {}
  9. protected new void CreateProxy() {
  10. interceptor = new SmokeInvocation(typeof(QAbstractSocket), this);
  11. }
  12. private static SmokeInvocation staticInterceptor = null;
  13. static QAbstractSocket() {
  14. staticInterceptor = new SmokeInvocation(typeof(QAbstractSocket), null);
  15. }
  16. public enum SocketType {
  17. TcpSocket = 0,
  18. UdpSocket = 1,
  19. UnknownSocketType = -1,
  20. }
  21. public enum NetworkLayerProtocol {
  22. IPv4Protocol = 0,
  23. IPv6Protocol = 1,
  24. UnknownNetworkLayerProtocol = -1,
  25. }
  26. public enum SocketError {
  27. ConnectionRefusedError = 0,
  28. RemoteHostClosedError = 1,
  29. HostNotFoundError = 2,
  30. SocketAccessError = 3,
  31. SocketResourceError = 4,
  32. SocketTimeoutError = 5,
  33. DatagramTooLargeError = 6,
  34. NetworkError = 7,
  35. AddressInUseError = 8,
  36. SocketAddressNotAvailableError = 9,
  37. UnsupportedSocketOperationError = 10,
  38. UnfinishedSocketOperationError = 11,
  39. ProxyAuthenticationRequiredError = 12,
  40. SslHandshakeFailedError = 13,
  41. ProxyConnectionRefusedError = 14,
  42. ProxyConnectionClosedError = 15,
  43. ProxyConnectionTimeoutError = 16,
  44. ProxyNotFoundError = 17,
  45. ProxyProtocolError = 18,
  46. UnknownSocketError = -1,
  47. }
  48. public enum SocketState {
  49. UnconnectedState = 0,
  50. HostLookupState = 1,
  51. ConnectingState = 2,
  52. ConnectedState = 3,
  53. BoundState = 4,
  54. ListeningState = 5,
  55. ClosingState = 6,
  56. }
  57. // QAbstractSocket* QAbstractSocket(QAbstractSocket::SocketType arg1,QAbstractSocketPrivate& arg2,QObject* arg3); >>>> NOT CONVERTED
  58. // QAbstractSocket* QAbstractSocket(QAbstractSocket::SocketType arg1,QAbstractSocketPrivate& arg2); >>>> NOT CONVERTED
  59. public QAbstractSocket(QAbstractSocket.SocketType socketType, QObject parent) : this((Type) null) {
  60. CreateProxy();
  61. interceptor.Invoke("QAbstractSocket$#", "QAbstractSocket(QAbstractSocket::SocketType, QObject*)", typeof(void), typeof(QAbstractSocket.SocketType), socketType, typeof(QObject), parent);
  62. }
  63. public void ConnectToHost(string hostName, ushort port, uint mode) {
  64. interceptor.Invoke("connectToHost$$$", "connectToHost(const QString&, unsigned short, QIODevice::OpenMode)", typeof(void), typeof(string), hostName, typeof(ushort), port, typeof(uint), mode);
  65. }
  66. public void ConnectToHost(string hostName, ushort port) {
  67. interceptor.Invoke("connectToHost$$", "connectToHost(const QString&, unsigned short)", typeof(void), typeof(string), hostName, typeof(ushort), port);
  68. }
  69. public void ConnectToHost(QHostAddress address, ushort port, uint mode) {
  70. interceptor.Invoke("connectToHost#$$", "connectToHost(const QHostAddress&, unsigned short, QIODevice::OpenMode)", typeof(void), typeof(QHostAddress), address, typeof(ushort), port, typeof(uint), mode);
  71. }
  72. public void ConnectToHost(QHostAddress address, ushort port) {
  73. interceptor.Invoke("connectToHost#$", "connectToHost(const QHostAddress&, unsigned short)", typeof(void), typeof(QHostAddress), address, typeof(ushort), port);
  74. }
  75. public void DisconnectFromHost() {
  76. interceptor.Invoke("disconnectFromHost", "disconnectFromHost()", typeof(void));
  77. }
  78. public bool IsValid() {
  79. return (bool) interceptor.Invoke("isValid", "isValid() const", typeof(bool));
  80. }
  81. [SmokeMethod("bytesAvailable() const")]
  82. public override long BytesAvailable() {
  83. return (long) interceptor.Invoke("bytesAvailable", "bytesAvailable() const", typeof(long));
  84. }
  85. [SmokeMethod("bytesToWrite() const")]
  86. public override long BytesToWrite() {
  87. return (long) interceptor.Invoke("bytesToWrite", "bytesToWrite() const", typeof(long));
  88. }
  89. [SmokeMethod("canReadLine() const")]
  90. public override bool CanReadLine() {
  91. return (bool) interceptor.Invoke("canReadLine", "canReadLine() const", typeof(bool));
  92. }
  93. public ushort LocalPort() {
  94. return (ushort) interceptor.Invoke("localPort", "localPort() const", typeof(ushort));
  95. }
  96. public QHostAddress LocalAddress() {
  97. return (QHostAddress) interceptor.Invoke("localAddress", "localAddress() const", typeof(QHostAddress));
  98. }
  99. public ushort PeerPort() {
  100. return (ushort) interceptor.Invoke("peerPort", "peerPort() const", typeof(ushort));
  101. }
  102. public QHostAddress PeerAddress() {
  103. return (QHostAddress) interceptor.Invoke("peerAddress", "peerAddress() const", typeof(QHostAddress));
  104. }
  105. public string PeerName() {
  106. return (string) interceptor.Invoke("peerName", "peerName() const", typeof(string));
  107. }
  108. public long ReadBufferSize() {
  109. return (long) interceptor.Invoke("readBufferSize", "readBufferSize() const", typeof(long));
  110. }
  111. public void SetReadBufferSize(long size) {
  112. interceptor.Invoke("setReadBufferSize$", "setReadBufferSize(qint64)", typeof(void), typeof(long), size);
  113. }
  114. public void Abort() {
  115. interceptor.Invoke("abort", "abort()", typeof(void));
  116. }
  117. public int SocketDescriptor() {
  118. return (int) interceptor.Invoke("socketDescriptor", "socketDescriptor() const", typeof(int));
  119. }
  120. public bool SetSocketDescriptor(int socketDescriptor, QAbstractSocket.SocketState state, uint openMode) {
  121. return (bool) interceptor.Invoke("setSocketDescriptor$$$", "setSocketDescriptor(int, QAbstractSocket::SocketState, QIODevice::OpenMode)", typeof(bool), typeof(int), socketDescriptor, typeof(QAbstractSocket.SocketState), state, typeof(uint), openMode);
  122. }
  123. public bool SetSocketDescriptor(int socketDescriptor, QAbstractSocket.SocketState state) {
  124. return (bool) interceptor.Invoke("setSocketDescriptor$$", "setSocketDescriptor(int, QAbstractSocket::SocketState)", typeof(bool), typeof(int), socketDescriptor, typeof(QAbstractSocket.SocketState), state);
  125. }
  126. public bool SetSocketDescriptor(int socketDescriptor) {
  127. return (bool) interceptor.Invoke("setSocketDescriptor$", "setSocketDescriptor(int)", typeof(bool), typeof(int), socketDescriptor);
  128. }
  129. public QAbstractSocket.SocketType socketType() {
  130. return (QAbstractSocket.SocketType) interceptor.Invoke("socketType", "socketType() const", typeof(QAbstractSocket.SocketType));
  131. }
  132. public QAbstractSocket.SocketState State() {
  133. return (QAbstractSocket.SocketState) interceptor.Invoke("state", "state() const", typeof(QAbstractSocket.SocketState));
  134. }
  135. public QAbstractSocket.SocketError Error() {
  136. return (QAbstractSocket.SocketError) interceptor.Invoke("error", "error() const", typeof(QAbstractSocket.SocketError));
  137. }
  138. [SmokeMethod("close()")]
  139. public override void Close() {
  140. interceptor.Invoke("close", "close()", typeof(void));
  141. }
  142. [SmokeMethod("isSequential() const")]
  143. public override bool IsSequential() {
  144. return (bool) interceptor.Invoke("isSequential", "isSequential() const", typeof(bool));
  145. }
  146. [SmokeMethod("atEnd() const")]
  147. public override bool AtEnd() {
  148. return (bool) interceptor.Invoke("atEnd", "atEnd() const", typeof(bool));
  149. }
  150. public bool Flush() {
  151. return (bool) interceptor.Invoke("flush", "flush()", typeof(bool));
  152. }
  153. public bool WaitForConnected(int msecs) {
  154. return (bool) interceptor.Invoke("waitForConnected$", "waitForConnected(int)", typeof(bool), typeof(int), msecs);
  155. }
  156. public bool WaitForConnected() {
  157. return (bool) interceptor.Invoke("waitForConnected", "waitForConnected()", typeof(bool));
  158. }
  159. [SmokeMethod("waitForReadyRead(int)")]
  160. public override bool WaitForReadyRead(int msecs) {
  161. return (bool) interceptor.Invoke("waitForReadyRead$", "waitForReadyRead(int)", typeof(bool), typeof(int), msecs);
  162. }
  163. public bool WaitForReadyRead() {
  164. return (bool) interceptor.Invoke("waitForReadyRead", "waitForReadyRead()", typeof(bool));
  165. }
  166. [SmokeMethod("waitForBytesWritten(int)")]
  167. public override bool WaitForBytesWritten(int msecs) {
  168. return (bool) interceptor.Invoke("waitForBytesWritten$", "waitForBytesWritten(int)", typeof(bool), typeof(int), msecs);
  169. }
  170. public bool WaitForBytesWritten() {
  171. return (bool) interceptor.Invoke("waitForBytesWritten", "waitForBytesWritten()", typeof(bool));
  172. }
  173. public bool WaitForDisconnected(int msecs) {
  174. return (bool) interceptor.Invoke("waitForDisconnected$", "waitForDisconnected(int)", typeof(bool), typeof(int), msecs);
  175. }
  176. public bool WaitForDisconnected() {
  177. return (bool) interceptor.Invoke("waitForDisconnected", "waitForDisconnected()", typeof(bool));
  178. }
  179. public void SetProxy(QNetworkProxy networkProxy) {
  180. interceptor.Invoke("setProxy#", "setProxy(const QNetworkProxy&)", typeof(void), typeof(QNetworkProxy), networkProxy);
  181. }
  182. public QNetworkProxy Proxy() {
  183. return (QNetworkProxy) interceptor.Invoke("proxy", "proxy() const", typeof(QNetworkProxy));
  184. }
  185. [SmokeMethod("readData(char*, qint64)")]
  186. protected override long ReadData(Pointer<sbyte> data, long maxlen) {
  187. return (long) interceptor.Invoke("readData$$", "readData(char*, qint64)", typeof(long), typeof(Pointer<sbyte>), data, typeof(long), maxlen);
  188. }
  189. [SmokeMethod("readLineData(char*, qint64)")]
  190. protected override long ReadLineData(Pointer<sbyte> data, long maxlen) {
  191. return (long) interceptor.Invoke("readLineData$$", "readLineData(char*, qint64)", typeof(long), typeof(Pointer<sbyte>), data, typeof(long), maxlen);
  192. }
  193. [SmokeMethod("writeData(const char*, qint64)")]
  194. protected override long WriteData(string data, long len) {
  195. return (long) interceptor.Invoke("writeData$$", "writeData(const char*, qint64)", typeof(long), typeof(string), data, typeof(long), len);
  196. }
  197. protected void SetSocketState(QAbstractSocket.SocketState state) {
  198. interceptor.Invoke("setSocketState$", "setSocketState(QAbstractSocket::SocketState)", typeof(void), typeof(QAbstractSocket.SocketState), state);
  199. }
  200. protected void SetSocketError(QAbstractSocket.SocketError socketError) {
  201. interceptor.Invoke("setSocketError$", "setSocketError(QAbstractSocket::SocketError)", typeof(void), typeof(QAbstractSocket.SocketError), socketError);
  202. }
  203. protected void SetLocalPort(ushort port) {
  204. interceptor.Invoke("setLocalPort$", "setLocalPort(unsigned short)", typeof(void), typeof(ushort), port);
  205. }
  206. protected void SetLocalAddress(QHostAddress address) {
  207. interceptor.Invoke("setLocalAddress#", "setLocalAddress(const QHostAddress&)", typeof(void), typeof(QHostAddress), address);
  208. }
  209. protected void SetPeerPort(ushort port) {
  210. interceptor.Invoke("setPeerPort$", "setPeerPort(unsigned short)", typeof(void), typeof(ushort), port);
  211. }
  212. protected void SetPeerAddress(QHostAddress address) {
  213. interceptor.Invoke("setPeerAddress#", "setPeerAddress(const QHostAddress&)", typeof(void), typeof(QHostAddress), address);
  214. }
  215. protected void SetPeerName(string name) {
  216. interceptor.Invoke("setPeerName$", "setPeerName(const QString&)", typeof(void), typeof(string), name);
  217. }
  218. [Q_SLOT("void connectToHostImplementation(QString, quint16, OpenMode)")]
  219. protected void ConnectToHostImplementation(string hostName, ushort port, uint mode) {
  220. interceptor.Invoke("connectToHostImplementation$$$", "connectToHostImplementation(const QString&, unsigned short, QIODevice::OpenMode)", typeof(void), typeof(string), hostName, typeof(ushort), port, typeof(uint), mode);
  221. }
  222. [Q_SLOT("void connectToHostImplementation(QString, quint16)")]
  223. protected void ConnectToHostImplementation(string hostName, ushort port) {
  224. interceptor.Invoke("connectToHostImplementation$$", "connectToHostImplementation(const QString&, unsigned short)", typeof(void), typeof(string), hostName, typeof(ushort), port);
  225. }
  226. [Q_SLOT("void disconnectFromHostImplementation()")]
  227. protected void DisconnectFromHostImplementation() {
  228. interceptor.Invoke("disconnectFromHostImplementation", "disconnectFromHostImplementation()", typeof(void));
  229. }
  230. public static new string Tr(string s, string c) {
  231. return (string) staticInterceptor.Invoke("tr$$", "tr(const char*, const char*)", typeof(string), typeof(string), s, typeof(string), c);
  232. }
  233. public static new string Tr(string s) {
  234. return (string) staticInterceptor.Invoke("tr$", "tr(const char*)", typeof(string), typeof(string), s);
  235. }
  236. protected new IQAbstractSocketSignals Emit {
  237. get { return (IQAbstractSocketSignals) Q_EMIT; }
  238. }
  239. }
  240. public interface IQAbstractSocketSignals : IQIODeviceSignals {
  241. [Q_SIGNAL("void hostFound()")]
  242. void HostFound();
  243. [Q_SIGNAL("void connected()")]
  244. void Connected();
  245. [Q_SIGNAL("void disconnected()")]
  246. void Disconnected();
  247. [Q_SIGNAL("void stateChanged(QAbstractSocket::SocketState)")]
  248. void StateChanged(QAbstractSocket.SocketState arg1);
  249. [Q_SIGNAL("void error(QAbstractSocket::SocketError)")]
  250. void Error(QAbstractSocket.SocketError arg1);
  251. [Q_SIGNAL("void proxyAuthenticationRequired(QNetworkProxy, QAuthenticator*)")]
  252. void ProxyAuthenticationRequired(QNetworkProxy proxy, QAuthenticator authenticator);
  253. }
  254. }