diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-12 11:34:50 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-12 11:34:50 +0100 |
commit | 2b42b8533640fc34709c8d702d0b0448489ed73f (patch) | |
tree | f93556e25d37f17854c841ad112231f4864e5acf /automation/source/simplecm/simplecm.cxx | |
parent | e7ee592b13a604da92164d008a3941ef8329f16e (diff) |
removetooltypes01: #i112600# remove tooltypes from automation
Diffstat (limited to 'automation/source/simplecm/simplecm.cxx')
-rw-r--r-- | automation/source/simplecm/simplecm.cxx | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index bebd4fc9b206..74a86f343677 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -54,11 +54,11 @@ CommunicationLink::CommunicationLink( CommunicationManager *pMan ) : pMyManager(pMan) , pServiceData(NULL) , nServiceProtocol( 0 ) -, bIsInsideCallback( FALSE ) +, bIsInsideCallback( sal_False ) , nTotalBytes( 0 ) , maApplication("Undefined") #if OSL_DEBUG_LEVEL > 1 -, bFlag( FALSE ) +, bFlag( sal_False ) , nSomething( 0 ) #endif { @@ -68,7 +68,7 @@ CommunicationLink::~CommunicationLink() { #if OSL_DEBUG_LEVEL > 1 if ( !bFlag ) // bFlag will be set if deletion is expected else we can set a breakpoint - bFlag = FALSE; + bFlag = sal_False; #endif if ( pMyManager ) pMyManager->DestroyingLink( this ); @@ -102,14 +102,14 @@ IMPL_LINK( CommunicationLink, DataReceived, void*, EMPTYARG ) return 1; } -BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) +sal_Bool CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) { INFO_MSG( CByteString("S :").Append( GetCommunicationPartner( CM_FQDN ) ), CByteString("Daten Senden:").Append( GetCommunicationPartner( CM_FQDN ) ), CM_SEND, this ); - BOOL bWasError = FALSE; + sal_Bool bWasError = sal_False; - UINT32 nBuffer; + sal_uInt32 nBuffer; nBuffer = pDataStream->SeekRel(0) +1; bWasError = pPacketHandler->TransferData( ((SvMemoryStream*)pDataStream)->GetData(), nBuffer, nProtocol ) != C_ERROR_NONE; @@ -123,7 +123,7 @@ BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol return !bWasError; } -BOOL CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) +sal_Bool CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) { aLastAccess = DateTime(); nTotalBytes += pDataStream->Seek( STREAM_SEEK_TO_END ); @@ -142,7 +142,7 @@ SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( Communicatio , aMyName() , pStreamSocket( pSocket ) , pReceiveStream( NULL ) -, bIsRequestShutdownPending( FALSE ) +, bIsRequestShutdownPending( sal_False ) { pTCPIO = new TCPIO( pStreamSocket ); pPacketHandler = new PacketHandler( (ITransmiter*) pTCPIO, pTCPIO, pMyManager->IsMultiChannel() ); @@ -165,7 +165,7 @@ void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSoc pStreamSocket = pSocket; } -BOOL SimpleCommunicationLinkViaSocket::StopCommunication() +sal_Bool SimpleCommunicationLinkViaSocket::StopCommunication() { CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method if ( !IsCommunicationError() ) // Meaning that the Communication is still runnung @@ -176,7 +176,7 @@ BOOL SimpleCommunicationLinkViaSocket::StopCommunication() SendHandshake( CH_REQUEST_ShutdownLink ); } WaitForShutdown(); - return TRUE; + return sal_True; } void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout() @@ -188,7 +188,7 @@ void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout() } } -BOOL SimpleCommunicationLinkViaSocket::IsCommunicationError() +sal_Bool SimpleCommunicationLinkViaSocket::IsCommunicationError() { return !pStreamSocket; } @@ -273,9 +273,9 @@ SvStream* SimpleCommunicationLinkViaSocket::GetBestCommunicationStream() if ( !bWasError )\ {nTotal += nLength;} -BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream() +sal_Bool SimpleCommunicationLinkViaSocket::DoReceiveDataStream() { - BOOL bWasError = FALSE; + sal_Bool bWasError = sal_False; void* pBuffer = NULL; comm_UINT32 nLen; bWasError = pPacketHandler->ReceiveData( pBuffer, nLen ) != C_ERROR_NONE; @@ -284,7 +284,7 @@ BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream() pReceiveStream = GetBestCommunicationStream(); DBG_ASSERT( pReceiveStream->IsA() == ID_MEMORYSTREAM, "CommunicationStream is not an SvMemoryStream. Communication has to be reimplemented here!"); if ( pReceiveStream->IsA() == ID_MEMORYSTREAM ) - ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, TRUE, nLen ); + ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, sal_True, nLen ); DBG_ASSERT( pReceiveStream, "Datastream is NULL"); } @@ -307,13 +307,13 @@ void SimpleCommunicationLinkViaSocket::SetNewPacketAsCurrent() nServiceHeaderType = pPacketHandler->GetReceiveHeaderType(); } -BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData ) +sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData ) { - BOOL bWasError; + sal_Bool bWasError; if ( pData ) { - UINT32 nBuffer; + sal_uInt32 nBuffer; nBuffer = pData->Seek( STREAM_SEEK_TO_END ); bWasError = !pPacketHandler->SendHandshake( aHandshakeType, ((SvMemoryStream*)pData)->GetData(), nBuffer ); } @@ -337,7 +337,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy case CH_RESPONSE_HandshakeAlive: break; case CH_REQUEST_ShutdownLink: - bIsRequestShutdownPending = TRUE; + bIsRequestShutdownPending = sal_True; break; case CH_ShutdownLink: break; @@ -371,24 +371,24 @@ void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown() ReceiveDataStream(); } -BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() +sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() { if ( DoReceiveDataStream() ) { SetNewPacketAsCurrent(); StartCallback(); DataReceived(); - return TRUE; + return sal_True; } else { StartCallback(); ShutdownCommunication(); - return FALSE; + return sal_False; } } -BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() +sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() { if ( GetStreamSocket() ) GetStreamSocket()->shutdown(); @@ -402,14 +402,14 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication ConnectionClosed(); - return TRUE; + return sal_True; } -CommunicationManager::CommunicationManager( BOOL bUseMultiChannel ) +CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel ) : nInfoType( CM_NONE ) -, bIsCommunicationRunning( FALSE ) +, bIsCommunicationRunning( sal_False ) , maApplication("Unknown") , bIsMultiChannel( bUseMultiChannel ) { @@ -420,18 +420,18 @@ CommunicationManager::~CommunicationManager() xLastNewLink.Clear(); } -BOOL CommunicationManager::StartCommunication( String aApp, String aParams ) +sal_Bool CommunicationManager::StartCommunication( String aApp, String aParams ) { (void) aApp; /* avoid warning about unused parameter */ (void) aParams; /* avoid warning about unused parameter */ - return FALSE; + return sal_False; } -BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort ) +sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong nPort ) { (void) aHost; /* avoid warning about unused parameter */ (void) nPort; /* avoid warning about unused parameter */ - return FALSE; + return sal_False; } ByteString CommunicationManager::GetMyName( CM_NameType ) @@ -446,7 +446,7 @@ void CommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) pCL->StartCallback(); // Sollte bereits vor dem Aufruf gerufen werden pCL->aStart = DateTime(); pCL->aLastAccess = pCL->aStart; - bIsCommunicationRunning = TRUE; + bIsCommunicationRunning = sal_True; pCL->SetApplication( GetApplication() ); xLastNewLink = pCL; @@ -493,7 +493,7 @@ void CommunicationManager::CallDataReceived( CommunicationLink* pCL ) if ( CH_Handshake == pCL->nServiceHeaderType ) { SvStream *pData = pCL->GetServiceData(); - USHORT nType; + sal_uInt16 nType; pData->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); // Unfortulately it is written this way :(( *pData >> nType; pData->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -565,12 +565,12 @@ void CommunicationManager::CallInfoMsg( InfoString aMsg ) InfoMsg( aMsg ); } -void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunningLinks ) +void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRunningLinks ) { maApplication = aApp; if ( bRunningLinks ) { - USHORT i; + sal_uInt16 i; for ( i = 0 ; i < GetCommunicationLinkCount() ; i++ ) GetCommunicationLink( i )->SetApplication( aApp ); } @@ -578,7 +578,7 @@ void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunning -SingleCommunicationManager::SingleCommunicationManager( BOOL bUseMultiChannel ) +SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel ) : CommunicationManager( bUseMultiChannel ) { xActiveLink = NULL; @@ -592,31 +592,31 @@ SingleCommunicationManager::~SingleCommunicationManager() pInactiveLink->InvalidateManager(); } -BOOL SingleCommunicationManager::StopCommunication() +sal_Bool SingleCommunicationManager::StopCommunication() { if ( xActiveLink.Is() ) { - BOOL bSuccess = xActiveLink->StopCommunication(); + sal_Bool bSuccess = xActiveLink->StopCommunication(); if ( pInactiveLink ) pInactiveLink->InvalidateManager(); pInactiveLink = xActiveLink; xActiveLink.Clear(); return bSuccess; } - return TRUE; + return sal_True; } -BOOL SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) +sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) { return &xActiveLink == pCL; } -USHORT SingleCommunicationManager::GetCommunicationLinkCount() +sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount() { return IsCommunicationRunning()?1:0; } -CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( USHORT ) +CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 ) { return xActiveLink; } @@ -644,7 +644,7 @@ void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) pInactiveLink->InvalidateManager(); pInactiveLink = xActiveLink; xActiveLink.Clear(); - bIsCommunicationRunning = FALSE; + bIsCommunicationRunning = sal_False; } void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) @@ -654,7 +654,7 @@ void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) } -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel ) +SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) : SingleCommunicationManager( bUseMultiChannel ) , aHostToTalk( aHost ) , nPortToTalk( nPort ) @@ -662,7 +662,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo } -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel ) +SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) : SingleCommunicationManager( bUseMultiChannel ) , aHostToTalk() , nPortToTalk( 0 ) @@ -670,7 +670,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo } -BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ) +sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { vos::OInetSocketAddr Addr; vos::OConnectorSocket *pConnSocket; @@ -690,13 +690,13 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo pConnSocket->setTcpNoDelay( 1 ); pCM->CallConnectionOpened( CreateCommunicationLink( pCM, pConnSocket ) ); - return TRUE; + return sal_True; } else delete pConnSocket; } while ( pCMC->RetryConnect() ); - return FALSE; + return sal_False; } |