[Libreoffice-commits] .: automation/inc automation/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Sun Oct 10 22:21:55 PDT 2010


 automation/inc/automation/communi.hxx      |    6 +-
 automation/inc/automation/simplecm.hxx     |   18 +++---
 automation/source/communi/communi.cxx      |   33 ++++++------
 automation/source/server/server.cxx        |    3 -
 automation/source/simplecm/simplecm.cxx    |   77 +++++++++++++----------------
 automation/source/simplecm/tcpio.cxx       |    6 +-
 automation/source/simplecm/tcpio.hxx       |   12 ++--
 automation/source/testtool/httprequest.cxx |   16 ++----
 automation/source/testtool/httprequest.hxx |   10 +--
 9 files changed, 87 insertions(+), 94 deletions(-)

New commits:
commit 9844d74db3f40f966e8d70d5dc60c0ba8b6bd61a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Oct 11 00:10:31 2010 -0500

    merge vosremoval-socket patch

diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index cfbacf9..8fcbe47 100644
--- a/automation/inc/automation/communi.hxx
+++ b/automation/inc/automation/communi.hxx
@@ -79,7 +79,7 @@ public:
 class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread
 {
 public:
-    CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+    CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket );
     virtual ~CommunicationLinkViaSocket();
 
     virtual BOOL IsCommunicationError();
@@ -145,7 +145,7 @@ protected:
 
 private:
     CommunicationManagerServerViaSocket* pMyServer;
-    NAMESPACE_VOS(OAcceptorSocket) *pAcceptorSocket;
+    osl::AcceptorSocket* pAcceptorSocket;
     ULONG nPortToListen;
     USHORT nMaxConnections;
     ULONG nAddConnectionEventId;
@@ -174,7 +174,7 @@ private:
     ByteString aHostToTalk;
     ULONG nPortToTalk;
 protected:
-    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
+    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
 };
 
 #endif
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
index ee0f426..3c4c98c 100644
--- a/automation/inc/automation/simplecm.hxx
+++ b/automation/inc/automation/simplecm.hxx
@@ -30,7 +30,7 @@
 #include <tools/link.hxx>
 #include <tools/string.hxx>
 #include <tools/stream.hxx>
-#include <vos/socket.hxx>
+#include <osl/socket.hxx>
 #include <tools/debug.hxx>
 #include <tools/datetime.hxx>
 
@@ -337,19 +337,19 @@ private:
     ByteString aMyName;
 
     TCPIO* pTCPIO;
-    NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
+    osl::StreamSocket* pStreamSocket;
 
 protected:
-    SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+    SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket );
     virtual ~SimpleCommunicationLinkViaSocket();
 
-    NAMESPACE_VOS(OStreamSocket)* GetStreamSocket() { return pStreamSocket; }
-    void SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket );
+    osl::StreamSocket* GetStreamSocket() { return pStreamSocket; }
+    void SetStreamSocket( osl::StreamSocket* pSocket );
 
     SvStream *pReceiveStream;
     BOOL DoReceiveDataStream();				/// Recieve DataPacket from Socket
     virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL);
-    void SetFinalRecieveTimeout();
+    bool IsReceiveReady();
     BOOL bIsRequestShutdownPending;
     virtual void WaitForShutdown()=0;
     void SetNewPacketAsCurrent();
@@ -358,7 +358,7 @@ protected:
 class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket
 {
 public:
-    SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
+    SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket );
     ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks();
     virtual BOOL ReceiveDataStream();
 protected:
@@ -371,7 +371,7 @@ class CommonSocketFunctions
 public:
     BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort );
 protected:
-    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS )=0;
+    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0;
 };
 
 class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions
@@ -387,7 +387,7 @@ private:
     ByteString aHostToTalk;
     ULONG nPortToTalk;
 protected:
-    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
+    virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
 };
 
 #endif
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index 1d1dd10..c41c166 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -35,7 +35,7 @@
 #endif
 #include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
-#include <vos/socket.hxx>
+#include <osl/socket.hxx>
 #include <tools/stream.hxx>
 #include <vcl/timer.hxx>
 #include <tools/fsys.hxx>
@@ -68,7 +68,7 @@ SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* );
 
 NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL;		// Notwendig, da nicht threadfest
 
-CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket )
 : SimpleCommunicationLinkViaSocket( pMan, pSocket )
 , nConnectionClosedEventId( 0 )
 , nDataReceivedEventId( 0 )
@@ -132,7 +132,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
 
         join();
 
-        NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
+        osl::StreamSocket* pTempSocket = GetStreamSocket();
         SetStreamSocket( NULL );
         delete pTempSocket;
 
@@ -500,11 +500,11 @@ void CommunicationManagerServerAcceptThread::run()
     if ( !nPortToListen )
         return;
 
-    pAcceptorSocket = new NAMESPACE_VOS(OAcceptorSocket)();
-    NAMESPACE_VOS(OInetSocketAddr) Addr;
+    pAcceptorSocket = new osl::AcceptorSocket();
+    osl::SocketAddr Addr;
     Addr.setPort( nPortToListen );
-    pAcceptorSocket->setReuseAddr( 1 );
-    if ( !pAcceptorSocket->bind( Addr ) )
+    pAcceptorSocket->setOption( osl_Socket_OptionReuseAddr, 1 );
+     if ( !pAcceptorSocket->bind( Addr ) )
     {
         return;
     }
@@ -514,16 +514,16 @@ void CommunicationManagerServerAcceptThread::run()
     }
 
 
-    NAMESPACE_VOS(OStreamSocket) *pStreamSocket = NULL;
+    osl::StreamSocket* pStreamSocket = NULL;
 
     while ( schedule() )
     {
-        pStreamSocket = new NAMESPACE_VOS(OStreamSocket);
+        pStreamSocket = new osl::StreamSocket;
         switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) )
         {
-        case NAMESPACE_VOS(ISocketTypes::TResult_Ok):
+        case osl_Socket_Ok:
             {
-                pStreamSocket->setTcpNoDelay( 1 );
+                pStreamSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 );
 
                 TimeValue sNochEins = {0, 100};
                 while ( schedule() && xmNewConnection.Is() )	// Solange die letzte Connection nicht abgeholt wurde warten wir
@@ -537,18 +537,19 @@ void CommunicationManagerServerAcceptThread::run()
                 }
             }
             break;
-        case NAMESPACE_VOS(ISocketTypes::TResult_TimedOut):
+        case osl_Socket_TimedOut:
             delete pStreamSocket;
             pStreamSocket = NULL;
             break;
-        case NAMESPACE_VOS(ISocketTypes::TResult_Error):
+        case osl_Socket_Error:
             delete pStreamSocket;
             pStreamSocket = NULL;
             break;
 
-        case NAMESPACE_VOS(ISocketTypes::TResult_Interrupted):
-        case NAMESPACE_VOS(ISocketTypes::TResult_InProgress):
-            break;  // -Wall not handled...
+        case osl_Socket_Interrupted:
+        case osl_Socket_InProgress:
+        default:
+            break;
         }
     }
 }
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index bc6fa21..85d3fe5 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -40,13 +40,12 @@
 #include <vcl/wrkwin.hxx>
 #include <osl/diagnose.h>
 #include <osl/mutex.hxx>
+#include <osl/socket.hxx>
 
 #include <vcl/dialog.hxx>
 #include <tools/stream.hxx>
 #include <tools/config.hxx>
 
-#include <vos/socket.hxx>
-
 #if 1
 #include <svtools/ttprops.hxx>
 #include <basic/ttstrhlp.hxx>
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index 002b0a7..9636a7b 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -136,7 +136,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp )
 }
 
 
-SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket )
 : CommunicationLink( pMan )
 , aCommunicationPartner()
 , aMyName()
