bump product version to 4.2.0.1
[LibreOffice.git] / include / sax / fastparser.hxx
blobafd5add88b00cb12710185dbdb21d190418799d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SAX_FASTPARSER_HXX
21 #define INCLUDED_SAX_FASTPARSER_HXX
23 #include <com/sun/star/xml/sax/XFastParser.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <cppuhelper/implbase2.hxx>
27 #include <sax/fastsaxdllapi.h>
29 namespace com { namespace sun { namespace star { namespace xml { namespace sax {
31 class XFastContextHandler;
32 class XFastDocumentHandler;
33 class XFastTokenHandler;
35 }}}}}
37 namespace sax_fastparser {
39 // --------------------------------------------------------------------
41 class FastSaxParserImpl;
43 // This class implements the external Parser interface
44 class FASTSAX_DLLPUBLIC FastSaxParser
45 : public ::cppu::WeakImplHelper2<
46 ::com::sun::star::xml::sax::XFastParser,
47 ::com::sun::star::lang::XServiceInfo >
49 FastSaxParserImpl* mpImpl;
51 public:
52 FastSaxParser();
53 virtual ~FastSaxParser();
55 // The implementation details
56 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void);
58 // XFastParser
59 virtual void SAL_CALL parseStream( const ::com::sun::star::xml::sax::InputSource& aInputSource ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
60 virtual void SAL_CALL setFastDocumentHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastDocumentHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException);
61 virtual void SAL_CALL setTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException);
62 virtual void SAL_CALL registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
63 virtual OUString SAL_CALL getNamespaceURL( const OUString& rPrefix ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
64 virtual void SAL_CALL setErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XErrorHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException);
65 virtual void SAL_CALL setEntityResolver( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XEntityResolver >& Resolver ) throw (::com::sun::star::uno::RuntimeException);
66 virtual void SAL_CALL setLocale( const ::com::sun::star::lang::Locale& rLocale ) throw (::com::sun::star::uno::RuntimeException);
68 // XServiceInfo
69 virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
70 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
71 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
73 bool hasNamespaceURL( const OUString& rPrefix ) const;
78 #endif // _SAX_FASTPARSER_HXX_
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */