1*a2faadffSAndrew Rist /**************************************************************
2*a2faadffSAndrew Rist  *
3*a2faadffSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*a2faadffSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*a2faadffSAndrew Rist  * distributed with this work for additional information
6*a2faadffSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*a2faadffSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*a2faadffSAndrew Rist  * "License"); you may not use this file except in compliance
9*a2faadffSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*a2faadffSAndrew Rist  *
11*a2faadffSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*a2faadffSAndrew Rist  *
13*a2faadffSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*a2faadffSAndrew Rist  * software distributed under the License is distributed on an
15*a2faadffSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*a2faadffSAndrew Rist  * KIND, either express or implied.  See the License for the
17*a2faadffSAndrew Rist  * specific language governing permissions and limitations
18*a2faadffSAndrew Rist  * under the License.
19*a2faadffSAndrew Rist  *
20*a2faadffSAndrew Rist  *************************************************************/
21*a2faadffSAndrew Rist 
22*a2faadffSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef INCLUDED_CONFIGMGR_SOURCE_PARSEMANAGER_HXX
25cdf0e10cSrcweir #define INCLUDED_CONFIGMGR_SOURCE_PARSEMANAGER_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "sal/config.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "com/sun/star/container/NoSuchElementException.hpp"
30cdf0e10cSrcweir #include "com/sun/star/uno/RuntimeException.hpp"
31cdf0e10cSrcweir #include "rtl/ref.hxx"
32cdf0e10cSrcweir #include "sal/types.h"
33cdf0e10cSrcweir #include "salhelper/simplereferenceobject.hxx"
34cdf0e10cSrcweir #include "xmlreader/span.hxx"
35cdf0e10cSrcweir #include "xmlreader/xmlreader.hxx"
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace rtl { class OUString; }
38cdf0e10cSrcweir 
39cdf0e10cSrcweir namespace configmgr {
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class Parser;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class ParseManager: public salhelper::SimpleReferenceObject {
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir     ParseManager(
46cdf0e10cSrcweir         rtl::OUString const & url, rtl::Reference< Parser > const & parser)
47cdf0e10cSrcweir         SAL_THROW((
48cdf0e10cSrcweir             com::sun::star::container::NoSuchElementException,
49cdf0e10cSrcweir             com::sun::star::uno::RuntimeException));
50cdf0e10cSrcweir 
51cdf0e10cSrcweir     bool parse();
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     enum { NAMESPACE_OOR = 1, NAMESPACE_XS = 2, NAMESPACE_XSI = 3 };
54cdf0e10cSrcweir 
55cdf0e10cSrcweir private:
56cdf0e10cSrcweir     virtual ~ParseManager();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     xmlreader::XmlReader reader_;
59cdf0e10cSrcweir     rtl::Reference< Parser > parser_;
60cdf0e10cSrcweir     xmlreader::Span itemData_;
61cdf0e10cSrcweir     int itemNamespaceId_;
62cdf0e10cSrcweir };
63cdf0e10cSrcweir 
64cdf0e10cSrcweir }
65cdf0e10cSrcweir 
66cdf0e10cSrcweir #endif
67