@@ -158,7 +158,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket()
     pStreamSocket = NULL;
 }
 
-void SimpleCommunicationLinkViaSocket::SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket )
+void SimpleCommunicationLinkViaSocket::SetStreamSocket( osl::StreamSocket* pSocket )
 {
     if ( pTCPIO )
         pTCPIO->SetStreamSocket( pSocket );
@@ -179,15 +179,6 @@ BOOL SimpleCommunicationLinkViaSocket::StopCommunication()
     return TRUE;
 }
 
-void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout()
-{
-    if ( !IsCommunicationError() )
-    {
-        TimeValue aTime = {30, 0};   // 30 seconds
-        pStreamSocket->setRecvTimeout( &aTime );
-    }
-}
-
 BOOL SimpleCommunicationLinkViaSocket::IsCommunicationError()
 {
     return !pStreamSocket;
@@ -202,9 +193,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
             case CM_DOTTED:
                 {
                     rtl::OUString aDotted;
-                    NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
+                    osl::SocketAddr* pPeerAdr = new osl::SocketAddr;
                     pStreamSocket->getPeerAddr( *pPeerAdr );
-                    ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
+                    osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData);
                     delete pPeerAdr;
                     return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
                 }
@@ -213,8 +204,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
                 {
                     if ( !aCommunicationPartner.Len() )
                     {
-                        rtl::OUString aFQDN;
-                        pStreamSocket->getPeerHost( aFQDN );
+                        rtl::OUString aFQDN( pStreamSocket->getPeerHost());
                         aCommunicationPartner = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 );
                     }
                     return aCommunicationPartner;
@@ -234,9 +224,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
             case CM_DOTTED:
                 {
                     rtl::OUString aDotted;
-                    NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
-                    pStreamSocket->getLocalAddr( *pPeerAdr );
-                    ((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
+                    osl::SocketAddr* pPeerAdr = new osl::SocketAddr;
+                    pStreamSocket->getPeerAddr( *pPeerAdr );
+                    osl_getDottedInetAddrOfSocketAddr( pPeerAdr->getHandle(), &aDotted.pData);
                     delete pPeerAdr;
                     return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
                 }
@@ -245,8 +235,7 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
                 {
                     if ( !aMyName.Len() )
                     {
-                        rtl::OUString aFQDN;
-                        pStreamSocket->getLocalHost( aFQDN );
+                        rtl::OUString aFQDN(pStreamSocket->getLocalHost());
                         aMyName = ByteString( UniString(aFQDN), RTL_TEXTENCODING_UTF8 );
                     }
                     return aMyName;
@@ -352,7 +341,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy
     return !bWasError;
 }
 
-SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
+SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket )
 : SimpleCommunicationLinkViaSocket( pMan, pSocket )
 {
 }
@@ -363,11 +352,22 @@ SimpleCommunicationLinkViaSocketWithReceiveCallbacks::~SimpleCommunicationLinkVi
         StopCommunication();
 }
 
+bool SimpleCommunicationLinkViaSocket::IsReceiveReady()
+{
+    if ( !IsCommunicationError() )
+    {
+        TimeValue aTime = {30, 0};   // 30 seconds
+        return pStreamSocket->isRecvReady( &aTime );
+    }
+
+    return false;
+}
+
 void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown()
 {
     CommunicationLinkRef rHold(this);		// avoid deleting this link before the end of the method
-    SetFinalRecieveTimeout();
-    while ( pMyManager && !IsCommunicationError() )
+
+    while( pMyManager && !IsCommunicationError() && IsReceiveReady())
         ReceiveDataStream();
 }
 
@@ -396,7 +396,7 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication
     if ( GetStreamSocket() )
         GetStreamSocket()->close();
 
-    NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
+    osl::StreamSocket* pTempSocket = GetStreamSocket();
     SetStreamSocket( NULL );
     delete pTempSocket;
 
@@ -422,22 +422,21 @@ CommunicationManager::~CommunicationManager()
 
 BOOL CommunicationManager::StartCommunication( String aApp, String aParams )
 {
-    (void) aApp; /* avoid warning about unused parameter */ 
-    (void) aParams; /* avoid warning about unused parameter */ 
+    (void) aApp; /* avoid warning about unused parameter */
+    (void) aParams; /* avoid warning about unused parameter */
     return FALSE;
 }
 
 BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort )
 {
-    (void) aHost; /* avoid warning about unused parameter */ 
-    (void) nPort; /* avoid warning about unused parameter */ 
+    (void) aHost; /* avoid warning about unused parameter */
+    (void) nPort; /* avoid warning about unused parameter */
     return FALSE;
 }
 
 ByteString CommunicationManager::GetMyName( CM_NameType )
 {
-    rtl::OUString aHostname;
-    NAMESPACE_VOS(OSocketAddr)::getLocalHostname( aHostname );
+    rtl::OUString aHostname( osl::SocketAddr::getLocalHostname());
     return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 );
 }
 
@@ -672,23 +671,20 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
 
 BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort )
 {
-    NAMESPACE_VOS(OInetSocketAddr) Addr;
-    NAMESPACE_VOS(OConnectorSocket) *pConnSocket;
+    osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort );
+    osl::ConnectorSocket *pConnSocket;
 
-    Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) );
-    Addr.setPort( nPort );
 
     TimeValue aTV;
     aTV.Seconds = 10;		// Warte 10 Sekunden
     aTV.Nanosec = 0;
     do
     {
-        pConnSocket = new NAMESPACE_VOS(OConnectorSocket)();
-        pConnSocket->setTcpNoDelay( 1 );
-        if ( pConnSocket->connect( Addr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
+        pConnSocket = new osl::ConnectorSocket();
+        pConnSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 );
+        if ( pConnSocket->connect( Addr, &aTV ) == osl_Socket_Ok )
         {
-            pConnSocket->setTcpNoDelay( 1 );
-
+            pConnSocket->setOption( osl_Socket_OptionTcpNoDelay, 1 );
             pCM->CallConnectionOpened( CreateCommunicationLink( pCM, pConnSocket ) );
             return TRUE;
         }
@@ -699,4 +695,3 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo
 
     return FALSE;
 }
-
diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx
index c37c807..7cf5088 100644
--- a/automation/source/simplecm/tcpio.cxx
+++ b/automation/source/simplecm/tcpio.cxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -63,9 +63,9 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen )
 
 
 // helper
-void TCPIO::SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket )
+void TCPIO::SetStreamSocket( osl::StreamSocket* pSocket )
 {
     vos::OGuard aRGuard( aMSocketReadAccess );
     vos::OGuard aWGuard( aMSocketWriteAccess );
-    pStreamSocket = pSocket;    
+    pStreamSocket = pSocket;
 }
diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx
index 9884f34..c5a3e5c 100644
--- a/automation/source/simplecm/tcpio.hxx
+++ b/automation/source/simplecm/tcpio.hxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,7 @@
 #ifndef TCPIO_HXX
 #define TCPIO_HXX
 
-#include <vos/socket.hxx>
+#include <osl/socket.hxx>
 #include <vos/mutex.hxx>
 
 #include "communiio.hxx"
@@ -36,17 +36,17 @@
 class TCPIO : public ITransmiter, public IReceiver
 {
 private:
-    NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
+    osl::StreamSocket* pStreamSocket;
     vos::OMutex aMSocketReadAccess;
     vos::OMutex aMSocketWriteAccess;
 
 public:
 
     ///
-    TCPIO( NAMESPACE_VOS(OStreamSocket) *pSocket ):pStreamSocket( pSocket ){}
+    TCPIO( osl::StreamSocket* pSocket ):pStreamSocket( pSocket ){}
     virtual ~TCPIO(){}
 
-    
+
     /// implement ITransmiter
     virtual comm_USHORT TransferBytes( const void* pBuffer, comm_UINT32 nLen );
 
@@ -54,7 +54,7 @@ public:
     virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen );
 
     // helper
