Remove draft work that will not be implemented in the near term.

git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1928718 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/serf.h b/serf.h
index 1e2a925..8846a56 100644
--- a/serf.h
+++ b/serf.h
@@ -54,12 +54,6 @@
 
 typedef struct serf_request_t serf_request_t;
 
-#if 0
-typedef struct serf_connection_type_t serf_connection_type_t;
-typedef struct serf_protocol_t serf_protocol_t;
-typedef struct serf_protocol_type_t serf_protocol_type_t;
-#endif /* Connection and protocol API v2 */
-
 typedef struct serf_config_t serf_config_t;
 
 /**
@@ -1887,241 +1881,6 @@
                                      const serf_log_output_t *output);
 
 
-/*** Connection and protocol API v2 ***/
-#if 0
-/* ### docco.  */
-apr_status_t serf_connection_switch_protocol(
-    serf_connection_t *conn,
-    serf_protocol_t *proto
-    /* ### other params?  */
-    );
-
-
-/* ### docco.  */
-typedef struct serf_queue_item_t serf_queue_item_t;
-
-
-/**
- * Present a response to the application.
- *
- * Called when a response has been processed by the current protocol (to any
- * extent necessary) and is ready for the application to handle.
- *
- * Note: @a request may be NULL if this response is server-pushed rather than
- *       specifically requested.
- *
- * @since New in 1.4.
- */
-typedef apr_status_t (*serf_begin_response_t)(
-    /* ### args not settled  */
-    void **handler_baton,
-    serf_request_t *request,
-    serf_bucket_t *response,
-    apr_pool_t *scratch_pool);
-
-
-/* ### better name?  */
-typedef apr_status_t (*serf_handler_t)(
-    /* ### args not settled  */
-    void *handler_baton,
-    serf_bucket_t *response,
-    apr_pool_t *scratch_pool);
-
-
-struct serf_protocol_type_t {
-    /** Name of this protocol type.  */
-    const char *name;
-
-    /** Vtable version.  */
-    int version;
-#define SERF_PROTOCOL_TYPE_VERSION 1
-
-    /**
-     * When a pending request reaches the front of the queue, then it becomes
-     * "active". This callback is used to build/provide the protocol-specific
-     * request bucket.
-     *
-     * ### more docco
-     */
-    apr_status_t (*serf_request_activate_t)(
-        serf_bucket_t **request_bkt,
-        serf_queue_item_t *request_qi,
-        void *request_baton,
-        serf_bucket_alloc_t *request_bktalloc,
-        apr_pool_t *scratch_pool);
-
-    /**
-     * Construct a protocol parsing bucket, for passing to the process_data
-     * vtable entry.
-     *
-     * When data arrives on the connection, and a parser is not already
-     * processing the connection's data, then build a new bucket to parse
-     * this incoming data (according to the protocol).
-     */
-    serf_bucket_t * (*build_parser)(serf_protocol_t *proto,
-                                    apr_pool_t *scratch_pool);
-
-    /**
-     * The protocol should parse all available response data, per the protocol.
-     *
-     * This is called when data has become available to the parser. The protocol
-     * should read all available data before returning.
-     */
-    apr_status_t (*process_data)(serf_protocol_t *proto,
-                                 serf_bucket_t *parser,
-                                 apr_pool_t *scratch_pool);
-};
-
-
-/**
- * Activate an HTTP request when it reaches the front of the queue.
- *
- * ### more docco
- *
- * @since New in 1.4.
- */
-typedef apr_status_t (*serf_http_activate_t)(
-    serf_bucket_t **body_bkt,
-    serf_bucket_t *request_bkt,  /* type REQUEST  */
-    serf_queue_item_t *request_qi,
-    void *request_baton,
-    serf_bucket_alloc_t *request_bktalloc,
-    apr_pool_t *scratch_pool);
-
-
-/**
- * Create a new connection and associated HTTP protocol parser.
- *
- * The new connection/protocol will be associated with @a ctx. It will be
- * opened once a request is placed into its outgoing queue. The connection
- * will use @a hostname and @a port for the origin server. If
- * @a proxy_hostname is not NULL, then all requests will go through the
- * proxy specified by @a proxy_hostname and @a proxy_port.
- *
- * DNS lookups for @a hostname and @a proxy_hostname will be performed
- * when the connection first opened, then cached in case the connection
- * ever needs to be re-opened.
- *
- * When a queued request reaches the front of the queue, and is ready for
- * delivery, then @a activate_cb will be called to prepare the request.
- *
- * @a authn_types specifies the types of authentication allowed on this
- * connection. Normally, it should be SERF_AUTHN_ALL. When authentication
- * credentials are required (for the origin server or the proxy), then
- * @a creds_cb will be called with @a app_baton.
- *
- * When the connection is closed (upon request or because of an error),
- * then @a closed_cb will be called with @a app_baton.
- *
- * The connection and protocol paresr will be allocated in @a result_pool.
- * This function will use @a scratch_pool for temporary allocations.
- *
- * @since New in 1.4.
- */
-apr_status_t serf_http_protocol_create(
-    serf_protocol_t **proto,
-    serf_context_t *ctx,
-    const char *hostname,
-    int port,
-    const char *proxy_hostname,
-    int proxy_port,
-    int authn_types,
-    serf_http_activate_t activate_cb,
-    /* ### do we need different params for CREDS_CB and CLOSED_CB ?  */
-    serf_credentials_callback_t creds_cb,
-    serf_connection_closed_t closed_cb,
-    void *app_baton,
-    apr_pool_t *result_pool,
-    apr_pool_t *scratch_pool);
-
-
-/* ### docco. create http proto parser with an encrypted connection.  */
-apr_status_t serf_https_protocol_create(
-    serf_protocol_t **proto,
-    serf_context_t *ctx,
-    const char *hostname,
-    int port,
-    /* ### client certs, credential validation callbacks, etc  */
-    serf_connection_closed_t closed,
-    void *closed_baton,
-    apr_pool_t *result_pool,
-    apr_pool_t *scratch_pool);
-
-
-/* ### docco. queue up an http request.  */
-serf_queue_item_t *serf_http_request_queue(
-    serf_protocol_t *proto,
-    int priority,
-    void *request_baton);
-
-/**
- * ### rationalize against "serf connections and request" group above
- *
- * @defgroup serf connections
- * @ingroup serf
- * @{
- */
-
-struct serf_connection_type_t {
-    /** Name of this connection type.  */
-    const char *name;
-
-    /** Vtable version.  */
-    int version;
-#define SERF_CONNECTION_TYPE_VERSION 1
-
-    /**
-     * Initiate a connection to the server.
-     *
-     * ### docco. note async. note that request(s) may be queued.
-     * ### can we somehow defer the SSL tunnel's CONNECT to the higher
-     * ### layer? then have the HTTP protocol layer wrap a CONN_PLAIN
-     * ### into a CONN_TLS connection once the tunnel is established?
-     */
-    apr_status_t (*connect)(serf_connection_t *conn);
-
-    /**
-     * Returns a bucket for reading from this connection.
-     *
-     * This bucket remains constant for the lifetime of the connection. It has
-     * built-in BARRIER bucket protection, so it can safely be "destroyed"
-     * without problem (and a later call to this vtable function will return
-     * the same bucket again).
-     *
-     * For all intents and purposes, this bucket is borrowed by the caller.
-     *
-     * This bucket effectively maps to the underlying socket, or possibly to
-     * a decrypting bucket layered over the socket.
-     */
-    serf_bucket_t * (*get_read_bucket)(serf_connection_t *conn);
-
-    /**
-     * Write some data into into the connection.
-     *
-     * Attempt to write a number of iovecs into the connection. The number of
-     * vectors *completely* written will be returned in @a vecs_written. If that
-     * equals @a vecs_size, then @a last_written will be set to 0. If it is less
-     * (not all iovecs were written), then the amount written from the next,
-     * incompletely written iovec is returned in @a last_written.
-     *
-     * In other words, the first byte of unwritten content is located at:
-     *
-     * <pre>
-     *   first = vecs[vecs_written][last_written];
-     * </pre>
-     *
-     * If all bytes are written, then APR_SUCCESS is returned. If only a portion
-     * was written, then APR_EAGAIN will be returned.
-     */
-    apr_status_t (*writev)(serf_connection_t *conn,
-                           int vecs_size, struct iovec *vecs,
-                           int *vecs_written, apr_size_t *last_written);
-};
-
-#endif /* Connection and protocol API v2 */
-/** @} */
-
-
 /* Internal functions for bucket use and lifecycle tracking.
    ### Some of these are directly or via Macros used by third party
    ### applications, such as Apache Subversion */