1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _RETSTRM_HXX
24 #define _RETSTRM_HXX
25 
26 #include <basic/sbxvar.hxx>
27 #include "cmdbasestream.hxx"
28 
29 class SvStream;
30 
31 class RetStream: public CmdBaseStream
32 {
33 
34 public:
35 	RetStream();
36 	~RetStream();
37 
38     using CmdBaseStream::GenError;
39 //  new
40 	void GenError( rtl::OString aUId, String aString );
41 
42     using CmdBaseStream::GenReturn;
GenReturn(comm_USHORT nRet,comm_ULONG nNr)43     void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );}
GenReturn(comm_USHORT nRet,rtl::OString aUId,comm_ULONG nNr)44 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );}
GenReturn(comm_USHORT nRet,rtl::OString aUId,comm_BOOL bBool)45     void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );}
46 
47 // MacroRecorder
GenReturn(comm_USHORT nRet,rtl::OString aUId,comm_USHORT nMethod)48     void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder
GenReturn(comm_USHORT nRet,rtl::OString aUId,comm_USHORT nMethod,comm_BOOL bBool)49 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );}
GenReturn(comm_USHORT nRet,rtl::OString aUId,comm_USHORT nMethod,comm_ULONG nNr)50 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
51 
52 //  new
53     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString );
54 	void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool );
55 
56 // needed for RemoteCommand and Profiling
57 	void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue );
58     void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString );
59 
60 // MacroRecorder
61     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString );
62     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool );
63 
64     void Reset();
65 	SvStream* GetStream();
66 
67 
68 
69     using CmdBaseStream::Write;
Write(comm_USHORT nNr)70     void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );}
Write(comm_ULONG nNr)71     void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );}
Write(comm_BOOL bBool)72 	void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );}
73 //  new
74 	void Write( SbxValue &aValue );
75 
76 // Complex Datatypes to be handled system dependent
77 	virtual void Write( rtl::OString* pId );
78     virtual void Write( String *pString );
79 
80 	SvStream *pSammel;
81 };
82 
83 #endif
84