summaryrefslogtreecommitdiff
path: root/automation/inc
diff options
context:
space:
mode:
Diffstat (limited to 'automation/inc')
-rw-r--r--automation/inc/automation/automation.hxx55
-rw-r--r--automation/inc/automation/commdefines.hxx150
-rw-r--r--automation/inc/automation/commtypes.hxx67
-rw-r--r--automation/inc/automation/communi.hxx182
-rw-r--r--automation/inc/automation/simplecm.hxx339
-rw-r--r--automation/inc/makefile.mk47
-rw-r--r--automation/inc/pch/precompiled_automation.cxx31
-rw-r--r--automation/inc/pch/precompiled_automation.hxx34
8 files changed, 0 insertions, 905 deletions
diff --git a/automation/inc/automation/automation.hxx b/automation/inc/automation/automation.hxx
deleted file mode 100644
index ce997c8ba..000000000
--- a/automation/inc/automation/automation.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef AUTOMATION_HXX
-#define AUTOMATION_HXX
-
-class ImplRemoteControl;
-
-class RemoteControl
-{
- ImplRemoteControl* pImpl;
-public:
- RemoteControl();
- ~RemoteControl();
-};
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- typedef void ( *pfunc_CreateRemoteControl)();
- typedef void ( *pfunc_DestroyRemoteControl)();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // AUTOMATION_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx
deleted file mode 100644
index 3333a58a7..000000000
--- a/automation/inc/automation/commdefines.hxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-/*************************************************************************
- *
- * ATTENTION
- * This file is intended to work inside and outside the StarOffice environment.
- * Only adaption of file commtypes.hxx should be necessary. Else it is a bug!
- *
- ************************************************************************/
-
-#include <automation/commtypes.hxx>
-#include <osl/endian.h>
-
-#ifndef MAKEDWORD
-#define MAKEDWORD(wl, wh) ((sal_uInt32)((wl) & 0xFFFF) | (((sal_uInt32)(wh) & 0xFFFF) << 16))
-#endif
-#ifndef LOWORD
-#define LOWORD(d) ((sal_uInt16)((sal_uInt32)(d) & 0xFFFF))
-#endif
-#ifndef HIWORD
-#define HIWORD(d) ((sal_uInt16)(((sal_uInt32)(d) >> 16) & 0xFFFF))
-#endif
-#ifndef MAKEWORD
-#define MAKEWORD(bl, bh) ((sal_uInt16)((bl) & 0xFF) | (((sal_uInt16)(bh) & 0xFF) << 8))
-#endif
-#ifndef LOBYTE
-#define LOBYTE(w) ((comm_BYTE)((sal_uInt16)(w) & 0xFF))
-#endif
-#ifndef HIBYTE
-#define HIBYTE(w) ((comm_BYTE)(((sal_uInt16)(w) >> 8) & 0xFF))
-#endif
-#ifndef MAKEBYTE
-#define MAKEBYTE(nl, nh) ((comm_BYTE)(((nl) & 0x0F) | (((nh) & 0x0F) << 4)))
-#endif
-#ifndef LONIBBLE
-#define LONIBBLE(b) ((comm_BYTE)((b) & 0x0F))
-#endif
-#ifndef HINIBBLE
-#define HINIBBLE(b) ((comm_BYTE)(((b) >> 4) & 0x0F))
-#endif
-
-#ifndef SWAPWORD
-#define SWAPWORD(w) MAKEWORD(HIBYTE(w),LOBYTE(w))
-#endif
-#ifndef SWAPDWORD
-#define SWAPDWORD(d) MAKEDWORD(SWAPWORD(HIWORD(d)),SWAPWORD(LOWORD(d)))
-#endif
-
-#ifdef OSL_BIGENDIAN
-#ifndef NETWORD
-#define NETWORD(w) (sal_uInt16)(w)
-#endif
-#ifndef NETDWORD
-#define NETDWORD(d) (sal_uInt32)(d)
-#endif
-#endif // OSL_BIGENDIAN
-
-#ifdef OSL_LITENDIAN
-#ifndef NETWORD
-#define NETWORD(w) MAKEWORD(HIBYTE(w),LOBYTE(w))
-#endif
-#ifndef NETDWORD
-#define NETDWORD(d) MAKEDWORD(NETWORD(HIWORD(d)),NETWORD(LOWORD(d)))
-#endif
-#endif // OSL_LITENDIAN
-
-/**
- Es gibt zwei arten von Datenpaketen
- die erste enthält in den ersten 4 Byte die Längenangabe und in den Darauffolgenden die Daten
- Die Längenangabe bezieht sich nur auf die Daten ohne die Längenangabe selbst.
-
- Die Zweite Art von Datenpaketen enthält Header mit weitere Informationen
- wie unten beschrieben.
-
- Umgeschaltet wird mit dem Boolean bUseMultiChannel im Konstruktor des Managers.
-**/
-/**
-Defines für Header Typen:
-
-Allgemeiner Header:
- Byte Länge Inhalt
- 0..3 4 Länge des Paketes ohne diese 4 Byte
- 4 1 Prüfsumme über die Länge. Stimmt sie nicht wird die Verbindung geschlossen
- 5..6 2 Länge des Headers ohne diese 2 Byte
- 7..8 2 Typ des Headers
-
-CH_SimpleMultiChannel:
- 9..10 2 Channel
-CH_Handshake Internal Use ONLY
- Keine Weiteren Daten!
-
-**/
-typedef comm_UINT16 CMProtocol;
-
-#define CM_PROTOCOL_OLDSTYLE (CMProtocol)0x0001
-#define CM_PROTOCOL_MARS (CMProtocol)0x0001
-#define CM_PROTOCOL_BROADCASTER (CMProtocol)0x0002
-#define CM_PROTOCOL_USER_START (CMProtocol)0x0100
-
-typedef comm_UINT16 HandshakeType;
-typedef comm_UINT16 CommunicationOption;
-
-#define CH_NoHeader 0x0000
-#define CH_SimpleMultiChannel 0x0001
-#define CH_Handshake 0x0002
-
-#define CH_REQUEST_HandshakeAlive ((HandshakeType)0x0101) /// Fordert eine Alive Antwort an
-#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// Alive Antwort
-
-/**
- Announce supported options:
- Client announces available options
- Server returns subset of these options (note that the sbset can be the entire set also)
-**/
-#define CH_SUPPORT_OPTIONS ((HandshakeType)0x0103)
-#define OPT_USE_SHUTDOWN_PROTOCOL ((CommunicationOption)0x0001)
-
-/// these are for making sure all Data is read prior to shutting sown the link
-#define CH_REQUEST_ShutdownLink ((HandshakeType)0x0104) /// Request to Shutdown this link
-#define CH_ShutdownLink ((HandshakeType)0x0105) /// Shutdown this link
-
-#define CH_SetApplication ((HandshakeType)0x0106) /// Set Description of Client
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx
deleted file mode 100644
index cb6bdfda2..000000000
--- a/automation/inc/automation/commtypes.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-/*************************************************************************
- *
- * ATTENTION
- * 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!
- * Ether including apropriate files or defining the types when not available in the environment
- *
- ************************************************************************/
-
-/** defines:
- comm_BYTE
- comm_BOOL
- comm_UINT16
- comm_UINT32
- comm_UniChar
-**/
-
-#ifndef _COMMTYPES_HXX
-#define _COMMTYPES_HXX
-
-#include <sal/types.h>
-typedef sal_Unicode comm_UniChar;
-#include "rtl/string.hxx"
-
-#include <tools/debug.hxx>
-
-#include <tools/solar.h>
-typedef sal_uInt8 comm_BYTE;
-typedef sal_Bool comm_BOOL;
-typedef sal_uInt16 comm_UINT16;
-typedef sal_uInt32 comm_UINT32;
-
-class String;
-#define comm_String String
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
deleted file mode 100644
index 7b0ceb81b..000000000
--- a/automation/inc/automation/communi.hxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _COMMUNI_HXX
-#define _COMMUNI_HXX
-
-#include <svl/svarray.hxx>
-#include <osl/thread.hxx>
-#include <osl/mutex.hxx>
-#include <vcl/timer.hxx>
-#include <automation/simplecm.hxx>
-
-class SvStream;
-class SvMemoryStream;
-//class Application;
-
-class CommunicationManagerServerAcceptThread;
-SV_DECL_PTRARR_SORT( CommunicationLinkList, CommunicationLink*, 1, 10 )
-
-class MultiCommunicationManager : public CommunicationManager
-{
-public:
- MultiCommunicationManager( sal_Bool bUseMultiChannel = sal_False );
- virtual ~MultiCommunicationManager();
- virtual sal_Bool StopCommunication();
- virtual sal_Bool IsLinkValid( CommunicationLink* pCL );
- virtual sal_uInt16 GetCommunicationLinkCount();
- virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr );
-
- void DoQuickShutdown( sal_Bool bQuickShutdown = sal_True) { bGracefullShutdown = !bQuickShutdown; }
-
-protected:
- virtual void CallConnectionOpened( CommunicationLink* pCL );
- virtual void CallConnectionClosed( CommunicationLink* pCL );
- 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 );
-
- sal_Bool bGracefullShutdown;
-};
-
-class CommunicationManagerServer : public MultiCommunicationManager
-{
-public:
- CommunicationManagerServer( sal_Bool bUseMultiChannel = sal_False ):MultiCommunicationManager( bUseMultiChannel ){;}
-};
-
-class CommunicationManagerClient : public MultiCommunicationManager, public ICommunicationManagerClient
-{
-public:
- CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False );
-};
-
-class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread
-{
-public:
- CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket );
- virtual ~CommunicationLinkViaSocket();
-
- 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 sal_Bool StopCommunication();
-
- void SetPutDataReceivedHdl( Link lPutDataReceived ){ mlPutDataReceived = lPutDataReceived; }
- Link GetDataReceivedLink () {Link aLink = LINK( this, CommunicationLinkViaSocket, DataReceived ); return aLink;}
- DECL_LINK( PutDataReceivedHdl, CommunicationLinkViaSocket* );
-
-protected:
- virtual void SAL_CALL run();
-
- 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;
- sal_Bool bShutdownStarted;
- sal_Bool bDestroying;
- Link mlPutDataReceived;
-};
-
-class CommunicationManagerServerViaSocket : public CommunicationManagerServer
-{
- friend class CommunicationManagerServerAcceptThread;
-public:
- using CommunicationManager::StartCommunication;
-
- CommunicationManagerServerViaSocket( sal_uLong nPort, sal_uInt16 nMaxCon, sal_Bool bUseMultiChannel = sal_False );
- virtual ~CommunicationManagerServerViaSocket();
-
- virtual sal_Bool StartCommunication();
- virtual sal_Bool StopCommunication();
-
-protected:
- sal_uLong nPortToListen;
- sal_uInt16 nMaxConnections;
-
-private:
- CommunicationManagerServerAcceptThread *pAcceptThread;
- void AddConnection( CommunicationLink *pNewConnection );
-};
-
-class CommunicationManagerServerAcceptThread: public osl::Thread
-{
-public:
- CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, sal_uLong nPort, sal_uInt16 nMaxCon = CM_UNLIMITED_CONNECTIONS );
- virtual ~CommunicationManagerServerAcceptThread();
- CommunicationLinkRef GetNewConnection(){ CommunicationLinkRef xTemp = xmNewConnection; xmNewConnection.Clear(); return xTemp; }
-
-protected:
- virtual void SAL_CALL run();
-
-private:
- CommunicationManagerServerViaSocket* pMyServer;
- osl::AcceptorSocket* pAcceptorSocket;
- 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(); }
-
- // Diese beiden werden zum Transport der Connection vom Thread zum Mainthread verwendet.
- CommunicationLinkRef xmNewConnection;
- DECL_LINK( AddConnection, void* );
-};
-
-class CommunicationManagerClientViaSocket : public CommunicationManagerClient, CommonSocketFunctions
-{
-public:
- using CommunicationManager::StartCommunication;
-
- CommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel = sal_False );
- virtual ~CommunicationManagerClientViaSocket();
-
- 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;
- sal_uLong nPortToTalk;
-protected:
- virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx
deleted file mode 100644
index 5e4d19aae..000000000
--- a/automation/inc/automation/simplecm.hxx
+++ /dev/null
@@ -1,339 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SIMPLECM_HXX
-#define _SIMPLECM_HXX
-
-#include <tools/link.hxx>
-#include <tools/string.hxx>
-#include <tools/stream.hxx>
-#include <osl/socket.hxx>
-#include <tools/debug.hxx>
-#include <tools/datetime.hxx>
-
-#include <automation/commdefines.hxx>
-
-// CM steht f�r CommunicationManager
-#define CM_UNLIMITED_CONNECTIONS 0xffff
-
-typedef sal_uInt16 CM_NameType;
-#define CM_DOTTED ( (CM_NameType) 01 )
-#define CM_FQDN ( (CM_NameType) 02 )
-
-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 )
-#define CM_VERBOSE_TEXT ( (CM_InfoType) 03 )
-
-#define CM_OPEN ( (CM_InfoType) 0x0004 )
-#define CM_CLOSE ( (CM_InfoType) 0x0008 )
-#define CM_RECEIVE ( (CM_InfoType) 0x0010 )
-#define CM_SEND ( (CM_InfoType) 0x0020 )
-#define CM_ERROR ( (CM_InfoType) 0x0040 )
-#define CM_MISC ( (CM_InfoType) 0x0080 )
-
-#define CM_USER_1 ( (CM_InfoType) 0x0100 )
-#define CM_USER_2 ( (CM_InfoType) 0x0200 )
-#define CM_USER_3 ( (CM_InfoType) 0x0400 )
-#define CM_USER_4 ( (CM_InfoType) 0x0800 )
-
-#define CM_ALL ( CM_OPEN | CM_CLOSE | CM_RECEIVE | CM_SEND | CM_ERROR | CM_MISC )
-#define CM_NONE ( 0 )
-
-#define CByteString( constAsciiStr ) ByteString( RTL_CONSTASCII_STRINGPARAM ( constAsciiStr ) )
-
-#define INFO_MSG( Short, Long, Type, CLink ) \
-{ \
- if ( (Type & GetInfoType()) > 0 ) \
- { \
- switch ( GetInfoType() & 03 ) \
- { \
- case CM_NO_TEXT: \
- { \
- ByteString aByteString; \
- CallInfoMsg( InfoString( aByteString, Type, CLink ) ); \
- } \
- break; \
- case CM_SHORT_TEXT: \
- { \
- ByteString aByteString( Short ); \
- CallInfoMsg( InfoString( aByteString, Type, CLink ) ); \
- } \
- break; \
- case CM_VERBOSE_TEXT: \
- { \
- ByteString aByteString( Long ); \
- CallInfoMsg( InfoString( aByteString, Type, CLink ) ); \
- } \
- break; \
- default: \
- break; \
- } \
- } \
-}\
-
-class CommunicationLink;
-
-SV_DECL_REF( CommunicationLink )
-
-class InfoString : public ByteString
-{
-public:
- InfoString( ByteString &nMsg, CM_InfoType nIT, CommunicationLink *pCL = NULL ): ByteString( nMsg ), nInfoType( nIT ), pCommLink( pCL ) {;}
- CM_InfoType GetInfoType(){ return nInfoType; }
- CommunicationLinkRef GetCommunicationLink(){ return pCommLink; }
-private:
- CM_InfoType nInfoType;
- CommunicationLinkRef pCommLink;
-};
-
-class PacketHandler;
-class CommunicationManager;
-class MultiCommunicationManager;
-class CommunicationManagerServerAcceptThread;
-class CommunicationLink : public SvRefBase
-{
-protected:
- friend class CommunicationManager;
- friend class MultiCommunicationManager;
- friend class CommunicationManagerServerAcceptThread;
- // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks
-
-protected: // so da� nur �ber Ref gel�scht werden kann
- virtual ~CommunicationLink();
- void InvalidateManager() { pMyManager = NULL; }
-
- PacketHandler* pPacketHandler;
-
-public:
- CommunicationLink( CommunicationManager *pMan );
-
- 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
- virtual ByteString GetCommunicationPartner( CM_NameType eType )=0;
-
-// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren
- virtual ByteString GetMyName( CM_NameType eType )=0;
-
-// Liefert einen neuen Stream zum Versenden von Daten.
- virtual SvStream* GetBestCommunicationStream()=0;
-
- /** will call virtual function DoTransferDataStream to do actual work
- Purpos is to allow housekeeping
- **/
- 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 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 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; }
-
- /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen.
- void FinishCallback(){ bIsInsideCallback = sal_False; }
-
- /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert
- virtual sal_Bool ReceiveDataStream(){ return sal_False; }
-
- /// Statistics
- DateTime GetStart() { return aStart; }
- sal_uLong GetTotalBytes() { return nTotalBytes; }
- DateTime GetLastAccess() { return aLastAccess; }
- const ByteString& GetApplication() { return maApplication; }
- virtual void SetApplication( const ByteString& aApp );
-
-protected:
- void CallInfoMsg( InfoString aMsg );
- CM_InfoType GetInfoType();
- CommunicationManager *pMyManager;
-// Diese Methoden werden im Main Kontext gerufen und an den Manager weitergereicht.
- virtual DECL_LINK( ConnectionClosed, void* = NULL );
- virtual DECL_LINK( DataReceived, void* = NULL );
-
- virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE );
-
- SvStream *pServiceData;
- sal_uInt16 nServiceProtocol;
- sal_uInt16 nServiceHeaderType;
-
- /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks.
- void StartCallback(){ bIsInsideCallback = sal_True; }
- sal_Bool bIsInsideCallback;
-
- virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL)=0;
-
- virtual sal_Bool ShutdownCommunication() = 0; /// Really stop the Communication
-
- /// Statistics
- DateTime aStart;
- sal_uLong nTotalBytes;
- DateTime aLastAccess;
-
-private:
- ByteString maApplication;
-
-#if OSL_DEBUG_LEVEL > 1
-public:
- // misc (debuging) purposes
- sal_Bool bFlag;
- sal_uLong nSomething;
-#endif
-
-};
-
-SV_IMPL_REF( CommunicationLink );
-
-class CommonSocketFunctions;
-class CommunicationManager
-{
- friend class CommunicationLink;
- friend class CommonSocketFunctions;
-public:
- CommunicationManager( sal_Bool bUseMultiChannel = sal_False );
- virtual ~CommunicationManager();
-
- 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 sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor
-
- 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; }
-
- void SetConnectionOpenedHdl( Link lConnectionOpened ){ mlConnectionOpened = lConnectionOpened; }
- void SetConnectionClosedHdl( Link lConnectionClosed ){ mlConnectionClosed = lConnectionClosed; }
- void SetDataReceivedHdl( Link lDataReceived ){ mlDataReceived = lDataReceived; }
- void SetInfoMsgHdl( Link lInfoMsg ){ mlInfoMsg = lInfoMsg; }
-
- void SetInfoType( CM_InfoType nIT ){ nInfoType = nIT; }
- CM_InfoType GetInfoType(){ return nInfoType; }
-
- sal_Bool IsMultiChannel(){ return bIsMultiChannel; }
- void SetApplication( const ByteString& aApp, sal_Bool bRunningLinks = sal_False );
- const ByteString& GetApplication() { return maApplication; }
-
-protected:
- // Diese Methoden werden innerhalb gerufen. Sie erledigen eventuelles Housekeeping
- // und rufen dann die entsprechende Methode
- virtual void CallConnectionOpened( CommunicationLink* pCL );
- virtual void CallConnectionClosed( CommunicationLink* pCL );
- void CallDataReceived( CommunicationLink* pCL );
- void CallInfoMsg( InfoString aMsg );
-
- CM_InfoType nInfoType;
-
- // 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 ); }
-
- sal_Bool bIsCommunicationRunning;
-
- virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus
-
-private:
- ByteString maApplication;
- Link mlConnectionOpened;
- Link mlConnectionClosed;
- Link mlDataReceived;
- Link mlInfoMsg;
- CommunicationLinkRef xLastNewLink;
-
- sal_Bool bIsMultiChannel;
-};
-
-class ICommunicationManagerClient
-{
- friend class CommonSocketFunctions;
-protected:
- virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten
-};
-
-class TCPIO;
-class SimpleCommunicationLinkViaSocket : public CommunicationLink
-{
-public:
- virtual sal_Bool IsCommunicationError();
- virtual sal_Bool StopCommunication();
-
- virtual ByteString GetCommunicationPartner( CM_NameType eType );
- virtual ByteString GetMyName( CM_NameType eType );
- virtual SvStream* GetBestCommunicationStream();
- virtual void SetApplication( const ByteString& aApp );
-
-private:
- ByteString aCommunicationPartner;
- ByteString aMyName;
-
- TCPIO* pTCPIO;
- osl::StreamSocket* pStreamSocket;
-
-protected:
- SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket );
- virtual ~SimpleCommunicationLinkViaSocket();
-
- osl::StreamSocket* GetStreamSocket() { return pStreamSocket; }
- void SetStreamSocket( osl::StreamSocket* pSocket );
-
- SvStream *pReceiveStream;
- sal_Bool DoReceiveDataStream(); /// Recieve DataPacket from Socket
- virtual sal_Bool SendHandshake( HandshakeType aHandshakeType, SvStream* pData = NULL);
- sal_Bool bIsRequestShutdownPending;
- virtual void WaitForShutdown()=0;
- void SetNewPacketAsCurrent();
-};
-
-class CommonSocketFunctions
-{
-public:
- sal_Bool DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort );
-protected:
- virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, osl::ConnectorSocket* pCS )=0;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/makefile.mk b/automation/inc/makefile.mk
deleted file mode 100644
index 782b6a805..000000000
--- a/automation/inc/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# 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
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=automation
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/automation/inc/pch/precompiled_automation.cxx b/automation/inc/pch/precompiled_automation.cxx
deleted file mode 100644
index 0c5612989..000000000
--- a/automation/inc/pch/precompiled_automation.cxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_automation.hxx"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/pch/precompiled_automation.hxx b/automation/inc/pch/precompiled_automation.hxx
deleted file mode 100644
index 8f1227723..000000000
--- a/automation/inc/pch/precompiled_automation.hxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): Generated on 2006-09-01 17:49:30.061723
-
-#ifdef PRECOMPILED_HEADERS
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */