Kaydet (Commit) baf19a23 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Bin ASCII art and pointless comments

Change-Id: I9c510a0edb2a04d1378d488cc724e8f9982b5ba3
üst 443dd20b
...@@ -46,8 +46,6 @@ const ::rtl::OUString DAVProperties::SUPPORTEDLOCK("DAV:supportedlock"); ...@@ -46,8 +46,6 @@ const ::rtl::OUString DAVProperties::SUPPORTEDLOCK("DAV:supportedlock");
const ::rtl::OUString DAVProperties::EXECUTABLE("http://apache.org/dav/props/executable"); const ::rtl::OUString DAVProperties::EXECUTABLE("http://apache.org/dav/props/executable");
// -------------------------------------------------------------------
// static
void DAVProperties::createNeonPropName( const rtl::OUString & rFullName, void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
NeonPropName & rName ) NeonPropName & rName )
{ {
...@@ -106,8 +104,6 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName, ...@@ -106,8 +104,6 @@ void DAVProperties::createNeonPropName( const rtl::OUString & rFullName,
} }
} }
// -------------------------------------------------------------------
// static
void DAVProperties::createUCBPropName( const char * nspace, void DAVProperties::createUCBPropName( const char * nspace,
const char * name, const char * name,
rtl::OUString & rFullName ) rtl::OUString & rFullName )
...@@ -168,8 +164,6 @@ void DAVProperties::createUCBPropName( const char * nspace, ...@@ -168,8 +164,6 @@ void DAVProperties::createUCBPropName( const char * nspace,
} }
} }
// -------------------------------------------------------------------
// static
bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName ) bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName )
{ {
return ( rName.nspace && return ( rName.nspace &&
......
...@@ -87,10 +87,6 @@ void process_headers( ne_request * req, ...@@ -87,10 +87,6 @@ void process_headers( ne_request * req,
} // namespace } // namespace
// -------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------
extern osl::Mutex aGlobalNeonMutex; extern osl::Mutex aGlobalNeonMutex;
NeonHeadRequest::NeonHeadRequest( HttpSession * inSession, NeonHeadRequest::NeonHeadRequest( HttpSession * inSession,
...@@ -124,9 +120,6 @@ NeonHeadRequest::NeonHeadRequest( HttpSession * inSession, ...@@ -124,9 +120,6 @@ NeonHeadRequest::NeonHeadRequest( HttpSession * inSession,
ne_request_destroy( req ); ne_request_destroy( req );
} }
// -------------------------------------------------------------------
// Destructor
// -------------------------------------------------------------------
NeonHeadRequest::~NeonHeadRequest() NeonHeadRequest::~NeonHeadRequest()
{ {
} }
......
...@@ -35,26 +35,17 @@ using namespace com::sun::star::io; ...@@ -35,26 +35,17 @@ using namespace com::sun::star::io;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
using namespace webdav_ucp; using namespace webdav_ucp;
// -------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------
NeonInputStream::NeonInputStream( void ) NeonInputStream::NeonInputStream( void )
: mLen( 0 ), : mLen( 0 ),
mPos( 0 ) mPos( 0 )
{ {
} }
// -------------------------------------------------------------------
// Destructor
// -------------------------------------------------------------------
NeonInputStream::~NeonInputStream( void ) NeonInputStream::~NeonInputStream( void )
{ {
} }
// -------------------------------------------------------------------
// AddToStream
// Allows the caller to add some data to the "end" of the stream // Allows the caller to add some data to the "end" of the stream
// -------------------------------------------------------------------
void NeonInputStream::AddToStream( const char * inBuf, sal_Int32 inLen ) void NeonInputStream::AddToStream( const char * inBuf, sal_Int32 inLen )
{ {
mInputBuffer.realloc( sal::static_int_cast<sal_Int32>(mLen) + inLen ); mInputBuffer.realloc( sal::static_int_cast<sal_Int32>(mLen) + inLen );
...@@ -62,9 +53,6 @@ void NeonInputStream::AddToStream( const char * inBuf, sal_Int32 inLen ) ...@@ -62,9 +53,6 @@ void NeonInputStream::AddToStream( const char * inBuf, sal_Int32 inLen )
mLen += inLen; mLen += inLen;
} }
// -------------------------------------------------------------------
// queryInterface
// -------------------------------------------------------------------
Any NeonInputStream::queryInterface( const Type &type ) Any NeonInputStream::queryInterface( const Type &type )
throw( RuntimeException ) throw( RuntimeException )
{ {
...@@ -74,10 +62,7 @@ Any NeonInputStream::queryInterface( const Type &type ) ...@@ -74,10 +62,7 @@ Any NeonInputStream::queryInterface( const Type &type )
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( type ); return aRet.hasValue() ? aRet : OWeakObject::queryInterface( type );
} }
// -------------------------------------------------------------------
// readBytes
// "Reads" the specified number of bytes from the stream // "Reads" the specified number of bytes from the stream
// -------------------------------------------------------------------
sal_Int32 SAL_CALL NeonInputStream::readBytes( sal_Int32 SAL_CALL NeonInputStream::readBytes(
::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
throw( ::com::sun::star::io::NotConnectedException, throw( ::com::sun::star::io::NotConnectedException,
...@@ -104,9 +89,6 @@ sal_Int32 SAL_CALL NeonInputStream::readBytes( ...@@ -104,9 +89,6 @@ sal_Int32 SAL_CALL NeonInputStream::readBytes(
return theBytes2Read; return theBytes2Read;
} }
// -------------------------------------------------------------------
// readSomeBytes
// -------------------------------------------------------------------
sal_Int32 SAL_CALL NeonInputStream::readSomeBytes( sal_Int32 SAL_CALL NeonInputStream::readSomeBytes(
::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead )
throw( ::com::sun::star::io::NotConnectedException, throw( ::com::sun::star::io::NotConnectedException,
...@@ -118,10 +100,7 @@ sal_Int32 SAL_CALL NeonInputStream::readSomeBytes( ...@@ -118,10 +100,7 @@ sal_Int32 SAL_CALL NeonInputStream::readSomeBytes(
return readBytes( aData, nMaxBytesToRead ); return readBytes( aData, nMaxBytesToRead );
} }
// -------------------------------------------------------------------
// skipBytes
// Moves the current stream position forward // Moves the current stream position forward
// -------------------------------------------------------------------
void SAL_CALL NeonInputStream::skipBytes( sal_Int32 nBytesToSkip ) void SAL_CALL NeonInputStream::skipBytes( sal_Int32 nBytesToSkip )
throw( ::com::sun::star::io::NotConnectedException, throw( ::com::sun::star::io::NotConnectedException,
::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::BufferSizeExceededException,
...@@ -133,10 +112,7 @@ void SAL_CALL NeonInputStream::skipBytes( sal_Int32 nBytesToSkip ) ...@@ -133,10 +112,7 @@ void SAL_CALL NeonInputStream::skipBytes( sal_Int32 nBytesToSkip )
mPos = mLen; mPos = mLen;
} }
// -------------------------------------------------------------------
// available
// Returns the number of unread bytes currently remaining on the stream // Returns the number of unread bytes currently remaining on the stream
// -------------------------------------------------------------------
sal_Int32 SAL_CALL NeonInputStream::available( ) sal_Int32 SAL_CALL NeonInputStream::available( )
throw( ::com::sun::star::io::NotConnectedException, throw( ::com::sun::star::io::NotConnectedException,
::com::sun::star::io::IOException, ::com::sun::star::io::IOException,
...@@ -145,9 +121,6 @@ sal_Int32 SAL_CALL NeonInputStream::available( ) ...@@ -145,9 +121,6 @@ sal_Int32 SAL_CALL NeonInputStream::available( )
return sal::static_int_cast<sal_Int32>(mLen - mPos); return sal::static_int_cast<sal_Int32>(mLen - mPos);
} }
// -------------------------------------------------------------------
// closeInput
// -------------------------------------------------------------------
void SAL_CALL NeonInputStream::closeInput( void ) void SAL_CALL NeonInputStream::closeInput( void )
throw( ::com::sun::star::io::NotConnectedException, throw( ::com::sun::star::io::NotConnectedException,
::com::sun::star::io::IOException, ::com::sun::star::io::IOException,
...@@ -155,9 +128,6 @@ void SAL_CALL NeonInputStream::closeInput( void ) ...@@ -155,9 +128,6 @@ void SAL_CALL NeonInputStream::closeInput( void )
{ {
} }
// -------------------------------------------------------------------
// seek
// -------------------------------------------------------------------
void SAL_CALL NeonInputStream::seek( sal_Int64 location ) void SAL_CALL NeonInputStream::seek( sal_Int64 location )
throw( ::com::sun::star::lang::IllegalArgumentException, throw( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::io::IOException, ::com::sun::star::io::IOException,
...@@ -172,9 +142,6 @@ void SAL_CALL NeonInputStream::seek( sal_Int64 location ) ...@@ -172,9 +142,6 @@ void SAL_CALL NeonInputStream::seek( sal_Int64 location )
throw ::com::sun::star::lang::IllegalArgumentException(); throw ::com::sun::star::lang::IllegalArgumentException();
} }
// -------------------------------------------------------------------
// getPosition
// -------------------------------------------------------------------
sal_Int64 SAL_CALL NeonInputStream::getPosition() sal_Int64 SAL_CALL NeonInputStream::getPosition()
throw( ::com::sun::star::io::IOException, throw( ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException ) ::com::sun::star::uno::RuntimeException )
...@@ -182,9 +149,6 @@ sal_Int64 SAL_CALL NeonInputStream::getPosition() ...@@ -182,9 +149,6 @@ sal_Int64 SAL_CALL NeonInputStream::getPosition()
return mPos; return mPos;
} }
// -------------------------------------------------------------------
// getLength
// -------------------------------------------------------------------
sal_Int64 SAL_CALL NeonInputStream::getLength() sal_Int64 SAL_CALL NeonInputStream::getLength()
throw( ::com::sun::star::io::IOException, throw( ::com::sun::star::io::IOException,
::com::sun::star::uno::RuntimeException ) ::com::sun::star::uno::RuntimeException )
......
...@@ -38,11 +38,8 @@ ...@@ -38,11 +38,8 @@
namespace webdav_ucp namespace webdav_ucp
{ {
// -------------------------------------------------------------------
// NeonInputStream
// A simple XInputStream implementation provided specifically for use // A simple XInputStream implementation provided specifically for use
// by the DAVSession::GET method. // by the DAVSession::GET method.
// -------------------------------------------------------------------
class NeonInputStream : public ::com::sun::star::io::XInputStream, class NeonInputStream : public ::com::sun::star::io::XInputStream,
public ::com::sun::star::io::XSeekable, public ::com::sun::star::io::XSeekable,
public ::cppu::OWeakObject public ::cppu::OWeakObject
......
...@@ -60,7 +60,6 @@ private: ...@@ -60,7 +60,6 @@ private:
} // namespace webdav_ucp } // namespace webdav_ucp
// -------------------------------------------------------------------
void TickerThread::execute() void TickerThread::execute()
{ {
OSL_TRACE( "TickerThread: start." ); OSL_TRACE( "TickerThread: start." );
...@@ -86,14 +85,12 @@ void TickerThread::execute() ...@@ -86,14 +85,12 @@ void TickerThread::execute()
OSL_TRACE( "TickerThread: stop." ); OSL_TRACE( "TickerThread: stop." );
} }
// -------------------------------------------------------------------
NeonLockStore::NeonLockStore() NeonLockStore::NeonLockStore()
: m_pNeonLockStore( ne_lockstore_create() ) : m_pNeonLockStore( ne_lockstore_create() )
{ {
OSL_ENSURE( m_pNeonLockStore, "Unable to create neon lock store!" ); OSL_ENSURE( m_pNeonLockStore, "Unable to create neon lock store!" );
} }
// -------------------------------------------------------------------
NeonLockStore::~NeonLockStore() NeonLockStore::~NeonLockStore()
{ {
stopTicker(); stopTicker();
...@@ -118,7 +115,6 @@ NeonLockStore::~NeonLockStore() ...@@ -118,7 +115,6 @@ NeonLockStore::~NeonLockStore()
ne_lockstore_destroy( m_pNeonLockStore ); ne_lockstore_destroy( m_pNeonLockStore );
} }
// -------------------------------------------------------------------
void NeonLockStore::startTicker() void NeonLockStore::startTicker()
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -130,7 +126,6 @@ void NeonLockStore::startTicker() ...@@ -130,7 +126,6 @@ void NeonLockStore::startTicker()
} }
} }
// -------------------------------------------------------------------
void NeonLockStore::stopTicker() void NeonLockStore::stopTicker()
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -143,7 +138,6 @@ void NeonLockStore::stopTicker() ...@@ -143,7 +138,6 @@ void NeonLockStore::stopTicker()
} }
} }
// -------------------------------------------------------------------
void NeonLockStore::registerSession( HttpSession * pHttpSession ) void NeonLockStore::registerSession( HttpSession * pHttpSession )
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -151,7 +145,6 @@ void NeonLockStore::registerSession( HttpSession * pHttpSession ) ...@@ -151,7 +145,6 @@ void NeonLockStore::registerSession( HttpSession * pHttpSession )
ne_lockstore_register( m_pNeonLockStore, pHttpSession ); ne_lockstore_register( m_pNeonLockStore, pHttpSession );
} }
// -------------------------------------------------------------------
NeonLock * NeonLockStore::findByUri( rtl::OUString const & rUri ) NeonLock * NeonLockStore::findByUri( rtl::OUString const & rUri )
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -162,7 +155,6 @@ NeonLock * NeonLockStore::findByUri( rtl::OUString const & rUri ) ...@@ -162,7 +155,6 @@ NeonLock * NeonLockStore::findByUri( rtl::OUString const & rUri )
return ne_lockstore_findbyuri( m_pNeonLockStore, &aUri ); return ne_lockstore_findbyuri( m_pNeonLockStore, &aUri );
} }
// -------------------------------------------------------------------
void NeonLockStore::addLock( NeonLock * pLock, void NeonLockStore::addLock( NeonLock * pLock,
rtl::Reference< NeonSession > const & xSession, rtl::Reference< NeonSession > const & xSession,
sal_Int32 nLastChanceToSendRefreshRequest ) sal_Int32 nLastChanceToSendRefreshRequest )
...@@ -176,7 +168,6 @@ void NeonLockStore::addLock( NeonLock * pLock, ...@@ -176,7 +168,6 @@ void NeonLockStore::addLock( NeonLock * pLock,
startTicker(); startTicker();
} }
// -------------------------------------------------------------------
void NeonLockStore::updateLock( NeonLock * pLock, void NeonLockStore::updateLock( NeonLock * pLock,
sal_Int32 nLastChanceToSendRefreshRequest ) sal_Int32 nLastChanceToSendRefreshRequest )
{ {
...@@ -193,7 +184,6 @@ void NeonLockStore::updateLock( NeonLock * pLock, ...@@ -193,7 +184,6 @@ void NeonLockStore::updateLock( NeonLock * pLock,
} }
} }
// -------------------------------------------------------------------
void NeonLockStore::removeLock( NeonLock * pLock ) void NeonLockStore::removeLock( NeonLock * pLock )
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -205,7 +195,6 @@ void NeonLockStore::removeLock( NeonLock * pLock ) ...@@ -205,7 +195,6 @@ void NeonLockStore::removeLock( NeonLock * pLock )
stopTicker(); stopTicker();
} }
// -------------------------------------------------------------------
void NeonLockStore::refreshLocks() void NeonLockStore::refreshLocks()
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
......
...@@ -47,7 +47,6 @@ using ::rtl::OUString; ...@@ -47,7 +47,6 @@ using ::rtl::OUString;
using ::rtl::OString; using ::rtl::OString;
using ::rtl::OStringToOUString; using ::rtl::OStringToOUString;
// -------------------------------------------------------------------
namespace namespace
{ {
// strip "DAV:" namespace from XML snippets to avoid // strip "DAV:" namespace from XML snippets to avoid
...@@ -81,7 +80,6 @@ namespace ...@@ -81,7 +80,6 @@ namespace
} }
} }
// -------------------------------------------------------------------
extern "C" int NPFR_propfind_iter( void* userdata, extern "C" int NPFR_propfind_iter( void* userdata,
const NeonPropName* pname, const NeonPropName* pname,
const char* value, const char* value,
...@@ -190,7 +188,6 @@ extern "C" int NPFR_propfind_iter( void* userdata, ...@@ -190,7 +188,6 @@ extern "C" int NPFR_propfind_iter( void* userdata,
return 0; // Go on. return 0; // Go on.
} }
// -------------------------------------------------------------------
extern "C" void NPFR_propfind_results( void* userdata, extern "C" void NPFR_propfind_results( void* userdata,
const ne_uri* uri, const ne_uri* uri,
const NeonPropFindResultSet* set ) const NeonPropFindResultSet* set )
...@@ -207,7 +204,7 @@ extern "C" void NPFR_propfind_results( void* userdata, ...@@ -207,7 +204,7 @@ extern "C" void NPFR_propfind_results( void* userdata,
= static_cast< vector< DAVResource > * >( userdata ); = static_cast< vector< DAVResource > * >( userdata );
theResources->push_back( theResource ); theResources->push_back( theResource );
} }
// -------------------------------------------------------------------
extern "C" int NPFR_propnames_iter( void* userdata, extern "C" int NPFR_propnames_iter( void* userdata,
const NeonPropName* pname, const NeonPropName* pname,
const char* /*value*/, const char* /*value*/,
...@@ -223,7 +220,6 @@ extern "C" int NPFR_propnames_iter( void* userdata, ...@@ -223,7 +220,6 @@ extern "C" int NPFR_propnames_iter( void* userdata,
return 0; return 0;
} }
// -------------------------------------------------------------------
extern "C" void NPFR_propnames_results( void* userdata, extern "C" void NPFR_propnames_results( void* userdata,
const ne_uri* uri, const ne_uri* uri,
const NeonPropFindResultSet* results ) const NeonPropFindResultSet* results )
...@@ -244,10 +240,6 @@ extern "C" void NPFR_propnames_results( void* userdata, ...@@ -244,10 +240,6 @@ extern "C" void NPFR_propnames_results( void* userdata,
extern osl::Mutex aGlobalNeonMutex; extern osl::Mutex aGlobalNeonMutex;
// -------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------
NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession,
const char* inPath, const char* inPath,
const Depth inDepth, const Depth inDepth,
...@@ -303,11 +295,6 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, ...@@ -303,11 +295,6 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession,
nError = NE_ERROR; nError = NE_ERROR;
} }
// -------------------------------------------------------------------
// Constructor
// - obtains property names
// -------------------------------------------------------------------
NeonPropFindRequest::NeonPropFindRequest( NeonPropFindRequest::NeonPropFindRequest(
HttpSession* inSession, HttpSession* inSession,
const char* inPath, const char* inPath,
...@@ -329,9 +316,6 @@ NeonPropFindRequest::NeonPropFindRequest( ...@@ -329,9 +316,6 @@ NeonPropFindRequest::NeonPropFindRequest(
nError = NE_ERROR; nError = NE_ERROR;
} }
// -------------------------------------------------------------------
// Destructor
// -------------------------------------------------------------------
NeonPropFindRequest::~NeonPropFindRequest( ) NeonPropFindRequest::~NeonPropFindRequest( )
{ {
} }
......
...@@ -41,11 +41,7 @@ namespace ucbhelper { class ProxyDecider; } ...@@ -41,11 +41,7 @@ namespace ucbhelper { class ProxyDecider; }
namespace webdav_ucp namespace webdav_ucp
{ {
// -------------------------------------------------------------------
// NeonSession
// A DAVSession implementation using the neon/expat library // A DAVSession implementation using the neon/expat library
// -------------------------------------------------------------------
class NeonSession : public DAVSession class NeonSession : public DAVSession
{ {
private: private:
......
...@@ -79,10 +79,6 @@ const ne_uri g_sUriDefaultsFTP = { "ftp", ...@@ -79,10 +79,6 @@ const ne_uri g_sUriDefaultsFTP = { "ftp",
# pragma enable_warn # pragma enable_warn
#endif #endif
// -------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------
NeonUri::NeonUri( const ne_uri * inUri ) NeonUri::NeonUri( const ne_uri * inUri )
throw ( DAVException ) throw ( DAVException )
{ {
...@@ -164,9 +160,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) ...@@ -164,9 +160,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri )
} }
} }
// -------------------------------------------------------------------
// Destructor
// -------------------------------------------------------------------
NeonUri::~NeonUri( ) NeonUri::~NeonUri( )
{ {
} }
......
...@@ -39,10 +39,7 @@ namespace webdav_ucp ...@@ -39,10 +39,7 @@ namespace webdav_ucp
#define DEFAULT_HTTPS_PORT 443 #define DEFAULT_HTTPS_PORT 443
#define DEFAULT_FTP_PORT 21 #define DEFAULT_FTP_PORT 21
// -------------------------------------------------------------------
// NeonUri
// A URI implementation for use with the neon/expat library // A URI implementation for use with the neon/expat library
// -------------------------------------------------------------------
class NeonUri class NeonUri
{ {
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment