Make libsvn_ra_svn use proper svn_stream_t based streams for its
communication channels.

* subversion/bindings/javahl/native/OperationContext.cpp
  (OperationContext::openTunnel): Use stream around apr file.
* subversion/bindings/javahl/native/OperationContext.h
  (OperationContext::openTunnel): Use stream around apr file.

* subversion/include/svn_ra.h
  (svn_ra_open_tunnel_func_t): Update callback to use svn_stream_t.

* subversion/include/svn_ra_svn.h
  (svn_ra_svn_create_conn4): New function.
  (svn_ra_svn_create_conn3): Deprecate function.

* subversion/libsvn_ra_svn/client.c
  (handle_child_process_error,
   make_tunnel,
   open_session): Update caller.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_read_full_cb): New function.
  (sasl_pending_cb): Implement svn_stream_data_available_fn_t.
  (svn_ra_svn__enable_sasl_encryption): Provide streams instead of callbacks.

* subversion/libsvn_ra_svn/deprecated.c
  (header): Declare SVN_DEPRECATED to avoid deprecation warnings in
    this file.
  (svn_ra_svn_create_conn3): New function.

* subversion/libsvn_ra_svn/editorp.c
  (check_for_error_internal): Update caller.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn3): Rename to...
  (svn_ra_svn_create_conn4): ... this and pass streams.

* subversion/libsvn_ra_svn/ra_svn.h
  (svn_ra_svn__has_item): Update caller.
  (svn_ra_svn__input_waiting): Update prototype to match
    svn_stream_data_waiting().

  (svn_ra_svn__stream_from_files): Rename to...
  (svn_ra_svn__stream_from_streams): ... this.
  (svn_ra_svn__stream_create): Update arguments to accept two streams instead
    of callbacks to install on a new stream.

  (svn_ra_svn__stream_pending): Update prototype to match
    svn_stream_data_waiting().

* subversion/libsvn_ra_svn/streams.c
  (includes): Add private/svn_io_private.h.
  (svn_ra_svn__stream_st): Store two streams instead of one, to allow directly
    calling into existing callbacks.

  (file_baton_t,
   file_read_cb,
   file_write_cb): Remove functions. We can use the new short read stream api
     for this if the single caller handles the non-standard error behavior.
  (file_timeout_cb): Use file as baton and allow NULL file.
  (file_pending_cb): Remove function.

  (svn_ra_svn__stream_from_files): Rename to...
  (svn_ra_svn__stream_from_streams): ... this and check if the output stream
    is an apr_file_t for the timeout callback.

  (sock_read_cb): Remove nonstandard error behavior, which belongs in the
    caller.
  (sock_read_full_cb): Add unused stub.
  (sock_pending_cb): Implement svn_stream_data_available_fn_t.
  (svn_ra_svn__stream_from_sock): Create a stream here and pass that.

  (svn_ra_svn__stream_create): Stop creating a stream and store the passed
    streams instead.

  (svn_ra_svn__stream_write): Use out_stream.
  (svn_ra_svn__stream_read): Use in_stream and check for 0 byte reads as was
    done in the internal stream before.

  (svn_ra_svn__stream_timeout,
   svn_ra_svn__stream_pending): Update caller.

* subversion/svnserve/serve.c
  (serve_interruptable): Update caller.

* subversion/svnserve/svnserve.c
  (sub_main): Update caller.

* subversion/tests/libsvn_ra/ra-test.c
  (open_tunnel): Return streams.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562072 13f79535-47bb-0310-9956-ffa450edef68