/***************************************************************************
                            KSycoca.h -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 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 KSYCOCA_H
#define KSYCOCA_H

#include <Foundation/NSObject.h>
#include <Foundation/NSString.h>
#include <kdeobjc/DCOPObject.h>
#include <qtobjc/QObject.h>

/**


 Read-only SYstem COnfiguration CAche
 
 @short 

*/

@class QDataStream;

@interface KSycoca : QObject

/** 
 Read-only database
    
*/
- init;
- (void) dealloc;

/** 

 This is how factories get a stream to an entry
    
*/
//- (QDataStream*) findEntry: (int)offset type: (KSycocaType*)type;

/** 

    
*/
//- (QDataStream*) findFactory: (KSycocaFactoryId)identifier;

/** 

    
*/
- (NSString *) kfsstnd_prefixes;

/** 

    
*/
- (NSString *) language;

/** 

 The database contains all changes made _before_ this time and
 _might_ contain changes made after that.
    
*/
- (unsigned int) timeStamp;

/** 

    
*/
//- addFactory: (KSycocaFactory*)arg1;

/** 

*/
- (BOOL) isBuilding;
//- (k_dcop: /** * internal function for receiving kded/kbuildsycoca's signal, when the sycoca file changes */ ) notifyDatabaseChanged: (NSArray *)arg1;

/** 
 Get or create the only instance of KSycoca (read-only)
    
*/
+ (KSycoca*) self;

/** 
 Determine relative path for a .desktop file from a full path and a resource name
    
*/
+ (NSString *) determineRelativePath: (NSString *)_fullpath _resource: (NSString *)_resource;

/** 
 When you receive a "databaseChanged" signal, you can query here if
 a change has occured in a specific resource type.

*/
+ (BOOL) isChanged: (NSString *)type;

/** 

 Building database
    
*/
- initWithBOOL: (BOOL)arg1;
- (BOOL) checkVersion: (BOOL)abortOnError;
- (BOOL) checkVersion;
- (BOOL) openDatabase: (BOOL)openDummyIfNotFound;
- (BOOL) openDatabase;
- closeDatabase;
@end

@interface KSycoca (DCOPObjectImplementation) <DCOPObjectInterface>
@end

/** Override these methods in subclasses of KSycoca to customise event handling behaviour */
@protocol KSycocaEventHandling
- childEvent:(QChildEvent*) arg1;
- customEvent:(QCustomEvent*) arg1;
- timerEvent:(QTimerEvent*) arg1;
@end


#endif
