1*3398c5b8SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3398c5b8SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3398c5b8SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3398c5b8SAndrew Rist * distributed with this work for additional information 6*3398c5b8SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3398c5b8SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3398c5b8SAndrew Rist * "License"); you may not use this file except in compliance 9*3398c5b8SAndrew Rist * with the License. You may obtain a copy of the License at 10*3398c5b8SAndrew Rist * 11*3398c5b8SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3398c5b8SAndrew Rist * 13*3398c5b8SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3398c5b8SAndrew Rist * software distributed under the License is distributed on an 15*3398c5b8SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3398c5b8SAndrew Rist * KIND, either express or implied. See the License for the 17*3398c5b8SAndrew Rist * specific language governing permissions and limitations 18*3398c5b8SAndrew Rist * under the License. 19*3398c5b8SAndrew Rist * 20*3398c5b8SAndrew Rist *************************************************************/ 21*3398c5b8SAndrew Rist 22*3398c5b8SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir /************************************************************************* 25cdf0e10cSrcweir * 26cdf0e10cSrcweir * ATTENTION 27cdf0e10cSrcweir * This file is intended to work inside and outside the StarOffice environment. 28cdf0e10cSrcweir * Only adaption of file commtypes.hxx should be necessary. Else it is a bug! 29cdf0e10cSrcweir * 30cdf0e10cSrcweir ************************************************************************/ 31cdf0e10cSrcweir 32cdf0e10cSrcweir #ifndef _CMDBASESTREAM_HXX_ 33cdf0e10cSrcweir #define _CMDBASESTREAM_HXX_ 34cdf0e10cSrcweir 35cdf0e10cSrcweir #include <automation/commtypes.hxx> 36cdf0e10cSrcweir #include "icommstream.hxx" 37cdf0e10cSrcweir 38cdf0e10cSrcweir class CmdBaseStream 39cdf0e10cSrcweir { 40cdf0e10cSrcweir protected: 41cdf0e10cSrcweir ICommStream* pCommStream; 42cdf0e10cSrcweir CmdBaseStream(); 43cdf0e10cSrcweir virtual ~CmdBaseStream(); 44cdf0e10cSrcweir 45cdf0e10cSrcweir public: 46cdf0e10cSrcweir 47cdf0e10cSrcweir void GenError( rtl::OString *pUId, comm_String *pString ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, comm_ULONG nNr ); 50cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr ); 51cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_String *pString ); 52cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_BOOL bBool ); 53cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_ULONG nNr, comm_String *pString, comm_BOOL bBool ); 54cdf0e10cSrcweir 55cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG nNr ); 56cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_String *pString ); 57cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL bBool ); 58cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, comm_USHORT nMethod, comm_USHORT nNr ); 59cdf0e10cSrcweir 60cdf0e10cSrcweir // MacroRecorder 61cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod ); // also used outside MacroRecorder 62cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString ); 63cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_String *pString, comm_BOOL bBool ); 64cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_BOOL bBool ); 65cdf0e10cSrcweir void GenReturn( comm_USHORT nRet, rtl::OString *pUId, comm_USHORT nMethod, comm_ULONG nNr ); 66cdf0e10cSrcweir 67cdf0e10cSrcweir void Read ( comm_USHORT &nNr ); 68cdf0e10cSrcweir void Read ( comm_ULONG &nNr ); 69cdf0e10cSrcweir void Read (comm_UniChar* &aString, comm_USHORT &nLenInChars ); 70cdf0e10cSrcweir void Read ( comm_BOOL &bBool ); 71cdf0e10cSrcweir comm_USHORT GetNextType(); 72cdf0e10cSrcweir 73cdf0e10cSrcweir void Write( comm_USHORT nNr ); 74cdf0e10cSrcweir void Write( comm_ULONG nNr ); 75cdf0e10cSrcweir void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ); 76cdf0e10cSrcweir void Write( comm_BOOL bBool ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir // Complex Datatypes to be handled system dependent 79cdf0e10cSrcweir virtual void Read ( comm_String *&pString ); 80cdf0e10cSrcweir virtual void Read ( rtl::OString* &pId ); 81cdf0e10cSrcweir 82cdf0e10cSrcweir virtual void Write( comm_String *pString ); 83cdf0e10cSrcweir virtual void Write( rtl::OString* pId ); 84cdf0e10cSrcweir }; 85cdf0e10cSrcweir 86cdf0e10cSrcweir #endif 87