xref: /aoo41x/main/sot/source/sdstor/stgole.hxx (revision bbfc4cc7)
1*bbfc4cc7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*bbfc4cc7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*bbfc4cc7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*bbfc4cc7SAndrew Rist  * distributed with this work for additional information
6*bbfc4cc7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*bbfc4cc7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*bbfc4cc7SAndrew Rist  * "License"); you may not use this file except in compliance
9*bbfc4cc7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*bbfc4cc7SAndrew Rist  *
11*bbfc4cc7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*bbfc4cc7SAndrew Rist  *
13*bbfc4cc7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*bbfc4cc7SAndrew Rist  * software distributed under the License is distributed on an
15*bbfc4cc7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*bbfc4cc7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*bbfc4cc7SAndrew Rist  * specific language governing permissions and limitations
18*bbfc4cc7SAndrew Rist  * under the License.
19*bbfc4cc7SAndrew Rist  *
20*bbfc4cc7SAndrew Rist  *************************************************************/
21*bbfc4cc7SAndrew Rist 
22*bbfc4cc7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SDSTOR_STGOLE_HXX
25cdf0e10cSrcweir #define _SDSTOR_STGOLE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <string.h> // memset()
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "sot/stg.hxx"
30cdf0e10cSrcweir #include "stgelem.hxx"
31cdf0e10cSrcweir 
32cdf0e10cSrcweir class StgInternalStream : public SvStream
33cdf0e10cSrcweir {
34cdf0e10cSrcweir     BaseStorageStream* pStrm;
35cdf0e10cSrcweir 	virtual sal_uLong GetData( void* pData, sal_uLong nSize );
36cdf0e10cSrcweir     virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
37cdf0e10cSrcweir     virtual sal_uLong SeekPos( sal_uLong nPos );
38cdf0e10cSrcweir     virtual void  FlushData();
39cdf0e10cSrcweir public:
40cdf0e10cSrcweir     StgInternalStream( BaseStorage&, const String&, sal_Bool );
41cdf0e10cSrcweir    ~StgInternalStream();
42cdf0e10cSrcweir 	void Commit();
43cdf0e10cSrcweir };
44cdf0e10cSrcweir 
45cdf0e10cSrcweir // standard stream "\1CompObj"
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class StgCompObjStream : public StgInternalStream
48cdf0e10cSrcweir {
49cdf0e10cSrcweir 	ClsId  aClsId;
50cdf0e10cSrcweir 	String aUserName;
51cdf0e10cSrcweir 	sal_uLong  nCbFormat;
52cdf0e10cSrcweir public:
53cdf0e10cSrcweir     StgCompObjStream( BaseStorage&, sal_Bool );
GetClsId()54cdf0e10cSrcweir 	ClsId&  GetClsId()    { return aClsId;    }
GetUserName()55cdf0e10cSrcweir 	String& GetUserName() { return aUserName; }
GetCbFormat()56cdf0e10cSrcweir 	sal_uLong&  GetCbFormat() { return nCbFormat; }
57cdf0e10cSrcweir 	sal_Bool    Load();
58cdf0e10cSrcweir 	sal_Bool    Store();
59cdf0e10cSrcweir };
60cdf0e10cSrcweir 
61cdf0e10cSrcweir // standard stream "\1Ole"
62cdf0e10cSrcweir 
63cdf0e10cSrcweir class StgOleStream : public StgInternalStream
64cdf0e10cSrcweir {
65cdf0e10cSrcweir 	sal_uInt32 nFlags;
66cdf0e10cSrcweir public:
67cdf0e10cSrcweir     StgOleStream( BaseStorage&, sal_Bool );
GetFlags()68cdf0e10cSrcweir 	sal_uInt32& GetFlags() { return nFlags; }
69cdf0e10cSrcweir 	sal_Bool Load();
70cdf0e10cSrcweir 	sal_Bool Store();
71cdf0e10cSrcweir };
72cdf0e10cSrcweir 
73cdf0e10cSrcweir #endif
74