summaryrefslogtreecommitdiff
path: root/automation/inc
diff options
context:
space:
mode:
Diffstat (limited to 'automation/inc')
-rw-r--r--automation/inc/automation/automation.hxx57
-rw-r--r--automation/inc/automation/commdefines.hxx149
-rw-r--r--automation/inc/automation/commtypes.hxx67
-rw-r--r--automation/inc/automation/communi.hxx184
-rw-r--r--automation/inc/automation/communidllapi.h44
-rw-r--r--automation/inc/automation/simplecm.hxx337
-rw-r--r--automation/inc/automation/simplecmdllapi.h44
-rw-r--r--automation/inc/automation/stsdllapi.h44
8 files changed, 0 insertions, 926 deletions
diff --git a/automation/inc/automation/automation.hxx b/automation/inc/automation/automation.hxx
deleted file mode 100644
index 8549bc777fa9..000000000000
--- a/automation/inc/automation/automation.hxx
+++ /dev/null
@@ -1,57 +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
-
-#include "automation/stsdllapi.h"
-
-class ImplRemoteControl;
-
-class STS_DLLPUBLIC 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 7b6d62b47b5c..000000000000
--- a/automation/inc/automation/commdefines.hxx
+++ /dev/null
@@ -1,149 +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
-
-/**
- There are two types of data packages:
- The first one contains in the first 4 bytes the length information and in the following the data.
- The length information refers to the data only, without the length information itself.
-
- The second type of data packages contains headers with further information as described below.
-
- It's switched with the Boolean bUseMultiChanell in the manager's constructor.
-**/
-/**
-Defines for header types:
-
-general header:
- bytes length content
- 0..3 4 the package's length without these 4 bytes
- 4 1 Checksum concerning the length. If it's incorrect, the connection is closed.
- 5..6 2 length of the header without these 2 bytes
- 7..8 2 type of the header
-
-CH_SimpleMultiChannel:
- 9..10 2 channel
-CH_Handshake Internal Use ONLY
- No further data!
-
-**/
-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) /// aks for alive reply
-#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// alive reply
-
-/**
- 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 88bf89c68ec8..000000000000
--- 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 14355124ecca..000000000000
--- a/automation/inc/automation/communi.hxx
+++ /dev/null
@@ -1,184 +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 "automation/communidllapi.h"
-
-#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 COMMUNI_DLLPUBLIC 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; /// CommunicationLinks that have not yet logged off themselves but already have received
- /// a StopCommunication or a ConnectionTerminated
- virtual void DestroyingLink( CommunicationLink *pCL );
-
- sal_Bool bGracefullShutdown;
-};
-
-class COMMUNI_DLLPUBLIC CommunicationManagerServer : public MultiCommunicationManager
-{
-public:
- CommunicationManagerServer( sal_Bool bUseMultiChannel = sal_False ):MultiCommunicationManager( bUseMultiChannel ){;}
-};
-
-class COMMUNI_DLLPUBLIC CommunicationManagerClient : public MultiCommunicationManager, public ICommunicationManagerClient
-{
-public:
- CommunicationManagerClient( sal_Bool bUseMultiChannel = sal_False );
-};
-
-class COMMUNI_DLLPUBLIC 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 );
-
- // These are virtual 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; // necessary because no event can be managed before the variable is set
- osl::Mutex aMDataReceived; // necessary because no event can be managed before the variable is set
- virtual void WaitForShutdown();
-
- DECL_LINK( ShutdownLink, void* );
- Timer aShutdownTimer;
- sal_Bool bShutdownStarted;
- sal_Bool bDestroying;
- Link mlPutDataReceived;
-};
-
-class COMMUNI_DLLPUBLIC 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 COMMUNI_DLLPUBLIC 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; // necessary because no event can be managed before the variable is set
- void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
- CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
-
- // these are used for the connection's transport from the thread to the mainthread
- CommunicationLinkRef xmNewConnection;
- DECL_LINK( AddConnection, void* );
-};
-
-class COMMUNI_DLLPUBLIC 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/communidllapi.h b/automation/inc/automation/communidllapi.h
deleted file mode 100644
index 7bec94a4ebbf..000000000000
--- a/automation/inc/automation/communidllapi.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com>
- * (initial developer)
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#ifndef INCLUDED_AUTOMATION_COMMUNIDLLAPI_H
-#define INCLUDED_AUTOMATION_COMMUNIDLLAPI_H
-
-#include <sal/types.h>
-
-#if defined(COMMUNI_DLLIMPLEMENTATION)
-#define COMMUNI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define COMMUNI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-#define COMMUNI_DLLPRIVATE SAL_DLLPRIVATE
-
-#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 cc735a9de99c..000000000000
--- a/automation/inc/automation/simplecm.hxx
+++ /dev/null
@@ -1,337 +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 "automation/simplecmdllapi.h"
-
-#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 stands for 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;
-// only one of these three defines may be used
-#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 SIMPLECM_DLLPUBLIC 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 SIMPLECM_DLLPUBLIC CommunicationLink : public SvRefBase
-{
-protected:
- friend class CommunicationManager;
- friend class MultiCommunicationManager;
- friend class CommunicationManagerServerAcceptThread;
- // may not be stopped between the stream's reception and the callback's end
-
-protected: // so that it can only be deleted via Ref
- 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; }
-
- virtual ByteString GetCommunicationPartner( CM_NameType eType )=0;
-
- virtual ByteString GetMyName( CM_NameType eType )=0;
-
- 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 );
-
- // delivers the ID that is named by the server
- // Due to that virtual communications over a physical link can be realised.
- // Because the communication must remain compatible to older versions the receiver must guess whether
- // the new or the old one is used because the order's head changes then
- sal_uInt16 GetProtocol(){ return nServiceProtocol; }
-
- // Commits the stream. The caller is responsible for the deletion.
- // The method must be called because there would be no further data received otherwise.
- SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; }
-
- /// Allows for the release of the next callbacks. Is also called implicitly.
- void FinishCallback(){ bIsInsideCallback = sal_False; }
-
- /// Synchronous reception of the data. Only for command line - empty implementation for other uses.
- 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;
-// These methods are called in the main context and are handed over to the manager.
- 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;
-
- /// Prevents the early release of the next callback.
- 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 SIMPLECM_DLLPUBLIC 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;
- virtual sal_Bool IsCommunicationRunning() { return bIsCommunicationRunning; }
-// virtual sal_Bool IsCommunicationError();
-
-
- virtual ByteString GetMyName( CM_NameType eType );
-
- virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // necessary for call in destructor
-
- virtual sal_uInt16 GetCommunicationLinkCount()=0;
- virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0;
-
- 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:
- // These methods are called inside. They care for housekeeping if applicable
- // and call the respective method then.
- virtual void CallConnectionOpened( CommunicationLink* pCL );
- virtual void CallConnectionClosed( CommunicationLink* pCL );
- void CallDataReceived( CommunicationLink* pCL );
- void CallInfoMsg( InfoString aMsg );
-
- CM_InfoType nInfoType;
-
- // These routines call the link or are overloaded.
- 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;
-
-private:
- ByteString maApplication;
- Link mlConnectionOpened;
- Link mlConnectionClosed;
- Link mlDataReceived;
- Link mlInfoMsg;
- CommunicationLinkRef xLastNewLink;
-
- sal_Bool bIsMultiChannel;
-};
-
-class SIMPLECM_DLLPUBLIC ICommunicationManagerClient
-{
- friend class CommonSocketFunctions;
-protected:
- virtual sal_Bool RetryConnect() { return sal_False; } // might be able to start the application
-};
-
-class TCPIO;
-class SIMPLECM_DLLPUBLIC 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 SIMPLECM_DLLPUBLIC 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/automation/simplecmdllapi.h b/automation/inc/automation/simplecmdllapi.h
deleted file mode 100644
index 2963ebb5c049..000000000000
--- a/automation/inc/automation/simplecmdllapi.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com>
- * (initial developer)
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#ifndef INCLUDED_AUTOMATION_SIMPLECMDLLAPI_H
-#define INCLUDED_AUTOMATION_SIMPLECMDLLAPI_H
-
-#include <sal/types.h>
-
-#if defined(SIMPLECM_DLLIMPLEMENTATION)
-#define SIMPLECM_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define SIMPLECM_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-#define SIMPLECM_DLLPRIVATE SAL_DLLPRIVATE
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/automation/inc/automation/stsdllapi.h b/automation/inc/automation/stsdllapi.h
deleted file mode 100644
index 56f4e483aec7..000000000000
--- a/automation/inc/automation/stsdllapi.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com>
- * (initial developer)
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#ifndef INCLUDED_AUTOMATION_STSDLLAPI_H
-#define INCLUDED_AUTOMATION_STSDLLAPI_H
-
-#include <sal/types.h>
-
-#if defined(STS_DLLIMPLEMENTATION)
-#define STS_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define STS_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-#define STS_DLLPRIVATE SAL_DLLPRIVATE
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */