/***************************************************************************
                            KConfigINIBackEnd.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

 Class for KDE INI-style configuration file loading/saving.

 @author Preston Brown <pbrown@kde.org>,
         Matthias Kalle Dalheimer <kalle@kde.org>

 @version $Id: KConfigINIBackEnd.java,v 1.5 2002/01/31 04:48:56 rdale Exp $
 
 @short 
 Class for KDE INI-style configuration file loading/saving.
*/
public class KConfigINIBackEnd extends KConfigBackEnd  {
	protected KConfigINIBackEnd(Class dummy){super((Class) null);}

	private native void newKConfigINIBackEnd( KConfigBase _config, String _fileName, String _resType, boolean _useKDEGlobals);

/** 
 Constructs an ini-style configuration back end.

*/
	public KConfigINIBackEnd( KConfigBase _config, String _fileName, String _resType, boolean _useKDEGlobals) {
		super((Class) null);
		newKConfigINIBackEnd( _config, _fileName, _resType, _useKDEGlobals);
	}
	private native void newKConfigINIBackEnd( KConfigBase _config, String _fileName, String _resType);
	public KConfigINIBackEnd( KConfigBase _config, String _fileName, String _resType) {
		super((Class) null);
		newKConfigINIBackEnd( _config, _fileName, _resType);
	}

/** 
 Destructs the configuration backend.
   
*/
	protected native void finalize() throws InternalError;
	public native void dispose();
	public native boolean isDisposed();

/** 
 Parses all INI-style configuration files for a config object.

*/
	public native boolean parseConfigFiles();

/** 
 Writes configuration data to file(s).
   
*/
	public native void sync( boolean bMerge);
	public native void sync();

/** 
 Parses one configuration file.

*/
//	protected native void parseSingleConfigFile( QFile rFile, KEntryMap pWriteBackMap, boolean bGlobal, boolean bDefault);
	protected native void parseSingleConfigFile( QFile rFile);

/** 
 Writes configuration file back.

*/
	protected native boolean writeConfigFile( String filename, boolean bGlobal, boolean bMerge);
	protected native boolean writeConfigFile( String filename);
}
