xref: /aoo4110/main/package/inc/CRC32.hxx (revision b1cdbd2c)
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 _CRC32_HXX
24 #define _CRC32_HXX
25 
26 #include <com/sun/star/uno/Sequence.h>
27 #include <com/sun/star/uno/RuntimeException.hpp>
28 
29 namespace com { namespace sun { namespace star {
30 	namespace io { class XInputStream; }
31 } } }
32 class CRC32
33 {
34 protected:
35 	sal_uInt32 nCRC;
36 public:
37 	CRC32();
38 	~CRC32();
39 
40 	sal_Int32 SAL_CALL updateStream (::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > & xStream)
41 		throw(::com::sun::star::uno::RuntimeException);
42 	void SAL_CALL updateSegment(const ::com::sun::star::uno::Sequence< sal_Int8 > &b, sal_Int32 off, sal_Int32 len)
43 		throw(::com::sun::star::uno::RuntimeException);
44 	void SAL_CALL update(const ::com::sun::star::uno::Sequence< sal_Int8 > &b)
45 		throw(::com::sun::star::uno::RuntimeException);
46 	sal_Int32 SAL_CALL getValue()
47 		throw(::com::sun::star::uno::RuntimeException);
48 	void SAL_CALL reset()
49 		throw(::com::sun::star::uno::RuntimeException);
50 };
51 
52 #endif
53