/***************************************************************************
                            kde_KServiceTypeProfile.h -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 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_KSERVICETYPEPROFILE
#define KDE_KSERVICETYPEPROFILE

#include <qtc/qtc_types.h>

#include <kdec/kde_types.h>

/**

 This class holds the offers for a service type
 (e.g. in old terms "the bindings for a mimetype")
 
 @short 
 This class holds the offers for a service type
 (e.
*/
void kde_del_KServiceTypeProfile( kde_KServiceTypeProfile* p );

/** 

*/
int kde_KServiceTypeProfile_preference(kde_KServiceTypeProfile* instPointer,qt_QString * _service);
int kde_KServiceTypeProfile_allowAsDefault(kde_KServiceTypeProfile* instPointer,qt_QString * _service);
//kde_OfferList* kde_KServiceTypeProfile_offers(kde_KServiceTypeProfile* instPointer);

/** 

 preferredService(m,true) is equivalent to preferredService(m,"Application")
 preferredService(m,false) is equivalent to preferredService(m,QString::null)
 This call allows e.g. preferredService(m,"KParts/ReadOnlyPart").
   
*/
//kde_KService_Ptr* kde_KServiceTypeProfile_preferredService( qt_QString * serviceType, qt_QString * genericServiceType);

/** 

*/
kde_KServiceTypeProfile* kde_KServiceTypeProfile_serviceTypeProfile( qt_QString * servicetype, qt_QString * genericServiceType);

/** 

 If @p genericServiceType is specified a list is returned with 
 the offers associated with the combination of the two service types.
 This is almost like an "foo in ServiceTypes" constraint in the Trader,
 but the difference is that to order the offers, we will look at entries
 specifically for those two service types. Typically, this is used for
 getting the list of embeddable components that can handle a given mimetype.
 In that case, @p servicetype is the mimetype and @p genericServiceType is "KParts/ReadOnlyPart".
   
*/
kde_OfferList* kde_KServiceTypeProfile_offers1( qt_QString * servicetype, qt_QString * genericServiceType);

/** 
 Clear all cached information
   
*/
void kde_KServiceTypeProfile_clear( );

/** 
 This method activates a special mode of KServiceTypeProfile, in which all/all
 and all/allfiles are excluded from the results of the queries.
 It is meant for the configuration module _only_. @internal.
   
*/
void kde_KServiceTypeProfile_setConfigurationMode( );

/**  @internal 
*/
int kde_KServiceTypeProfile_configurationMode( );

/** 
 Constructor is called when the user profile is read for the
 first time.
   
*/
kde_KServiceTypeProfile * kde_new_KServiceTypeProfile(qt_QString * _servicetype, qt_QString * _genericServiceType);

/** 
 Add a service to this profile.
   
*/
void kde_KServiceTypeProfile_addService(kde_KServiceTypeProfile* instPointer,qt_QString * _service, int _preference, int _allow_as_default);

#endif
