summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-21 09:26:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-21 09:26:51 +0100
commit9fd52d35c1e49ce7d3fdba3825a862e875aa41c3 (patch)
treedf7dd767d4164e59e73f2d4ef0350b1ea0b44165
parentc53c4610cbd815fadb9d9f7ae81009c1eadda6a3 (diff)
unused methodsfeature/layout
-rw-r--r--automation/inc/automation/simplecm.hxx31
-rw-r--r--automation/source/simplecm/simplecm.cxx132
2 files changed, 0 insertions, 163 deletions
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
index b5b22418b..69c75cbf2 100644
--- a/automation/inc/automation/simplecm.hxx
+++ b/automation/inc/automation/simplecm.hxx
@@ -114,14 +114,12 @@ private:
class PacketHandler;
class CommunicationManager;
-class SingleCommunicationManager;
class MultiCommunicationManager;
class CommunicationManagerServerAcceptThread;
class CommunicationLink : public SvRefBase
{
protected:
friend class CommunicationManager;
- friend class SingleCommunicationManager;
friend class MultiCommunicationManager;
friend class CommunicationManagerServerAcceptThread;
// Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks
@@ -287,24 +285,6 @@ private:
sal_Bool bIsMultiChannel;
};
-class SingleCommunicationManager : public CommunicationManager
-{
-public:
- SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False );
- virtual ~SingleCommunicationManager();
- virtual sal_Bool StopCommunication(); // H�lt alle CommunicationLinks an
- virtual sal_Bool IsLinkValid( CommunicationLink* pCL );
- virtual sal_uInt16 GetCommunicationLinkCount();
- virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr );
-
-protected:
- virtual void CallConnectionOpened( CommunicationLink* pCL );
- virtual void CallConnectionClosed( CommunicationLink* pCL );
- CommunicationLinkRef xActiveLink;
- CommunicationLink *pInactiveLink;
- virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus
-};
-
class ICommunicationManagerClient
{
friend class CommonSocketFunctions;
@@ -347,17 +327,6 @@ protected:
void SetNewPacketAsCurrent();
};
-class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket
-{
-public:
- SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket );
- ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks();
- virtual sal_Bool ReceiveDataStream();
-protected:
- virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication
- virtual void WaitForShutdown();
-};
-
class CommonSocketFunctions
{
public:
diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx
index a0a11db86..132296890 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -343,17 +343,6 @@ sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandsha
return !bWasError;
}
-SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket )
-: SimpleCommunicationLinkViaSocket( pMan, pSocket )
-{
-}
-
-SimpleCommunicationLinkViaSocketWithReceiveCallbacks::~SimpleCommunicationLinkViaSocketWithReceiveCallbacks()
-{
- if ( pMyManager && pMyManager->IsLinkValid( this ) && !bIsRequestShutdownPending )
- StopCommunication();
-}
-
bool SimpleCommunicationLinkViaSocket::IsReceiveReady()
{
if ( !IsCommunicationError() )
@@ -365,50 +354,6 @@ bool SimpleCommunicationLinkViaSocket::IsReceiveReady()
return false;
}
-void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown()
-{
- CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method
-
- while( pMyManager && !IsCommunicationError() && IsReceiveReady())
- ReceiveDataStream();
-}
-
-sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream()
-{
- if ( DoReceiveDataStream() )
- {
- SetNewPacketAsCurrent();
- StartCallback();
- DataReceived();
- return sal_True;
- }
- else
- {
- StartCallback();
- ShutdownCommunication();
- return sal_False;
- }
-}
-
-sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication()
-{
- if ( GetStreamSocket() )
- GetStreamSocket()->shutdown();
-
- if ( GetStreamSocket() )
- GetStreamSocket()->close();
-
- osl::StreamSocket* pTempSocket = GetStreamSocket();
- SetStreamSocket( NULL );
- delete pTempSocket;
-
- ConnectionClosed();
-
- return sal_True;
-}
-
-
-
CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel )
: nInfoType( CM_NONE )
, bIsCommunicationRunning( sal_False )
@@ -577,83 +522,6 @@ void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRun
}
}
-
-
-SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel )
-: CommunicationManager( bUseMultiChannel )
-{
- xActiveLink = NULL;
- pInactiveLink = NULL;
-}
-
-SingleCommunicationManager::~SingleCommunicationManager()
-{
- StopCommunication();
- if ( pInactiveLink )
- pInactiveLink->InvalidateManager();
-}
-
-sal_Bool SingleCommunicationManager::StopCommunication()
-{
- if ( xActiveLink.Is() )
- {
- sal_Bool bSuccess = xActiveLink->StopCommunication();
- if ( pInactiveLink )
- pInactiveLink->InvalidateManager();
- pInactiveLink = xActiveLink;
- xActiveLink.Clear();
- return bSuccess;
- }
- return sal_True;
-}
-
-sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL )
-{
- return &xActiveLink == pCL;
-}
-
-sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount()
-{
- return IsCommunicationRunning()?1:0;
-}
-
-CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 )
-{
- return xActiveLink;
-}
-
-void SingleCommunicationManager::CallConnectionOpened( CommunicationLink* pCL )
-{
- DBG_ASSERT( !xActiveLink.Is(), "Es ist bereits ein CommunicationLink aktiv");
- if ( xActiveLink.Is() )
- {
- if ( pInactiveLink )
- pInactiveLink->InvalidateManager();
- pInactiveLink = xActiveLink;
- xActiveLink->StopCommunication(); // Den alten Link brutal abw�rgen
- }
- xActiveLink = pCL;
- CommunicationManager::CallConnectionOpened( pCL );
-}
-
-void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL )
-{
- CommunicationManager::CallConnectionClosed( pCL );
-
- DBG_ASSERT( pCL == xActiveLink, "SingleCommunicationManager::CallConnectionClosed mit fremdem Link");
- if ( pInactiveLink )
- pInactiveLink->InvalidateManager();
- pInactiveLink = xActiveLink;
- xActiveLink.Clear();
- bIsCommunicationRunning = sal_False;
-}
-
-void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL )
-{
- pInactiveLink = NULL;
- pCL->InvalidateManager();
-}
-
sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort )
{
osl::SocketAddr Addr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ), nPort );