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 __MNSINIPARSER_HXX__
24 #define __MNSINIPARSER_HXX__
25 
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/io/IOException.hpp>
28 #include <osl/process.h>
29 using namespace rtl;
30 
31 #include <map>
32 #include <list>
33 
34 #if OSL_DEBUG_LEVEL > 0
35 #include <stdio.h>
36 #endif
37 
38 struct ini_NameValue
39 {
40     rtl::OUString sName;
41     rtl::OUString sValue;
42 
43     inline ini_NameValue() SAL_THROW( () )
44         {}
ini_NameValueini_NameValue45     inline ini_NameValue(
46         OUString const & name, OUString const & value ) SAL_THROW( () )
47         : sName( name ),
48           sValue( value )
49         {}
50 };
51 
52 typedef std::list<
53     ini_NameValue
54 > NameValueList;
55 
56 struct ini_Section
57 {
58     rtl::OUString sName;
59     NameValueList lList;
60 };
61 typedef std::map<rtl::OUString,
62                 ini_Section
63                 >IniSectionMap;
64 
65 
66 class IniParser
67 {
68     IniSectionMap mAllSection;
69 public:
getAllSection()70     IniSectionMap * getAllSection(){return &mAllSection;};
71     IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException );
72 #if OSL_DEBUG_LEVEL > 0
73     void Dump();
74 #endif
75 
76 };
77 
78 #endif
79 
80