diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 17:20:27 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 17:20:27 +0000 |
commit | 2be34a60988acfe30a8ead74dcfde5355ae307fe (patch) | |
tree | 8f8338f53d9020a80c008ef721d63ef9df401ae5 /automation/inc | |
parent | dc8c9a4bf5fd7749bb95427cadf8544f85c833a9 (diff) |
INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED
2006/12/12 15:45:22 vg 1.1.2.1: #i72503# moved from ./..
Diffstat (limited to 'automation/inc')
-rw-r--r-- | automation/inc/automation/automation.hxx | 60 | ||||
-rw-r--r-- | automation/inc/automation/commdefines.hxx | 158 | ||||
-rw-r--r-- | automation/inc/automation/commtypes.hxx | 108 |
3 files changed, 326 insertions, 0 deletions
diff --git a/automation/inc/automation/automation.hxx b/automation/inc/automation/automation.hxx new file mode 100644 index 000000000000..a42978fead24 --- /dev/null +++ b/automation/inc/automation/automation.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: automation.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 18:20:08 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#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 diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx new file mode 100644 index 000000000000..1565f6636098 --- /dev/null +++ b/automation/inc/automation/commdefines.hxx @@ -0,0 +1,158 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: commdefines.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 18:20:17 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +/************************************************************************* + * + * 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> +#ifndef _OSL_ENDIAN_H_ +#include <osl/endian.h> +#endif + +#ifndef MAKEDWORD +#define MAKEDWORD(wl, wh) ((comm_DWORD)((wl) & 0xFFFF) | (((comm_DWORD)(wh) & 0xFFFF) << 16)) +#endif +#ifndef LOWORD +#define LOWORD(d) ((comm_WORD)((comm_DWORD)(d) & 0xFFFF)) +#endif +#ifndef HIWORD +#define HIWORD(d) ((comm_WORD)(((comm_DWORD)(d) >> 16) & 0xFFFF)) +#endif +#ifndef MAKEWORD +#define MAKEWORD(bl, bh) ((comm_WORD)((bl) & 0xFF) | (((comm_WORD)(bh) & 0xFF) << 8)) +#endif +#ifndef LOBYTE +#define LOBYTE(w) ((comm_BYTE)((comm_WORD)(w) & 0xFF)) +#endif +#ifndef HIBYTE +#define HIBYTE(w) ((comm_BYTE)(((comm_WORD)(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) (comm_WORD)(w) +#endif +#ifndef NETDWORD +#define NETDWORD(d) (comm_DWORD)(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 enthlt in den ersten 4 Byte die Lngenangabe und in den Darauffolgenden die Daten + Die Lngenangabe bezieht sich nur auf die Daten ohne die Lngenangabe selbst. + + Die Zweite Art von Datenpaketen enthlt Header mit weitere Informationen + wie unten beschrieben. + + Umgeschaltet wird mit dem Boolean bUseMultiChannel im Konstruktor des Managers. +**/ +/** +Defines fr Header Typen: + +Allgemeiner Header: + Byte Lnge Inhalt + 0..3 4 Lnge des Paketes ohne diese 4 Byte + 4 1 Prfsumme ber die Lnge. Stimmt sie nicht wird die Verbindung geschlossen + 5..6 2 Lnge 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_USHORT HandshakeType; +typedef comm_USHORT 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 + diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx new file mode 100644 index 000000000000..cfaca5db93fd --- /dev/null +++ b/automation/inc/automation/commtypes.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: commtypes.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 18:20:27 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +/************************************************************************* + * + * 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! + * Eather including apropriate files or defining the types when not available in the environment + * + ************************************************************************/ + +/** defines al least types + comm_BYTE + comm_WORD; + comm_DWORD; + comm_BOOL + comm_ULONG + comm_USHORT + comm_UINT16 + comm_UINT32 + comm_UniChar +**/ + +#ifndef _COMMTYPES_HXX +#define _COMMTYPES_HXX + +#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 + +//#define DBG_ASSERT( cond, text ) +//#define DBG_ERROR( text ) +#include <tools/debug.hxx> + +#include <tools/solar.h> +typedef BYTE comm_BYTE; +typedef 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_WORD; +typedef sal_uInt32 comm_DWORD; + +class SmartId; +class String; +#define comm_String String + +#endif |