-    void SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket );
+    void SetStreamSocket( osl::StreamSocket* pSocket );
 
 };
 
diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx
index 9061c08..4a6e5de 100644
--- a/automation/source/testtool/httprequest.cxx
+++ b/automation/source/testtool/httprequest.cxx
@@ -30,7 +30,7 @@
 
 #include <stdio.h>
 #include "httprequest.hxx"
-#include <vos/socket.hxx>
+#include <osl/socket.hxx>
 #include <tools/debug.hxx>
 
 
@@ -78,25 +78,23 @@ BOOL HttpRequest::Execute()
     Init();
 
     // Open channel to standard redir host
-    NAMESPACE_VOS(OInetSocketAddr) aConnectAddr;
+    osl::SocketAddr aConnectAddr;
 
     if ( aProxyHost.Len() )
     {
-        aConnectAddr.setAddr( rtl::OUString( UniString( aProxyHost, RTL_TEXTENCODING_UTF8 ) ) );
-        aConnectAddr.setPort( nProxyPort );
+        aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aProxyHost, RTL_TEXTENCODING_UTF8 ) ), nProxyPort );
     }
     else
     {
-        aConnectAddr.setAddr( rtl::OUString( UniString( aRequestHost, RTL_TEXTENCODING_UTF8 ) ) );
-        aConnectAddr.setPort( nRequestPort );
+        aConnectAddr = osl::SocketAddr( rtl::OUString( UniString( aRequestHost, RTL_TEXTENCODING_UTF8 ) ), nRequestPort );
     }
 
     TimeValue aTV;
     aTV.Seconds = 10;		// Warte 10 Sekunden
     aTV.Nanosec = 0;
 
-    pOutSocket = new NAMESPACE_VOS(OConnectorSocket)();
-    if ( pOutSocket->connect( aConnectAddr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
+    pOutSocket = new osl::ConnectorSocket();
+    if ( pOutSocket->connect( aConnectAddr, &aTV ) == osl_Socket_Ok )
     {
 //		pOutSocket->setTcpNoDelay( 1 );
     }
@@ -202,7 +200,7 @@ Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0; Linux
 Connection: close
 Content-Type: text/xml; charset=ISO-8859-1
   */
-void HttpRequest::SendString( vos::OStreamSocket* pSocket , ByteString aText )
+void HttpRequest::SendString( osl::StreamSocket* pSocket , ByteString aText )
 {
     if ( nStatus == HTTP_REQUEST_PENDING )
         pSocket->write( aText.GetBuffer(), aText.Len() );
diff --git a/automation/source/testtool/httprequest.hxx b/automation/source/testtool/httprequest.hxx
index f902246..7cbf41b 100644
--- a/automation/source/testtool/httprequest.hxx
+++ b/automation/source/testtool/httprequest.hxx
@@ -37,10 +37,10 @@
 #include <tools/string.hxx>
 #include <tools/stream.hxx>
 
-namespace vos
+namespace osl
 {
-    class OStreamSocket;
-    class OConnectorSocket;
+    class StreamSocket;
+    class ConnectorSocket;
 }
 
 class HttpRequest
@@ -52,14 +52,14 @@ class HttpRequest
     USHORT nProxyPort;
 
     USHORT nStatus;
-    vos::OConnectorSocket *pOutSocket;
+    osl::ConnectorSocket *pOutSocket;
 
     ByteString aHeader;
     USHORT nResultId;
     ByteString aContentType;
     SvMemoryStream* pStream;
 
-    void SendString( vos::OStreamSocket* pSocket, ByteString aText );
+    void SendString( osl::StreamSocket* pSocket, ByteString aText );
     BOOL IsItem( ByteString aItem, ByteString aLine );
     void Init();
 public:


More information about the Libreoffice-commits mailing list