xref: /trunk/main/tools/inc/bootstrp/inimgr.hxx (revision 8b851043)
1*8b851043SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*8b851043SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*8b851043SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*8b851043SAndrew Rist  * distributed with this work for additional information
6*8b851043SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*8b851043SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*8b851043SAndrew Rist  * "License"); you may not use this file except in compliance
9*8b851043SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*8b851043SAndrew Rist  *
11*8b851043SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*8b851043SAndrew Rist  *
13*8b851043SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*8b851043SAndrew Rist  * software distributed under the License is distributed on an
15*8b851043SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*8b851043SAndrew Rist  * KIND, either express or implied.  See the License for the
17*8b851043SAndrew Rist  * specific language governing permissions and limitations
18*8b851043SAndrew Rist  * under the License.
19*8b851043SAndrew Rist  *
20*8b851043SAndrew Rist  *************************************************************/
21*8b851043SAndrew Rist 
22*8b851043SAndrew Rist 
23cdf0e10cSrcweir #ifndef _INIMGR_HXX
24cdf0e10cSrcweir #define _INIMGR_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <tools/fsys.hxx>
27cdf0e10cSrcweir #include <tools/string.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir /*****************************************************************************
30cdf0e10cSrcweir Purpose: Allows to work on a local set of initialisation files
31cdf0e10cSrcweir If Update is used, the user must ensure that only one set of
32cdf0e10cSrcweir Source and Destination Dir is used. Otherwise ForceUpdate has to be used
33cdf0e10cSrcweir *****************************************************************************/
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class IniManager
36cdf0e10cSrcweir {
37cdf0e10cSrcweir private:
38cdf0e10cSrcweir 	sal_Bool bUpdate;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 	ByteString sGlobalDir;   	/// holds the org. ini dir
41cdf0e10cSrcweir 	ByteString sLocalPath;		/// holds path of local ini dir
42cdf0e10cSrcweir 
43cdf0e10cSrcweir public:
44cdf0e10cSrcweir 	IniManager( ByteString &rDir, ByteString &rLocalDir );
45cdf0e10cSrcweir 	IniManager( ByteString &rDir );
46cdf0e10cSrcweir 	IniManager();
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	ByteString ToLocal( ByteString &rPath );
49cdf0e10cSrcweir 	void Update();			/// Call ForceUpdate the First Time called
50cdf0e10cSrcweir 	void ForceUpdate();
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	static ByteString GetLocalIni();
53cdf0e10cSrcweir 	static ByteString GetGlobalIni();
54cdf0e10cSrcweir };
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #endif
57cdf0e10cSrcweir 
58