CWS-TOOLING: integrate CWS codecleanup02
This commit is contained in:
@@ -76,10 +76,10 @@ public:
|
||||
CommunicationManagerClient( BOOL bUseMultiChannel = FALSE );
|
||||
};
|
||||
|
||||
class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public NAMESPACE_VOS(OThread)
|
||||
class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public vos::OThread
|
||||
{
|
||||
public:
|
||||
CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
|
||||
virtual ~CommunicationLinkViaSocket();
|
||||
|
||||
virtual BOOL IsCommunicationError();
|
||||
@@ -101,8 +101,8 @@ protected:
|
||||
virtual BOOL ShutdownCommunication();
|
||||
ULONG nConnectionClosedEventId;
|
||||
ULONG nDataReceivedEventId;
|
||||
NAMESPACE_VOS(OMutex) aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
NAMESPACE_VOS(OMutex) aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
virtual void WaitForShutdown();
|
||||
|
||||
DECL_LINK( ShutdownLink, void* );
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
void AddConnection( CommunicationLink *pNewConnection );
|
||||
};
|
||||
|
||||
class CommunicationManagerServerAcceptThread: public NAMESPACE_VOS(OThread)
|
||||
class CommunicationManagerServerAcceptThread: public vos::OThread
|
||||
{
|
||||
public:
|
||||
CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS );
|
||||
@@ -145,11 +145,11 @@ protected:
|
||||
|
||||
private:
|
||||
CommunicationManagerServerViaSocket* pMyServer;
|
||||
NAMESPACE_VOS(OAcceptorSocket) *pAcceptorSocket;
|
||||
vos::OAcceptorSocket *pAcceptorSocket;
|
||||
ULONG nPortToListen;
|
||||
USHORT nMaxConnections;
|
||||
ULONG nAddConnectionEventId;
|
||||
NAMESPACE_VOS(OMutex) aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
|
||||
CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
|
||||
|
||||
@@ -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, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -337,14 +337,14 @@ private:
|
||||
ByteString aMyName;
|
||||
|
||||
TCPIO* pTCPIO;
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
|
||||
vos::OStreamSocket *pStreamSocket;
|
||||
|
||||
protected:
|
||||
SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
|
||||
virtual ~SimpleCommunicationLinkViaSocket();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket)* GetStreamSocket() { return pStreamSocket; }
|
||||
void SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket );
|
||||
vos::OStreamSocket* GetStreamSocket() { return pStreamSocket; }
|
||||
void SetStreamSocket( vos::OStreamSocket* pSocket );
|
||||
|
||||
SvStream *pReceiveStream;
|
||||
BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket
|
||||
@@ -358,7 +358,7 @@ protected:
|
||||
class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket
|
||||
{
|
||||
public:
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *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, vos::OConnectorSocket *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, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -66,9 +66,9 @@ _SV_SEEK_PTR( nm, AE )
|
||||
|
||||
SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* );
|
||||
|
||||
NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
|
||||
vos::OMutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
|
||||
|
||||
CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
|
||||
, nConnectionClosedEventId( 0 )
|
||||
, nDataReceivedEventId( 0 )
|
||||
@@ -77,7 +77,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM
|
||||
{
|
||||
SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl ));
|
||||
if ( !pMPostUserEvent )
|
||||
pMPostUserEvent = new NAMESPACE_VOS(OMutex);
|
||||
pMPostUserEvent = new vos::OMutex;
|
||||
// this is necassary to prevent the running thread from sending the close event
|
||||
// before the open event has been sent.
|
||||
StartCallback();
|
||||
@@ -92,7 +92,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
|
||||
while ( nConnectionClosedEventId || nDataReceivedEventId )
|
||||
GetpApp()->Yield();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
if ( nConnectionClosedEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nConnectionClosedEventId );
|
||||
@@ -103,7 +103,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
|
||||
}
|
||||
}
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
if ( nDataReceivedEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nDataReceivedEventId );
|
||||
@@ -132,7 +132,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
|
||||
|
||||
join();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
|
||||
vos::OStreamSocket *pTempSocket = GetStreamSocket();
|
||||
SetStreamSocket( NULL );
|
||||
delete pTempSocket;
|
||||
|
||||
@@ -209,8 +209,8 @@ void CommunicationLinkViaSocket::run()
|
||||
SetNewPacketAsCurrent();
|
||||
StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
mlPutDataReceived.Call(this);
|
||||
}
|
||||
}
|
||||
@@ -220,8 +220,8 @@ void CommunicationLinkViaSocket::run()
|
||||
|
||||
StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) );
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CM
|
||||
long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
nConnectionClosedEventId = 0; // Achtung!! alles andere mu<6D> oben gemacht werden.
|
||||
}
|
||||
ShutdownCommunication();
|
||||
@@ -249,7 +249,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
|
||||
long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
nDataReceivedEventId = 0; // Achtung!! alles andere mu<6D> oben gemacht werden.
|
||||
}
|
||||
return CommunicationLink::DataReceived( );
|
||||
@@ -453,7 +453,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread(
|
||||
, xmNewConnection( NULL )
|
||||
{
|
||||
if ( !pMPostUserEvent )
|
||||
pMPostUserEvent = new NAMESPACE_VOS(OMutex);
|
||||
pMPostUserEvent = new vos::OMutex;
|
||||
create();
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
|
||||
DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread <20>bersprungen!!!! (wegen Solaris BUG)\n");
|
||||
#endif
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
if ( nAddConnectionEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nAddConnectionEventId );
|
||||
@@ -500,8 +500,8 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
if ( !nPortToListen )
|
||||
return;
|
||||
|
||||
pAcceptorSocket = new NAMESPACE_VOS(OAcceptorSocket)();
|
||||
NAMESPACE_VOS(OInetSocketAddr) Addr;
|
||||
pAcceptorSocket = new vos::OAcceptorSocket();
|
||||
vos::OInetSocketAddr Addr;
|
||||
Addr.setPort( nPortToListen );
|
||||
pAcceptorSocket->setReuseAddr( 1 );
|
||||
if ( !pAcceptorSocket->bind( Addr ) )
|
||||
@@ -514,14 +514,14 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
}
|
||||
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket = NULL;
|
||||
vos::OStreamSocket *pStreamSocket = NULL;
|
||||
|
||||
while ( schedule() )
|
||||
{
|
||||
pStreamSocket = new NAMESPACE_VOS(OStreamSocket);
|
||||
pStreamSocket = new vos::OStreamSocket;
|
||||
switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) )
|
||||
{
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Ok):
|
||||
case vos::ISocketTypes::TResult_Ok:
|
||||
{
|
||||
pStreamSocket->setTcpNoDelay( 1 );
|
||||
|
||||
@@ -531,23 +531,23 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket );
|
||||
xmNewConnection->StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_TimedOut):
|
||||
case vos::ISocketTypes::TResult_TimedOut:
|
||||
delete pStreamSocket;
|
||||
pStreamSocket = NULL;
|
||||
break;
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Error):
|
||||
case vos::ISocketTypes::TResult_Error:
|
||||
delete pStreamSocket;
|
||||
pStreamSocket = NULL;
|
||||
break;
|
||||
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Interrupted):
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_InProgress):
|
||||
case vos::ISocketTypes::TResult_Interrupted:
|
||||
case vos::ISocketTypes::TResult_InProgress:
|
||||
break; // -Wall not handled...
|
||||
}
|
||||
}
|
||||
@@ -557,7 +557,7 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
nAddConnectionEventId = 0;
|
||||
}
|
||||
pMyServer->AddConnection( xmNewConnection );
|
||||
|
@@ -3083,13 +3083,6 @@ BOOL StatementCommand::Execute()
|
||||
nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY;
|
||||
|
||||
// Nur diese Bitmaske ist unter Windows erlaubt
|
||||
#ifdef WIN
|
||||
if( nFlags & ~0x1E )
|
||||
{
|
||||
nDirFlags = 0;
|
||||
StarBASIC::Error( SbERR_BAD_ARGUMENT );
|
||||
}
|
||||
#endif
|
||||
// Sb_ATTR_VOLUME wird getrennt gehandelt
|
||||
if( nDirFlags & Sb_ATTR_VOLUME )
|
||||
aPath = aEntry.GetVolume();
|
||||
@@ -3121,31 +3114,7 @@ BOOL StatementCommand::Execute()
|
||||
}
|
||||
DirEntry aNextEntry=(*(pDir))[nDirPos++];
|
||||
aPath = aNextEntry.GetName(); //Full();
|
||||
#ifdef WIN
|
||||
aNextEntry.ToAbs();
|
||||
String sFull(aNextEntry.GetFull());
|
||||
unsigned nFlags;
|
||||
|
||||
if (_dos_getfileattr( sFull.GetStr(), &nFlags ))
|
||||
nErrorcode = FSYS_ERR_NOTEXISTS;
|
||||
else
|
||||
{
|
||||
INT16 nCurFlags = nDirFlags;
|
||||
if( (nCurFlags == Sb_ATTR_NORMAL)
|
||||
&& !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) )
|
||||
break;
|
||||
}
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if ( !nErrorcode )
|
||||
|
@@ -136,7 +136,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp )
|
||||
}
|
||||
|
||||
|
||||
SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: CommunicationLink( pMan )
|
||||
, aCommunicationPartner()
|
||||
, aMyName()
|
||||
@@ -158,7 +158,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket()
|
||||
pStreamSocket = NULL;
|
||||
}
|
||||
|
||||
void SimpleCommunicationLinkViaSocket::SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket )
|
||||
void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSocket )
|
||||
{
|
||||
if ( pTCPIO )
|
||||
pTCPIO->SetStreamSocket( pSocket );
|
||||
@@ -202,9 +202,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
|
||||
case CM_DOTTED:
|
||||
{
|
||||
rtl::OUString aDotted;
|
||||
NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
|
||||
vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
|
||||
pStreamSocket->getPeerAddr( *pPeerAdr );
|
||||
((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
|
||||
((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
|
||||
delete pPeerAdr;
|
||||
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
@@ -234,9 +234,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
|
||||
case CM_DOTTED:
|
||||
{
|
||||
rtl::OUString aDotted;
|
||||
NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
|
||||
vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
|
||||
pStreamSocket->getLocalAddr( *pPeerAdr );
|
||||
((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
|
||||
((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
|
||||
delete pPeerAdr;
|
||||
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
@@ -352,7 +352,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy
|
||||
return !bWasError;
|
||||
}
|
||||
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
|
||||
{
|
||||
}
|
||||
@@ -396,7 +396,7 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication
|
||||
if ( GetStreamSocket() )
|
||||
GetStreamSocket()->close();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
|
||||
vos::OStreamSocket *pTempSocket = GetStreamSocket();
|
||||
SetStreamSocket( NULL );
|
||||
delete pTempSocket;
|
||||
|
||||
@@ -437,7 +437,7 @@ BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort )
|
||||
ByteString CommunicationManager::GetMyName( CM_NameType )
|
||||
{
|
||||
rtl::OUString aHostname;
|
||||
NAMESPACE_VOS(OSocketAddr)::getLocalHostname( aHostname );
|
||||
vos::OSocketAddr::getLocalHostname( aHostname );
|
||||
return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
|
||||
@@ -672,8 +672,8 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
|
||||
|
||||
BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort )
|
||||
{
|
||||
NAMESPACE_VOS(OInetSocketAddr) Addr;
|
||||
NAMESPACE_VOS(OConnectorSocket) *pConnSocket;
|
||||
vos::OInetSocketAddr Addr;
|
||||
vos::OConnectorSocket *pConnSocket;
|
||||
|
||||
Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) );
|
||||
Addr.setPort( nPort );
|
||||
@@ -683,9 +683,9 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo
|
||||
aTV.Nanosec = 0;
|
||||
do
|
||||
{
|
||||
pConnSocket = new NAMESPACE_VOS(OConnectorSocket)();
|
||||
pConnSocket = new vos::OConnectorSocket();
|
||||
pConnSocket->setTcpNoDelay( 1 );
|
||||
if ( pConnSocket->connect( Addr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
|
||||
if ( pConnSocket->connect( Addr, &aTV ) == vos::ISocketTypes::TResult_Ok )
|
||||
{
|
||||
pConnSocket->setTcpNoDelay( 1 );
|
||||
|
||||
|
@@ -63,7 +63,7 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen )
|
||||
|
||||
|
||||
// helper
|
||||
void TCPIO::SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
void TCPIO::SetStreamSocket( vos::OStreamSocket *pSocket )
|
||||
{
|
||||
vos::OGuard aRGuard( aMSocketReadAccess );
|
||||
vos::OGuard aWGuard( aMSocketWriteAccess );
|
||||
|
@@ -36,14 +36,14 @@
|
||||
class TCPIO : public ITransmiter, public IReceiver
|
||||
{
|
||||
private:
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
|
||||
vos::OStreamSocket *pStreamSocket;
|
||||
vos::OMutex aMSocketReadAccess;
|
||||
vos::OMutex aMSocketWriteAccess;
|
||||
|
||||
public:
|
||||
|
||||
///
|
||||
TCPIO( NAMESPACE_VOS(OStreamSocket) *pSocket ):pStreamSocket( pSocket ){}
|
||||
TCPIO( vos::OStreamSocket *pSocket ):pStreamSocket( pSocket ){}
|
||||
virtual ~TCPIO(){}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen );
|
||||
|
||||
// helper
|
||||
void SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
void SetStreamSocket( vos::OStreamSocket *pSocket );
|
||||
|
||||
};
|
||||
|
||||
|
@@ -78,7 +78,7 @@ BOOL HttpRequest::Execute()
|
||||
Init();
|
||||
|
||||
// Open channel to standard redir host
|
||||
NAMESPACE_VOS(OInetSocketAddr) aConnectAddr;
|
||||
vos::OInetSocketAddr aConnectAddr;
|
||||
|
||||
if ( aProxyHost.Len() )
|
||||
{
|
||||
@@ -95,8 +95,8 @@ BOOL HttpRequest::Execute()
|
||||
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 vos::OConnectorSocket();
|
||||
if ( pOutSocket->connect( aConnectAddr, &aTV ) == vos::ISocketTypes::TResult_Ok )
|
||||
{
|
||||
// pOutSocket->setTcpNoDelay( 1 );
|
||||
}
|
||||
|
@@ -91,9 +91,7 @@ using namespace ::com::sun::star::io;
|
||||
using namespace ::com::sun::star::resource;
|
||||
using namespace ::com::sun::star::ui::dialogs;
|
||||
|
||||
#if defined(MAC)
|
||||
#define FILTERMASK_ALL "****"
|
||||
#elif defined(OW) || defined(MTF)
|
||||
#if defined(UNX)
|
||||
#define FILTERMASK_ALL "*"
|
||||
#elif defined(PM2)
|
||||
#define FILTERMASK_ALL ""
|
||||
|
@@ -959,7 +959,7 @@ void TPGalleryThemeProperties::FillFilterList()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(WIN) || defined(WNT)
|
||||
#if defined(WNT)
|
||||
if ( aExtensions.Len() > 240 )
|
||||
aExtensions = DEFINE_CONST_UNICODE( "*.*" );
|
||||
#endif
|
||||
|
@@ -279,7 +279,7 @@ void LdapConnection::loadModule()
|
||||
{
|
||||
if ( !s_Ldap_Module )
|
||||
{
|
||||
#if defined(WIN) || defined(WNT)
|
||||
#if defined(WNT)
|
||||
# define LIBLDAP "nsldap32v50.dll"
|
||||
#else
|
||||
# ifdef WITH_OPENLDAP
|
||||
|
@@ -90,10 +90,10 @@ protected:
|
||||
int m_nSocket;
|
||||
|
||||
std::vector<MediatorMessage*> m_aMessageQueue;
|
||||
NAMESPACE_VOS(OMutex) m_aQueueMutex;
|
||||
NAMESPACE_VOS(OMutex) m_aSendMutex;
|
||||
vos::OMutex m_aQueueMutex;
|
||||
vos::OMutex m_aSendMutex;
|
||||
// only one thread can send a message at any given time
|
||||
NAMESPACE_VOS(OCondition) m_aNewMessageCdtn;
|
||||
vos::OCondition m_aNewMessageCdtn;
|
||||
MediatorListener* m_pListener;
|
||||
// thread to fill the queue
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class MediatorListener : public NAMESPACE_VOS( OThread )
|
||||
class MediatorListener : public vos:: OThread
|
||||
{
|
||||
friend class Mediator;
|
||||
private:
|
||||
|
@@ -166,7 +166,7 @@ public:
|
||||
class PluginConnector : public Mediator
|
||||
{
|
||||
protected:
|
||||
NAMESPACE_VOS(OMutex) m_aUserEventMutex;
|
||||
vos::OMutex m_aUserEventMutex;
|
||||
|
||||
static std::vector<PluginConnector*> allConnectors;
|
||||
|
||||
|
@@ -80,7 +80,7 @@ ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID
|
||||
if( ! m_pListener )
|
||||
return 0;
|
||||
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aSendMutex );
|
||||
vos::OGuard aGuard( m_aSendMutex );
|
||||
if( ! nMessageID )
|
||||
nMessageID = m_nCurrentID;
|
||||
|
||||
@@ -132,7 +132,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID )
|
||||
while( m_pListener )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
|
||||
vos::OGuard aGuard( m_aQueueMutex );
|
||||
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
|
||||
{
|
||||
MediatorMessage* pMessage = m_aMessageQueue[ i ];
|
||||
@@ -157,7 +157,7 @@ MediatorMessage* Mediator::GetNextMessage( BOOL bWait )
|
||||
{
|
||||
// guard must be after WaitForMessage, else the listener
|
||||
// cannot insert a new one -> deadlock
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
|
||||
vos::OGuard aGuard( m_aQueueMutex );
|
||||
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
|
||||
{
|
||||
MediatorMessage* pMessage = m_aMessageQueue[ i ];
|
||||
@@ -207,7 +207,7 @@ void MediatorListener::run()
|
||||
{
|
||||
::vos::OGuard aMyGuard( m_aMutex );
|
||||
{
|
||||
NAMESPACE_VOS(OGuard)
|
||||
vos::OGuard
|
||||
aGuard( m_pMediator->m_aQueueMutex );
|
||||
MediatorMessage* pMessage =
|
||||
new MediatorMessage( nHeader[ 0 ], nHeader[ 1 ], pBuffer );
|
||||
|
@@ -27,7 +27,7 @@ PluginConnector::PluginConnector( int nSocket ) :
|
||||
|
||||
PluginConnector::~PluginConnector()
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
|
||||
vos::OGuard aGuard( m_aUserEventMutex );
|
||||
for( std::vector< PluginConnector* >::iterator it = allConnectors.begin();
|
||||
it != allConnectors.end(); ++it )
|
||||
{
|
||||
@@ -41,7 +41,7 @@ PluginConnector::~PluginConnector()
|
||||
|
||||
IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
|
||||
vos::OGuard aGuard( m_aUserEventMutex );
|
||||
bool bFound = false;
|
||||
for( std::vector< PluginConnector* >::iterator it = allConnectors.begin();
|
||||
it != allConnectors.end() && bFound == false; ++it )
|
||||
@@ -68,7 +68,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
|
||||
return 0;
|
||||
/*
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex );
|
||||
vos::OGuard aGuard( m_aUserEventMutex );
|
||||
m_aUserEventIDs.pop_front();
|
||||
}
|
||||
*/
|
||||
|
@@ -172,7 +172,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID )
|
||||
while( m_pListener )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex );
|
||||
vos::OGuard aGuard( m_aQueueMutex );
|
||||
for( size_t i = 0; i < m_aMessageQueue.size(); i++ )
|
||||
{
|
||||
MediatorMessage* pMessage = m_aMessageQueue[ i ];
|
||||
|
@@ -74,10 +74,7 @@ using namespace ::com::sun::star;
|
||||
#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.)
|
||||
#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5))
|
||||
|
||||
#if defined WIN
|
||||
#define TWAIN_LIBNAME "TWAIN.DLL"
|
||||
#define TWAIN_FUNCNAME "DSM_Entry"
|
||||
#elif defined WNT
|
||||
#if defined WNT
|
||||
#define TWAIN_LIBNAME "TWAIN_32.DLL"
|
||||
#define TWAIN_FUNCNAME "DSM_Entry"
|
||||
#endif
|
||||
@@ -109,7 +106,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener >
|
||||
TW_IDENTITY aSrcIdent;
|
||||
Link aNotifyLink;
|
||||
DSMENTRYPROC pDSM;
|
||||
NAMESPACE_VOS( OModule )* pMod;
|
||||
vos:: OModule * pMod;
|
||||
ULONG nCurState;
|
||||
HWND hTwainWnd;
|
||||
HHOOK hTwainHook;
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#if defined( WNT ) || defined (WIN)
|
||||
#if defined( WNT )
|
||||
#include <tools/svwin.h>
|
||||
#endif
|
||||
#ifdef OS2
|
||||
@@ -52,10 +52,7 @@
|
||||
#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.)
|
||||
#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5))
|
||||
|
||||
#if defined WIN
|
||||
#define TWAIN_LIBNAME "TWAIN.DLL"
|
||||
#define TWAIN_FUNCNAME "DSM_Entry"
|
||||
#elif defined WNT
|
||||
#if defined WNT
|
||||
#define TWAIN_LIBNAME "TWAIN_32.DLL"
|
||||
#define TWAIN_FUNCNAME "DSM_Entry"
|
||||
#elif defined OS2
|
||||
@@ -242,7 +239,7 @@ void ImpTwain::ImplOpenSourceManager()
|
||||
{
|
||||
if( 1 == nCurState )
|
||||
{
|
||||
pMod = new NAMESPACE_VOS( OModule )();
|
||||
pMod = new vos:: OModule ();
|
||||
|
||||
if( pMod->load( TWAIN_LIBNAME ) )
|
||||
{
|
||||
|
@@ -57,7 +57,7 @@ class ImpTwain
|
||||
Link aNotifyLink;
|
||||
Bitmap aBitmap;
|
||||
DSMENTRYPROC pDSM;
|
||||
NAMESPACE_VOS( OModule )* pMod;
|
||||
vos:: OModule * pMod;
|
||||
ULONG nCurState;
|
||||
|
||||
void ImplCreate();
|
||||
|
@@ -53,10 +53,8 @@
|
||||
|
||||
#include "testfactreg.hxx"
|
||||
|
||||
#ifndef _VOS_NO_NAMESPACE
|
||||
using namespace vos;
|
||||
using namespace usr;
|
||||
#endif
|
||||
|
||||
#define DATASTREAM_TEST_MAX_HANDLE 1
|
||||
|
||||
|
@@ -50,12 +50,8 @@
|
||||
#include "testfactreg.hxx"
|
||||
|
||||
|
||||
#ifndef _VOS_NO_NAMESPACE
|
||||
using namespace vos;
|
||||
using namespace usr;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class OMarkableOutputStreamTest :
|
||||
public XSimpleTest,
|
||||
|
@@ -48,10 +48,8 @@
|
||||
#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe"
|
||||
#define SERVICE_NAME L"test.com.sun.star.io.Pipe"
|
||||
|
||||
#ifndef _VOS_NO_NAMESPACE
|
||||
using namespace vos;
|
||||
using namespace usr;
|
||||
#endif
|
||||
|
||||
class WriteToStreamThread :
|
||||
public OThread
|
||||
|
@@ -35,10 +35,8 @@
|
||||
#include "testfactreg.hxx"
|
||||
|
||||
|
||||
#ifndef _VOS_NO_NAMESPACE
|
||||
using namespace vos;
|
||||
using namespace usr;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@@ -555,7 +555,7 @@ BOOL install (
|
||||
String aModule ("module://");
|
||||
char pBuffer[1024];
|
||||
|
||||
NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName (
|
||||
vos::ORealDynamicLoader::computeModuleName (
|
||||
prefix, pBuffer, sizeof(pBuffer));
|
||||
aModule += pBuffer;
|
||||
|
||||
@@ -573,7 +573,7 @@ BOOL uninstall (
|
||||
String aModule ("module://");
|
||||
char pBuffer[1024];
|
||||
|
||||
NAMESPACE_VOS(ORealDynamicLoader)::computeModuleName (
|
||||
vos::ORealDynamicLoader::computeModuleName (
|
||||
prefix, pBuffer, sizeof(pBuffer));
|
||||
aModule += pBuffer;
|
||||
|
||||
|
Reference in New Issue
Block a user