//Auto-generated by kalyptus. DO NOT EDIT.
namespace Qyoto {
    using System;
    using System.Collections.Generic;
    /// <remarks> See <see cref="IQHttpSignals"></see> for signals emitted by QHttp
    /// </remarks>
    [SmokeClass("QHttp")]
    public class QHttp : QObject, IDisposable {
        protected QHttp(Type dummy) : base((Type) null) {}
        protected new void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(QHttp), this);
        }
        private static SmokeInvocation staticInterceptor = null;
        static QHttp() {
            staticInterceptor = new SmokeInvocation(typeof(QHttp), null);
        }
        public enum ConnectionMode {
            ConnectionModeHttp = 0,
            ConnectionModeHttps = 1,
        }
        public enum State {
            Unconnected = 0,
            HostLookup = 1,
            Connecting = 2,
            Sending = 3,
            Reading = 4,
            Connected = 5,
            Closing = 6,
        }
        public enum Error {
            NoError = 0,
            UnknownError = 1,
            HostNotFound = 2,
            ConnectionRefused = 3,
            UnexpectedClose = 4,
            InvalidResponseHeader = 5,
            WrongContentLength = 6,
            Aborted = 7,
            AuthenticationRequiredError = 8,
            ProxyAuthenticationRequiredError = 9,
        }
        public QHttp(QObject parent) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp#", "QHttp(QObject*)", typeof(void), typeof(QObject), parent);
        }
        public QHttp() : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp", "QHttp()", typeof(void));
        }
        public QHttp(string hostname, ushort port, QObject parent) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$$#", "QHttp(const QString&, unsigned short, QObject*)", typeof(void), typeof(string), hostname, typeof(ushort), port, typeof(QObject), parent);
        }
        public QHttp(string hostname, ushort port) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$$", "QHttp(const QString&, unsigned short)", typeof(void), typeof(string), hostname, typeof(ushort), port);
        }
        public QHttp(string hostname) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$", "QHttp(const QString&)", typeof(void), typeof(string), hostname);
        }
        public QHttp(string hostname, QHttp.ConnectionMode mode, ushort port, QObject parent) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$$$#", "QHttp(const QString&, QHttp::ConnectionMode, unsigned short, QObject*)", typeof(void), typeof(string), hostname, typeof(QHttp.ConnectionMode), mode, typeof(ushort), port, typeof(QObject), parent);
        }
        public QHttp(string hostname, QHttp.ConnectionMode mode, ushort port) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$$$", "QHttp(const QString&, QHttp::ConnectionMode, unsigned short)", typeof(void), typeof(string), hostname, typeof(QHttp.ConnectionMode), mode, typeof(ushort), port);
        }
        public QHttp(string hostname, QHttp.ConnectionMode mode) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("QHttp$$", "QHttp(const QString&, QHttp::ConnectionMode)", typeof(void), typeof(string), hostname, typeof(QHttp.ConnectionMode), mode);
        }
        public int SetHost(string hostname, ushort port) {
            return (int) interceptor.Invoke("setHost$$", "setHost(const QString&, unsigned short)", typeof(int), typeof(string), hostname, typeof(ushort), port);
        }
        public int SetHost(string hostname) {
            return (int) interceptor.Invoke("setHost$", "setHost(const QString&)", typeof(int), typeof(string), hostname);
        }
        public int SetHost(string hostname, QHttp.ConnectionMode mode, ushort port) {
            return (int) interceptor.Invoke("setHost$$$", "setHost(const QString&, QHttp::ConnectionMode, unsigned short)", typeof(int), typeof(string), hostname, typeof(QHttp.ConnectionMode), mode, typeof(ushort), port);
        }
        public int SetHost(string hostname, QHttp.ConnectionMode mode) {
            return (int) interceptor.Invoke("setHost$$", "setHost(const QString&, QHttp::ConnectionMode)", typeof(int), typeof(string), hostname, typeof(QHttp.ConnectionMode), mode);
        }
        public int SetSocket(QTcpSocket socket) {
            return (int) interceptor.Invoke("setSocket#", "setSocket(QTcpSocket*)", typeof(int), typeof(QTcpSocket), socket);
        }
        public int SetUser(string username, string password) {
            return (int) interceptor.Invoke("setUser$$", "setUser(const QString&, const QString&)", typeof(int), typeof(string), username, typeof(string), password);
        }
        public int SetUser(string username) {
            return (int) interceptor.Invoke("setUser$", "setUser(const QString&)", typeof(int), typeof(string), username);
        }
        public int SetProxy(string host, int port, string username, string password) {
            return (int) interceptor.Invoke("setProxy$$$$", "setProxy(const QString&, int, const QString&, const QString&)", typeof(int), typeof(string), host, typeof(int), port, typeof(string), username, typeof(string), password);
        }
        public int SetProxy(string host, int port, string username) {
            return (int) interceptor.Invoke("setProxy$$$", "setProxy(const QString&, int, const QString&)", typeof(int), typeof(string), host, typeof(int), port, typeof(string), username);
        }
        public int SetProxy(string host, int port) {
            return (int) interceptor.Invoke("setProxy$$", "setProxy(const QString&, int)", typeof(int), typeof(string), host, typeof(int), port);
        }
        public int SetProxy(QNetworkProxy proxy) {
            return (int) interceptor.Invoke("setProxy#", "setProxy(const QNetworkProxy&)", typeof(int), typeof(QNetworkProxy), proxy);
        }
        public int Get(string path, QIODevice to) {
            return (int) interceptor.Invoke("get$#", "get(const QString&, QIODevice*)", typeof(int), typeof(string), path, typeof(QIODevice), to);
        }
        public int Get(string path) {
            return (int) interceptor.Invoke("get$", "get(const QString&)", typeof(int), typeof(string), path);
        }
        public int Post(string path, QIODevice data, QIODevice to) {
            return (int) interceptor.Invoke("post$##", "post(const QString&, QIODevice*, QIODevice*)", typeof(int), typeof(string), path, typeof(QIODevice), data, typeof(QIODevice), to);
        }
        public int Post(string path, QIODevice data) {
            return (int) interceptor.Invoke("post$#", "post(const QString&, QIODevice*)", typeof(int), typeof(string), path, typeof(QIODevice), data);
        }
        public int Post(string path, QByteArray data, QIODevice to) {
            return (int) interceptor.Invoke("post$##", "post(const QString&, const QByteArray&, QIODevice*)", typeof(int), typeof(string), path, typeof(QByteArray), data, typeof(QIODevice), to);
        }
        public int Post(string path, QByteArray data) {
            return (int) interceptor.Invoke("post$#", "post(const QString&, const QByteArray&)", typeof(int), typeof(string), path, typeof(QByteArray), data);
        }
        public int Head(string path) {
            return (int) interceptor.Invoke("head$", "head(const QString&)", typeof(int), typeof(string), path);
        }
        public int Request(QHttpRequestHeader header, QIODevice device, QIODevice to) {
            return (int) interceptor.Invoke("request###", "request(const QHttpRequestHeader&, QIODevice*, QIODevice*)", typeof(int), typeof(QHttpRequestHeader), header, typeof(QIODevice), device, typeof(QIODevice), to);
        }
        public int Request(QHttpRequestHeader header, QIODevice device) {
            return (int) interceptor.Invoke("request##", "request(const QHttpRequestHeader&, QIODevice*)", typeof(int), typeof(QHttpRequestHeader), header, typeof(QIODevice), device);
        }
        public int Request(QHttpRequestHeader header) {
            return (int) interceptor.Invoke("request#", "request(const QHttpRequestHeader&)", typeof(int), typeof(QHttpRequestHeader), header);
        }
        public int Request(QHttpRequestHeader header, QByteArray data, QIODevice to) {
            return (int) interceptor.Invoke("request###", "request(const QHttpRequestHeader&, const QByteArray&, QIODevice*)", typeof(int), typeof(QHttpRequestHeader), header, typeof(QByteArray), data, typeof(QIODevice), to);
        }
        public int Request(QHttpRequestHeader header, QByteArray data) {
            return (int) interceptor.Invoke("request##", "request(const QHttpRequestHeader&, const QByteArray&)", typeof(int), typeof(QHttpRequestHeader), header, typeof(QByteArray), data);
        }
        public int CloseConnection() {
            return (int) interceptor.Invoke("closeConnection", "closeConnection()", typeof(int));
        }
        public int Close() {
            return (int) interceptor.Invoke("close", "close()", typeof(int));
        }
        public long BytesAvailable() {
            return (long) interceptor.Invoke("bytesAvailable", "bytesAvailable() const", typeof(long));
        }
        public long Read(Pointer<sbyte> data, long maxlen) {
            return (long) interceptor.Invoke("read$$", "read(char*, qint64)", typeof(long), typeof(Pointer<sbyte>), data, typeof(long), maxlen);
        }
        public QByteArray ReadAll() {
            return (QByteArray) interceptor.Invoke("readAll", "readAll()", typeof(QByteArray));
        }
        public int CurrentId() {
            return (int) interceptor.Invoke("currentId", "currentId() const", typeof(int));
        }
        public QIODevice CurrentSourceDevice() {
            return (QIODevice) interceptor.Invoke("currentSourceDevice", "currentSourceDevice() const", typeof(QIODevice));
        }
        public QIODevice CurrentDestinationDevice() {
            return (QIODevice) interceptor.Invoke("currentDestinationDevice", "currentDestinationDevice() const", typeof(QIODevice));
        }
        public QHttpRequestHeader CurrentRequest() {
            return (QHttpRequestHeader) interceptor.Invoke("currentRequest", "currentRequest() const", typeof(QHttpRequestHeader));
        }
        public QHttpResponseHeader LastResponse() {
            return (QHttpResponseHeader) interceptor.Invoke("lastResponse", "lastResponse() const", typeof(QHttpResponseHeader));
        }
        public bool HasPendingRequests() {
            return (bool) interceptor.Invoke("hasPendingRequests", "hasPendingRequests() const", typeof(bool));
        }
        public void ClearPendingRequests() {
            interceptor.Invoke("clearPendingRequests", "clearPendingRequests()", typeof(void));
        }
        public QHttp.State state() {
            return (QHttp.State) interceptor.Invoke("state", "state() const", typeof(QHttp.State));
        }
        public QHttp.Error error() {
            return (QHttp.Error) interceptor.Invoke("error", "error() const", typeof(QHttp.Error));
        }
        public string ErrorString() {
            return (string) interceptor.Invoke("errorString", "errorString() const", typeof(string));
        }
        [Q_SLOT("void abort()")]
        public void Abort() {
            interceptor.Invoke("abort", "abort()", typeof(void));
        }
        [Q_SLOT("void ignoreSslErrors()")]
        public void IgnoreSslErrors() {
            interceptor.Invoke("ignoreSslErrors", "ignoreSslErrors()", typeof(void));
        }
        ~QHttp() {
            interceptor.Invoke("~QHttp", "~QHttp()", typeof(void));
        }
        public new void Dispose() {
            interceptor.Invoke("~QHttp", "~QHttp()", typeof(void));
        }
        public static new string Tr(string s, string c) {
            return (string) staticInterceptor.Invoke("tr$$", "tr(const char*, const char*)", typeof(string), typeof(string), s, typeof(string), c);
        }
        public static new string Tr(string s) {
            return (string) staticInterceptor.Invoke("tr$", "tr(const char*)", typeof(string), typeof(string), s);
        }
        protected new IQHttpSignals Emit {
            get { return (IQHttpSignals) Q_EMIT; }
        }
    }

    public interface IQHttpSignals : IQObjectSignals {
        [Q_SIGNAL("void stateChanged(int)")]
        void StateChanged(int arg1);
        [Q_SIGNAL("void responseHeaderReceived(QHttpResponseHeader)")]
        void ResponseHeaderReceived(QHttpResponseHeader resp);
        [Q_SIGNAL("void readyRead(QHttpResponseHeader)")]
        void ReadyRead(QHttpResponseHeader resp);
        [Q_SIGNAL("void dataSendProgress(int, int)")]
        void DataSendProgress(int arg1, int arg2);
        [Q_SIGNAL("void dataReadProgress(int, int)")]
        void DataReadProgress(int arg1, int arg2);
        [Q_SIGNAL("void requestStarted(int)")]
        void RequestStarted(int arg1);
        [Q_SIGNAL("void requestFinished(int, bool)")]
        void RequestFinished(int arg1, bool arg2);
        [Q_SIGNAL("void done(bool)")]
        void Done(bool arg1);
        [Q_SIGNAL("void proxyAuthenticationRequired(QNetworkProxy, QAuthenticator*)")]
        void ProxyAuthenticationRequired(QNetworkProxy proxy, QAuthenticator arg2);
        [Q_SIGNAL("void authenticationRequired(QString, quint16, QAuthenticator*)")]
        void AuthenticationRequired(string hostname, ushort port, QAuthenticator arg3);
        [Q_SIGNAL("void sslErrors(QList<QSslError>)")]
        void SslErrors(List<QSslError> errors);
    }
}
