/***************************************************************************
                            kde_KConfig.h -  description
                             -------------------
    begin                : Sun Nov 24 16:54:36 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Nov 24 16:54:36 2002, using kalyptus 0.9.
 ***************************************************************************/

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

#ifndef KDE_KCONFIG
#define KDE_KCONFIG

#include <qtc/qtc_types.h>

#include <kdec/kde_types.h>

/**
* @deprecated Use KProtocolManager::defaultUserAgent() instead. 
 @short * @deprecated Use KProtocolManager::defaultUserAgent() instead.
*/

/** *
 Constructs a KConfig object.

*/
kde_KConfig * kde_new_KConfig(qt_QString * fileName, int bReadOnly, int bUseKDEGlobals, char* resType);

/** *
 Destructs the KConfig object.

 Writes back any dirty configuration entries, and destroys
 dynamically created objects.
   
*/
void kde_del_KConfig( kde_KConfig* p );

/** *
 Clears all entries out of the @p dirtyEntryMap, so the
 values will not be written to disk on a later call to
 @ref sync().

*/
void kde_KConfig_rollback(kde_KConfig* instPointer,int bDeep);

/** *
 Returns a list of groups that are known.

*/
qt_QStringList* kde_KConfig_groupList(kde_KConfig* instPointer);

/** *
 Clears all internal data structures and then reread
 configuration information from disk.
   
*/
void kde_KConfig_reparseConfiguration(kde_KConfig* instPointer);

/** *
 Set the file mode for newly created files.

*/
void kde_KConfig_setFileWriteMode(kde_KConfig* instPointer,int mode);

/** *
 Forces all following write-operations being performed on kdeglobals,
 independent of the bGlobal flag in writeEntry().

*/
void kde_KConfig_setForceGlobal(kde_KConfig* instPointer,int force);

/** *
 Returns true if all entries are being written into kdeglobals.

*/
int kde_KConfig_forceGlobal(kde_KConfig* instPointer);

/** *
 Checks whether the config file contains the update @p id
 as contained in @p updateFile. If not, it runs kconf_update
 to update the config file.

 If you install config update files with critical fixes
 you may wish to use this method to verify that a critical
 update has indeed been performed to catch the case where
 a user restores an old config file from backup that has
 not been updated yet.

*/
void kde_KConfig_checkUpdate(kde_KConfig* instPointer,qt_QString * identifier, qt_QString * updateFile);

/** *
 Returns true if the specified group is known.

*/
int kde_KConfig_internalHasGroup(kde_KConfig* instPointer,qt_QCString* group);

/** *
 Returns a map (tree) of the entries in the specified group.

 Do not use this function, the implementation / return type are
 subject to change.

   
*/
//kde_KEntryMap* kde_KConfig_internalEntryMap(kde_KConfig* instPointer,qt_QString * pGroup);

/** *
 Returns a copy of the internal map used to hold all entries.

 Do not use this function, the implementation / return type are
 subject to change.

   
*/
//kde_KEntryMap* kde_KConfig_internalEntryMap1(kde_KConfig* instPointer);

/** *
 Inserts a (key, value) pair into the internal storage mechanism of
 the configuration object.

*/
void kde_KConfig_putData(kde_KConfig* instPointer,kde_KEntryKey* _key, kde_KEntry* _data, int _checkGroup);

/** *
 Looks up an entry in the config object's internal structure.

*/
kde_KEntry* kde_KConfig_lookupData(kde_KConfig* instPointer,kde_KEntryKey* _key);
void kde_KConfig_virtual_hook(kde_KConfig* instPointer,int identifier, void* data);

#endif
