/***************************************************************************
                            kde_DCOPObject.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_DCOPObject.h"
}

#include <dcopobject.h>

class DCOPObjectBridge : public DCOPObject
{
public:
	DCOPObjectBridge() : DCOPObject() {}
	DCOPObjectBridge(QObject* obj) : DCOPObject(obj) {}
	DCOPObjectBridge(const QCString& objId) : DCOPObject(objId) {}
	~DCOPObjectBridge() {}
};

kde_DCOPObject * kde_new_DCOPObject(){
	return (kde_DCOPObject *) new DCOPObjectBridge();
}
kde_DCOPObject * kde_new_DCOPObject1(qt_QObject * obj){
	return (kde_DCOPObject *) new DCOPObjectBridge((QObject*)obj);
}
kde_DCOPObject * kde_new_DCOPObject2(qt_QCString* objId){
	return (kde_DCOPObject *) new DCOPObjectBridge((QCString&)* (QCString*)objId);
}
void kde_del_DCOPObject( kde_DCOPObject* p ){
	delete (DCOPObjectBridge*) p;
}
qt_QCString* kde_DCOPObject_objId( kde_DCOPObject* instPointer){
	return (qt_QCString*)new QCString(((DCOPObjectBridge*)instPointer)->objId());
}
int kde_DCOPObject_setObjId( kde_DCOPObject* instPointer,qt_QCString* objId){
	return (int) ((DCOPObjectBridge*)instPointer)->setObjId((QCString&)* (QCString*)objId);
}
int kde_DCOPObject_process( kde_DCOPObject* instPointer,qt_QCString* fun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData){
	return (int) ((DCOPObjectBridge*)instPointer)->process((QCString&)* (QCString*)fun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
}
int kde_DCOPObject_processDynamic( kde_DCOPObject* instPointer,qt_QCString* fun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData){
	return (int) ((DCOPObjectBridge*)instPointer)->processDynamic((QCString&)* (QCString*)fun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
}
kde_QCStringList* kde_DCOPObject_functionsDynamic( kde_DCOPObject* instPointer){
	return (kde_QCStringList*)new QCStringList(((DCOPObjectBridge*)instPointer)->functionsDynamic());
}
kde_QCStringList* kde_DCOPObject_interfacesDynamic( kde_DCOPObject* instPointer){
	return (kde_QCStringList*)new QCStringList(((DCOPObjectBridge*)instPointer)->interfacesDynamic());
}
kde_QCStringList* kde_DCOPObject_interfaces( kde_DCOPObject* instPointer){
	return (kde_QCStringList*)new QCStringList(((DCOPObjectBridge*)instPointer)->interfaces());
}
kde_QCStringList* kde_DCOPObject_functions( kde_DCOPObject* instPointer){
	return (kde_QCStringList*)new QCStringList(((DCOPObjectBridge*)instPointer)->functions());
}
void kde_DCOPObject_emitDCOPSignal( kde_DCOPObject* instPointer,qt_QCString* signal, qt_QByteArray* data){
	((DCOPObjectBridge*)instPointer)->emitDCOPSignal((QCString&)* (QCString*)signal, (QByteArray&)* (QByteArray*)data);
	return;
}
int kde_DCOPObject_connectDCOPSignal( kde_DCOPObject* instPointer,qt_QCString* sender, qt_QCString* senderObj, qt_QCString* signal, qt_QCString* slot, int Volatile){
	return (int) ((DCOPObjectBridge*)instPointer)->connectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)senderObj, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)slot, (bool)Volatile);
}
int kde_DCOPObject_disconnectDCOPSignal( kde_DCOPObject* instPointer,qt_QCString* sender, qt_QCString* senderObj, qt_QCString* signal, qt_QCString* slot){
	return (int) ((DCOPObjectBridge*)instPointer)->disconnectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)senderObj, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)slot);
}
int kde_DCOPObject_hasObject( qt_QCString* objId){
	return (int) DCOPObjectBridge::hasObject((QCString&)* (QCString*)objId);
}
kde_DCOPObject* kde_DCOPObject_find( qt_QCString* objId){
	return (kde_DCOPObject*) DCOPObjectBridge::find((QCString&)* (QCString*)objId);
}
qt_QCString* kde_DCOPObject_objectName( qt_QObject * obj){
	return (qt_QCString*)new QCString(DCOPObjectBridge::objectName((QObject*)obj));
}
