/***************************************************************************
                            kde_KService.cpp -  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.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_KService.h"
}

#include <qpixmap.h>
#include <kservice.h>

class KServiceBridge : public KService
{
public:
	KServiceBridge(const QString& _name, const QString& _exec, const QString& _icon) : KService(_name, _exec, _icon) {}
	KServiceBridge(const QString& _fullpath) : KService(_fullpath) {}
	KServiceBridge(KDesktopFile* config) : KService(config) {}
	KServiceBridge(QDataStream& _str, int offset) : KService(_str, offset) {}
	~KServiceBridge() {}
	void protected_init(KDesktopFile* config) {
		KService::init(config);
		return;
	}
	QStringList & protected_accessServiceTypes() {
		return (QStringList &) KService::accessServiceTypes();
	}
};

kde_KService * kde_new_KService(qt_QString * _name, qt_QString * _exec, qt_QString * _icon){
	return (kde_KService *) new KServiceBridge((QString&)* (QString*)_name, (QString&)* (QString*)_exec, (QString&)* (QString*)_icon);
}
kde_KService * kde_new_KService1(qt_QString * _fullpath){
	return (kde_KService *) new KServiceBridge((QString&)* (QString*)_fullpath);
}
kde_KService * kde_new_KService2(kde_KDesktopFile* config){
	return (kde_KService *) new KServiceBridge((KDesktopFile*)config);
}
kde_KService * kde_new_KService3(qt_QDataStream * _str, int offset){
	return (kde_KService *) new KServiceBridge((QDataStream&)* (QDataStream*)_str, (int)offset);
}
void kde_del_KService( kde_KService* p ){
	delete (KServiceBridge*) p;
}
qt_QString * kde_KService_type( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->type());
}
qt_QString * kde_KService_name( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->name());
}
qt_QString * kde_KService_exec( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->exec());
}
qt_QString * kde_KService_library( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->library());
}
qt_QString * kde_KService_init( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->init());
}
qt_QString * kde_KService_icon( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->icon());
}
qt_QPixmap * kde_KService_pixmap( kde_KService* instPointer,int _group, int _force_size, int _state, qt_QString* _path){
	return (qt_QPixmap *)new QPixmap(((KServiceBridge*)instPointer)->pixmap((KIcon::Group)_group, (int)_force_size, (int)_state, (QString*)_path));
}
int kde_KService_terminal( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->terminal();
}
qt_QString * kde_KService_terminalOptions( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->terminalOptions());
}
int kde_KService_substituteUid( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->substituteUid();
}
qt_QString * kde_KService_username( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->username());
}
qt_QString * kde_KService_desktopEntryPath( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->desktopEntryPath());
}
qt_QString * kde_KService_desktopEntryName( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->desktopEntryName());
}
int kde_KService_DCOPServiceType( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->DCOPServiceType();
}
qt_QString * kde_KService_path( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->path());
}
qt_QString * kde_KService_comment( kde_KService* instPointer){
	return (qt_QString *)new QString(((KServiceBridge*)instPointer)->comment());
}
qt_QStringList* kde_KService_keywords( kde_KService* instPointer){
	return (qt_QStringList*)new QStringList(((KServiceBridge*)instPointer)->keywords());
}
qt_QStringList* kde_KService_serviceTypes( kde_KService* instPointer){
	return (qt_QStringList*)new QStringList(((KServiceBridge*)instPointer)->serviceTypes());
}
int kde_KService_hasServiceType( kde_KService* instPointer,qt_QString * _service){
	return (int) ((KServiceBridge*)instPointer)->hasServiceType((QString&)* (QString*)_service);
}
int kde_KService_allowAsDefault( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->allowAsDefault();
}
int kde_KService_allowMultipleFiles( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->allowMultipleFiles();
}
int kde_KService_initialPreference( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->initialPreference();
}
void kde_KService_setInitialPreference( kde_KService* instPointer,int i){
	((KServiceBridge*)instPointer)->setInitialPreference((int)i);
	return;
}
int kde_KService_noDisplay( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->noDisplay();
}
qt_QVariant * kde_KService_property( kde_KService* instPointer,qt_QString * _name){
	return (qt_QVariant *)new QVariant(((KServiceBridge*)instPointer)->property((QString&)* (QString*)_name));
}
qt_QStringList* kde_KService_propertyNames( kde_KService* instPointer){
	return (qt_QStringList*)new QStringList(((KServiceBridge*)instPointer)->propertyNames());
}
int kde_KService_isValid( kde_KService* instPointer){
	return (int) ((KServiceBridge*)instPointer)->isValid();
}
void kde_KService_load( kde_KService* instPointer,qt_QDataStream * arg1){
	((KServiceBridge*)instPointer)->load((QDataStream&)* (QDataStream*)arg1);
	return;
}
void kde_KService_save( kde_KService* instPointer,qt_QDataStream * arg1){
	((KServiceBridge*)instPointer)->save((QDataStream&)* (QDataStream*)arg1);
	return;
}
void * kde_KService_serviceByName( qt_QString * _name){
	return (void *) KServiceBridge::serviceByName((QString&)* (QString*)_name);
}
void * kde_KService_serviceByDesktopPath( qt_QString * _name){
	return (void *) KServiceBridge::serviceByDesktopPath((QString&)* (QString*)_name);
}
void * kde_KService_serviceByDesktopName( qt_QString * _name){
	return (void *) KServiceBridge::serviceByDesktopName((QString&)* (QString*)_name);
}
//kde_List kde_KService_allServices( ){
//	return (kde_List)new List(KServiceBridge::allServices());
//}
//kde_List kde_KService_allInitServices( ){
//	return (kde_List)new List(KServiceBridge::allInitServices());
//}
void kde_KService_init1( kde_KService* instPointer,kde_KDesktopFile* config){
	((KServiceBridge*)instPointer)->protected_init((KDesktopFile*)config);
	return;
}
qt_QStringList* kde_KService_accessServiceTypes( kde_KService* instPointer){
	return (qt_QStringList*) ( QStringList *)&((KServiceBridge*)instPointer)->protected_accessServiceTypes();
}
