diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-12-12 14:34:02 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-12-12 14:34:02 +0000 |
commit | 02cead63ee140e7ed481a94fb9836494a51a8b3e (patch) | |
tree | 1a365b6a58ede6d4986a1f288e49d77a1dd12a1e /ucb | |
parent | f8d9622665b57b382467c4ec19d1c30c37eabf43 (diff) |
INTEGRATION: CWS pmladek08 (1.51.14); FILE MERGED
2007/12/10 14:15:41 pmladek 1.51.14.1: #i82569#
add back support for build with neon-0.24.X
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index adad26cf5119..f4edc3dcadbf 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -4,9 +4,9 @@ * * $RCSfile: NeonSession.cxx,v $ * - * $Revision: 1.51 $ + * $Revision: 1.52 $ * - * last change: $Author: rt $ $Date: 2007-11-07 10:32:37 $ + * last change: $Author: kz $ $Date: 2007-12-12 15:34:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -252,7 +252,11 @@ struct NeonRequestContext // A simple Neon response_block_reader for use with an XInputStream // ------------------------------------------------------------------- +#if NEON_VERSION >= 0250 extern "C" int NeonSession_ResponseBlockReader(void * inUserData, +#else +extern "C" void NeonSession_ResponseBlockReader(void * inUserData, +#endif const char * inBuf, size_t inLen ) { @@ -268,7 +272,9 @@ extern "C" int NeonSession_ResponseBlockReader(void * inUserData, if ( xInputStream.is() ) xInputStream->AddToStream( inBuf, inLen ); } +#if NEON_VERSION >= 0250 return 0; +#endif } // ------------------------------------------------------------------- @@ -276,7 +282,11 @@ extern "C" int NeonSession_ResponseBlockReader(void * inUserData, // A simple Neon response_block_reader for use with an XOutputStream // ------------------------------------------------------------------- +#if NEON_VERSION >= 0250 extern "C" int NeonSession_ResponseBlockWriter( void * inUserData, +#else +extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, +#endif const char * inBuf, size_t inLen ) { @@ -294,7 +304,9 @@ extern "C" int NeonSession_ResponseBlockWriter( void * inUserData, xOutputStream->writeBytes( aSeq ); } } +#if NEON_VERSION >= 0250 return 0; +#endif } // ------------------------------------------------------------------- @@ -1655,10 +1667,15 @@ int NeonSession::GET( ne_session * sess, void *cursor = NULL; const char *name, *value; +#if NEON_VERSION < 0250 + if ( getheaders ) + ne_add_response_header_catcher( req, runResponseHeaderHandler, userdata ); +#endif ne_add_response_body_reader( req, ne_accept_2xx, reader, userdata ); ret = ne_request_dispatch( req ); +#if NEON_VERSION >= 0250 if ( getheaders ) { while ((cursor = ne_response_header_iterate(req, cursor, &name, &value)) @@ -1671,6 +1688,7 @@ int NeonSession::GET( ne_session * sess, runResponseHeaderHandler(userdata, buffer); } } +#endif if ( ret == NE_OK && ne_get_status( req )->klass != 2 ) ret = NE_ERROR; |