// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_java_net_protocol_http_HTTPURLConnection__
#define __gnu_java_net_protocol_http_HTTPURLConnection__

#pragma interface

#include <javax/net/ssl/HttpsURLConnection.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace security
    {
      namespace cert
      {
        class Certificate;
      }
    }
    namespace net
    {
      class URL;
    }
  }
  namespace javax
  {
    namespace net
    {
      namespace ssl
      {
        class HandshakeCompletedEvent;
      }
    }
  }
  namespace gnu
  {
    namespace java
    {
      namespace net
      {
        namespace protocol
        {
          namespace http
          {
            class HTTPURLConnection;
            class Response;
            class Headers;
            class Request;
            class HTTPConnection;
          }
        }
      }
    }
  }
}

class gnu::java::net::protocol::http::HTTPURLConnection : public ::javax::net::ssl::HttpsURLConnection
{
public:
  HTTPURLConnection (::java::net::URL *);
  virtual void connect ();
public: // actually package-private
  virtual ::gnu::java::net::protocol::http::HTTPConnection *getConnection (::java::lang::String *, jint, jboolean);
public:
  virtual void disconnect ();
  virtual jboolean usingProxy ();
  virtual void setRequestMethod (::java::lang::String *);
  virtual ::java::lang::String *getRequestProperty (::java::lang::String *);
  virtual ::java::util::Map *getRequestProperties ();
  virtual void setRequestProperty (::java::lang::String *, ::java::lang::String *);
  virtual void addRequestProperty (::java::lang::String *, ::java::lang::String *);
  virtual ::java::io::OutputStream *getOutputStream ();
  virtual ::java::io::InputStream *getInputStream ();
  virtual ::java::io::InputStream *getErrorStream () { return errorSink; }
  virtual ::java::util::Map *getHeaderFields ();
public: // actually package-private
  virtual ::java::lang::String *getStatusLine (::gnu::java::net::protocol::http::Response *);
public:
  virtual ::java::lang::String *getHeaderField (jint);
  virtual ::java::lang::String *getHeaderFieldKey (jint);
  virtual ::java::lang::String *getHeaderField (::java::lang::String *);
  virtual jlong getHeaderFieldDate (::java::lang::String *, jlong);
  virtual ::java::lang::String *getContentType ();
  virtual jint getResponseCode ();
  virtual ::java::lang::String *getResponseMessage ();
  virtual ::java::lang::String *getCipherSuite ();
  virtual JArray< ::java::security::cert::Certificate *> *getLocalCertificates ();
  virtual JArray< ::java::security::cert::Certificate *> *getServerCertificates ();
  virtual void handshakeCompleted (::javax::net::ssl::HandshakeCompletedEvent *);
  virtual void setConnectTimeout (jint);
private:
  ::gnu::java::net::protocol::http::HTTPConnection * __attribute__((aligned(__alignof__( ::javax::net::ssl::HttpsURLConnection )))) connection;
public: // actually package-private
  ::java::lang::String *proxyHostname;
  jint proxyPort;
  ::java::lang::String *agent;
  jboolean keepAlive;
private:
  ::gnu::java::net::protocol::http::Request *request;
  ::gnu::java::net::protocol::http::Headers *requestHeaders;
  ::java::io::ByteArrayOutputStream *requestSink;
  jboolean requestMethodSetExplicitly;
  ::gnu::java::net::protocol::http::Response *response;
  ::java::io::InputStream *responseSink;
  ::java::io::InputStream *errorSink;
  ::javax::net::ssl::HandshakeCompletedEvent *handshakeEvent;

  friend class gnu_java_net_protocol_http_HTTPURLConnection$1;
public:

  static ::java::lang::Class class$;
};

#endif /* __gnu_java_net_protocol_http_HTTPURLConnection__ */
