diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:35:18 +0100 |
commit | 6a75a47be7b3aafbb655ffa70609fd2ed7ca4b3e (patch) | |
tree | d00d2024213e09b8eba4704b8b6660eb42c3921c /automation/inc | |
parent | 7fb1e1ea8c9f8d3ef13524d1327272824df7110d (diff) | |
parent | eee3dbc7af039669d447d2e55abd896ea3383df1 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
automation/source/communi/communi.cxx
automation/source/server/recorder.cxx
automation/source/server/server.cxx
basctl/source/basicide/basobj2.cxx
Diffstat (limited to 'automation/inc')
-rw-r--r-- | automation/inc/automation/commtypes.hxx | 37 | ||||
-rw-r--r-- | automation/inc/automation/communi.hxx | 64 | ||||
-rw-r--r-- | automation/inc/automation/simplecm.hxx | 130 |
3 files changed, 103 insertions, 128 deletions
diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx index cd6f7074fa15..8d7c976fb125 100644 --- a/automation/inc/automation/commtypes.hxx +++ b/automation/inc/automation/commtypes.hxx @@ -32,7 +32,7 @@ * This file is intended to supply the types and defines for Environment independent * building of the packethandler * Only adaption of this file should be necessary. Else it is a bug! - * Eather including apropriate files or defining the types when not available in the environment + * Ether including apropriate files or defining the types when not available in the environment * ************************************************************************/ @@ -53,46 +53,21 @@ #include <sal/types.h> typedef sal_Unicode comm_UniChar; - -// this is a trick to be sure the SO types are unknown, so the compiler will yell at us in case we use them -#ifndef _SOLAR_H -#define NO_SOLAR -#endif - -#ifdef NO_SOLAR -#define BYTE BYTE_hidden -#define BOOL BOOL_hidden -#define ULONG ULONG_hidden -#define USHORT USHORT_hidden -#define UINT16 UINT16_hidden -#define UINT32 UINT32_hidden - -#endif +#include "rtl/string.hxx" #include <tools/debug.hxx> #include <tools/solar.h> -typedef BYTE comm_BYTE; -typedef BOOL comm_BOOL; +typedef sal_uInt8 comm_BYTE; +typedef sal_Bool comm_BOOL; typedef sal_uInt32 comm_ULONG; typedef sal_uInt16 comm_USHORT; -typedef UINT16 comm_UINT16; -typedef UINT32 comm_UINT32; - -#ifdef NO_SOLAR -#undef BYTE -#undef BOOL -#undef ULONG -#undef USHORT -#undef UINT16 -#undef UINT32 - -#endif +typedef sal_uInt16 comm_UINT16; +typedef sal_uInt32 comm_UINT32; typedef sal_uInt16 comm_WORD; typedef sal_uInt32 comm_DWORD; -class SmartId; class String; #define comm_String String diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index 5f873f5b393f..2c8ac15b6bd8 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -45,14 +45,14 @@ SV_DECL_PTRARR_SORT( CommunicationLinkList, CommunicationLink*, 1, 10 ) class MultiCommunicationManager : public CommunicationManager { public: - MultiCommunicationManager( BOOL bUseMultiChannel = FALSE ); + MultiCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~MultiCommunicationManager(); - virtual BOOL StopCommunication(); // Hlt alle CommunicationLinks an - virtual BOOL IsLinkValid( CommunicationLink* pCL ); - virtual USHORT GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr ); + virtual sal_Bool StopCommunication(); + virtual sal_Bool IsLinkValid( CommunicationLink* pCL ); + virtual sal_uInt16 GetCommunicationLinkCount(); + virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr ); - void DoQuickShutdown( BOOL bQuickShutdown = TRUE) { bGracefullShutdown = !bQuickShutdown; } + void DoQuickShutdown( sal_Bool bQuickShutdown = sal_True) { bGracefullShutdown = !bQuickShutdown; } protected: virtual void CallConnectionOpened( CommunicationLink* pCL ); @@ -60,21 +60,21 @@ protected: CommunicationLinkList *ActiveLinks; CommunicationLinkList *InactiveLinks; /// Hier sind die CommunicationLinks drin, die sich noch nicht selbst abgemeldet haben. /// allerdings schon ein StopCommunication gekriegt haben, bzw ein ConnectionTerminated - virtual void DestroyingLink( CommunicationLink *pCL ); // Link trgt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL ); - BOOL bGracefullShutdown; + sal_Bool bGracefullShutdown; }; class CommunicationManagerServer : public MultiCommunicationManager { public: - CommunicationManagerServer( BOOL bUseMultiChannel = FALSE ):MultiCommunicationManager( bUseMultiChannel ){;} + CommunicationManagerServer( sal_Bool bUseMultiChannel = sal_False ):MultiCommunicationManager( bUseMultiChannel ){;} }; class CommunicationManagerClient : public MultiCommunicationManager, public ICommunicationManagerClient { public: - CommunicationManagerClient( BOOL bUseMultiChannel = FALSE ); + CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False ); }; class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread @@ -83,14 +83,14 @@ public: CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ); virtual ~CommunicationLinkViaSocket(); - virtual BOOL IsCommunicationError(); - virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + virtual sal_Bool IsCommunicationError(); + virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); // Diese sind Virtuelle Links!!!! virtual long ConnectionClosed( void* = NULL ); virtual long DataReceived( void* = NULL ); - virtual BOOL StopCommunication(); + virtual sal_Bool StopCommunication(); void SetPutDataReceivedHdl( Link lPutDataReceived ){ mlPutDataReceived = lPutDataReceived; } Link GetDataReceivedLink () {Link aLink = LINK( this, CommunicationLinkViaSocket, DataReceived ); return aLink;} @@ -99,17 +99,17 @@ public: protected: virtual void SAL_CALL run(); - virtual BOOL ShutdownCommunication(); - ULONG nConnectionClosedEventId; - ULONG nDataReceivedEventId; + virtual sal_Bool ShutdownCommunication(); + sal_uLong nConnectionClosedEventId; + sal_uLong nDataReceivedEventId; osl::Mutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist osl::Mutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist virtual void WaitForShutdown(); DECL_LINK( ShutdownLink, void* ); Timer aShutdownTimer; - BOOL bShutdownStarted; - BOOL bDestroying; + sal_Bool bShutdownStarted; + sal_Bool bDestroying; Link mlPutDataReceived; }; @@ -119,15 +119,15 @@ class CommunicationManagerServerViaSocket : public CommunicationManagerServer public: using CommunicationManager::StartCommunication; - CommunicationManagerServerViaSocket( ULONG nPort, USHORT nMaxCon, BOOL bUseMultiChannel = FALSE ); + CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerServerViaSocket(); - virtual BOOL StartCommunication(); - virtual BOOL StopCommunication(); + virtual sal_Bool StartCommunication(); + virtual sal_Bool StopCommunication(); protected: - ULONG nPortToListen; - USHORT nMaxConnections; + sal_uLong nPortToListen; + sal_uInt16 nMaxConnections; private: CommunicationManagerServerAcceptThread *pAcceptThread; @@ -137,7 +137,7 @@ private: class CommunicationManagerServerAcceptThread: public osl::Thread { public: - CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS ); + CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon = CM_UNLIMITED_CONNECTIONS ); virtual ~CommunicationManagerServerAcceptThread(); CommunicationLinkRef GetNewConnection(){ CommunicationLinkRef xTemp = xmNewConnection; xmNewConnection.Clear(); return xTemp; } @@ -147,9 +147,9 @@ protected: private: CommunicationManagerServerViaSocket* pMyServer; osl::AcceptorSocket* pAcceptorSocket; - ULONG nPortToListen; - USHORT nMaxConnections; - ULONG nAddConnectionEventId; + sal_uLong nPortToListen; + sal_uInt16 nMaxConnections; + sal_uLong nAddConnectionEventId; osl::Mutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); } CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); } @@ -164,16 +164,16 @@ class CommunicationManagerClientViaSocket : public CommunicationManagerClient, C public: using CommunicationManager::StartCommunication; - CommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE ); - CommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE ); + CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); + CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManagerClientViaSocket(); - virtual BOOL StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );} - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} + virtual sal_Bool StartCommunication(){ return StartCommunication( aHostToTalk, nPortToTalk );} + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} private: ByteString aHostToTalk; - ULONG nPortToTalk; + sal_uLong nPortToTalk; protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } }; diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index 775265c31f89..dd522cb3beeb 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -37,14 +37,14 @@ #include <automation/commdefines.hxx> -// CM steht fr CommunicationManager +// CM steht f�r CommunicationManager #define CM_UNLIMITED_CONNECTIONS 0xffff -typedef USHORT CM_NameType; +typedef sal_uInt16 CM_NameType; #define CM_DOTTED ( (CM_NameType) 01 ) #define CM_FQDN ( (CM_NameType) 02 ) -typedef USHORT CM_InfoType; +typedef sal_uInt16 CM_InfoType; // nur eines dieser 3 defines darf verwendet werden #define CM_NO_TEXT ( (CM_InfoType) 01 ) #define CM_SHORT_TEXT ( (CM_InfoType) 02 ) @@ -124,9 +124,9 @@ protected: friend class SingleCommunicationManager; friend class MultiCommunicationManager; friend class CommunicationManagerServerAcceptThread; - // Darf nicht abgerumt werden zwischen Empfang des Streams und ende des Callbacks + // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks -protected: // so da nur ber Ref gelscht werden kann +protected: // so da� nur �ber Ref gel�scht werden kann virtual ~CommunicationLink(); void InvalidateManager() { pMyManager = NULL; } @@ -135,8 +135,8 @@ protected: // so da nur ber Ref gelscht werden kann public: CommunicationLink( CommunicationManager *pMan ); - virtual BOOL StopCommunication()=0; - virtual BOOL IsCommunicationError()=0; + virtual sal_Bool StopCommunication()=0; + virtual sal_Bool IsCommunicationError()=0; CommunicationManager* GetCommunicationManager(){ return pMyManager; } // Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren @@ -151,27 +151,27 @@ public: /** will call virtual function DoTransferDataStream to do actual work Purpos is to allow housekeeping **/ - BOOL TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + sal_Bool TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); // Liefert die ID, die vom Sender angegeben wurde. - // Dadurch lassen sich virtuelle Kommunikationen ber einen physikalischen Link realisiren. - // Da die Kommunikation zu lteren Versionen kompatibel bleiben mu, mu der Empfnger raten, - // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann ndert. - UINT16 GetProtocol(){ return nServiceProtocol; } + // Dadurch lassen sich virtuelle Kommunikationen �ber einen physikalischen Link realisiren. + // Da die Kommunikation zu �lteren Versionen kompatibel bleiben mu�, mu� der Empf�nger raten, + // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann �ndert. + sal_uInt16 GetProtocol(){ return nServiceProtocol; } - // Der Stream wird hier bergeben. Der Aufrufer ist fr dessen Lschung zustndig + // Der Stream wird hier �bergeben. Der Aufrufer ist f�r dessen L�schung zust�ndig // Die Methode MUSS gerufen werden, da sonst keine weiteren Daten empfangen werden. SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; } - /// Ermglicht das Auslsen des nchsten Callbacks. Wird auch Implizit gerufen. - void FinishCallback(){ bIsInsideCallback = FALSE; } + /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen. + void FinishCallback(){ bIsInsideCallback = sal_False; } - /// Syncrones Empfangen der Daten. Nur fr Kommandozeile, sonst leer implementiert - virtual BOOL ReceiveDataStream(){ return FALSE; } + /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert + virtual sal_Bool ReceiveDataStream(){ return sal_False; } /// Statistics DateTime GetStart() { return aStart; } - ULONG GetTotalBytes() { return nTotalBytes; } + sal_uLong GetTotalBytes() { return nTotalBytes; } DateTime GetLastAccess() { return aLastAccess; } const ByteString& GetApplication() { return maApplication; } virtual void SetApplication( const ByteString& aApp ); @@ -184,23 +184,23 @@ protected: virtual DECL_LINK( ConnectionClosed, void* = NULL ); virtual DECL_LINK( DataReceived, void* = NULL ); - virtual BOOL DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); + virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); SvStream *pServiceData; - UINT16 nServiceProtocol; - UINT16 nServiceHeaderType; + sal_uInt16 nServiceProtocol; + sal_uInt16 nServiceHeaderType; - /// Verhindert das vorzeitige Auslsen des nchsten Callbacks. - void StartCallback(){ bIsInsideCallback = TRUE; } - BOOL bIsInsideCallback; + /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks. + void StartCallback(){ bIsInsideCallback = sal_True; } + sal_Bool bIsInsideCallback; - virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0; + virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0; - virtual BOOL ShutdownCommunication() = 0; /// Really stop the Communication + virtual sal_Bool ShutdownCommunication() = 0; /// Really stop the Communication /// Statistics DateTime aStart; - ULONG nTotalBytes; + sal_uLong nTotalBytes; DateTime aLastAccess; private: @@ -209,8 +209,8 @@ private: #if OSL_DEBUG_LEVEL > 1 public: // misc (debuging) purposes - BOOL bFlag; - ULONG nSomething; + sal_Bool bFlag; + sal_uLong nSomething; #endif }; @@ -223,23 +223,23 @@ class CommunicationManager friend class CommunicationLink; friend class CommonSocketFunctions; public: - CommunicationManager( BOOL bUseMultiChannel = FALSE ); + CommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~CommunicationManager(); - virtual BOOL StartCommunication()=0; - virtual BOOL StartCommunication( String aApp, String aParams ); - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ); - virtual BOOL StopCommunication()=0; // Hlt alle CommunicationLinks an - virtual BOOL IsCommunicationRunning() { return bIsCommunicationRunning; } -// virtual BOOL IsCommunicationError(); + virtual sal_Bool StartCommunication()=0; + virtual sal_Bool StartCommunication( String aApp, String aParams ); + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ); + virtual sal_Bool StopCommunication()=0; // H�lt alle CommunicationLinks an + virtual sal_Bool IsCommunicationRunning() { return bIsCommunicationRunning; } +// virtual sal_Bool IsCommunicationError(); // Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren virtual ByteString GetMyName( CM_NameType eType ); - virtual BOOL IsLinkValid( CommunicationLink* pCL )=0; // Notwendig fr call im Destruktor + virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor - virtual USHORT GetCommunicationLinkCount()=0; - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr )=0; + virtual sal_uInt16 GetCommunicationLinkCount()=0; + virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0; // Liefert den letzten neuen Link oder NULL wenn dieser schon wieder geschlossen ist. CommunicationLinkRef GetLastNewLink() { return xLastNewLink; } @@ -252,8 +252,8 @@ public: void SetInfoType( CM_InfoType nIT ){ nInfoType = nIT; } CM_InfoType GetInfoType(){ return nInfoType; } - BOOL IsMultiChannel(){ return bIsMultiChannel; } - void SetApplication( const ByteString& aApp, BOOL bRunningLinks = FALSE ); + sal_Bool IsMultiChannel(){ return bIsMultiChannel; } + void SetApplication( const ByteString& aApp, sal_Bool bRunningLinks = sal_False ); const ByteString& GetApplication() { return maApplication; } protected: @@ -266,15 +266,15 @@ protected: CM_InfoType nInfoType; - // Diese Routinen rufen den Link oder sind berladen + // Diese Routinen rufen den Link oder sind �berladen virtual void ConnectionOpened( CommunicationLink* pCL ){ mlConnectionOpened.Call( pCL ); } virtual void ConnectionClosed( CommunicationLink* pCL ){ mlConnectionClosed.Call( pCL ); } virtual void DataReceived( CommunicationLink* pCL ){ mlDataReceived.Call( pCL ); } virtual void InfoMsg( InfoString aMsg ){ mlInfoMsg.Call( &aMsg ); } - BOOL bIsCommunicationRunning; + sal_Bool bIsCommunicationRunning; - virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link trgt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus private: ByteString maApplication; @@ -284,40 +284,40 @@ private: Link mlInfoMsg; CommunicationLinkRef xLastNewLink; - BOOL bIsMultiChannel; + sal_Bool bIsMultiChannel; }; class SingleCommunicationManager : public CommunicationManager { public: - SingleCommunicationManager( BOOL bUseMultiChannel = FALSE ); + SingleCommunicationManager( sal_Bool bUseMultiChannel = sal_False ); virtual ~SingleCommunicationManager(); - virtual BOOL StopCommunication(); // Hlt alle CommunicationLinks an - virtual BOOL IsLinkValid( CommunicationLink* pCL ); - virtual USHORT GetCommunicationLinkCount(); - virtual CommunicationLinkRef GetCommunicationLink( USHORT nNr ); + 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 trgt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL ); // Link tr�gt sich im Destruktor aus }; class ICommunicationManagerClient { friend class CommonSocketFunctions; protected: - virtual BOOL RetryConnect() { return FALSE; } // Kann dann eventuell die Applikation starten + virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten }; class TCPIO; class SimpleCommunicationLinkViaSocket : public CommunicationLink { public: - virtual BOOL IsCommunicationError(); - virtual BOOL StopCommunication(); + virtual sal_Bool IsCommunicationError(); + virtual sal_Bool StopCommunication(); virtual ByteString GetCommunicationPartner( CM_NameType eType ); virtual ByteString GetMyName( CM_NameType eType ); @@ -339,10 +339,10 @@ protected: void SetStreamSocket( osl::StreamSocket* pSocket ); SvStream *pReceiveStream; - BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket - virtual BOOL SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); + sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket + virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL); bool IsReceiveReady(); - BOOL bIsRequestShutdownPending; + sal_Bool bIsRequestShutdownPending; virtual void WaitForShutdown()=0; void SetNewPacketAsCurrent(); }; @@ -352,16 +352,16 @@ class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommun public: SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, osl::StreamSocket* pSocket ); ~SimpleCommunicationLinkViaSocketWithReceiveCallbacks(); - virtual BOOL ReceiveDataStream(); + virtual sal_Bool ReceiveDataStream(); protected: - virtual BOOL ShutdownCommunication(); /// Really stop the Communication + virtual sal_Bool ShutdownCommunication(); /// Really stop the Communication virtual void WaitForShutdown(); }; class CommonSocketFunctions { public: - BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ); + sal_Bool DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ); protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0; }; @@ -371,13 +371,13 @@ class SingleCommunicationManagerClientViaSocket : public SingleCommunicationMana public: using CommunicationManager::StartCommunication; - SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel = FALSE ); - SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel = FALSE ); - virtual BOOL StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} - virtual BOOL StartCommunication( ByteString aHost, ULONG nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} + SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel = sal_False ); + SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False ); + virtual sal_Bool StartCommunication(){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHostToTalk, nPortToTalk );} + virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ){ return DoStartCommunication( this, (ICommunicationManagerClient*) this, aHost, nPort );} private: ByteString aHostToTalk; - ULONG nPortToTalk; + sal_uLong nPortToTalk; protected: virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } }; |