/***************************************************************************
                            kde_DCOPClient.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_DCOPClient.h"
}

#include <dcopclient.h>

class DCOPClientBridge : public DCOPClient
{
public:
	DCOPClientBridge() : DCOPClient() {}
	~DCOPClientBridge() {}
	void protected_processSocketData(int socknum) {
		DCOPClient::processSocketData(socknum);
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "childEvent", arg1, "QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "customEvent", arg1, "QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "timerEvent", arg1, "QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};

kde_DCOPClient * kde_new_DCOPClient(){
	return (kde_DCOPClient *) new DCOPClientBridge();
}
void kde_del_DCOPClient( kde_DCOPClient* p ){
	delete (DCOPClientBridge*) p;
}
int kde_DCOPClient_attach( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->attach();
}
void kde_DCOPClient_bindToApp( kde_DCOPClient* instPointer){
	((DCOPClientBridge*)instPointer)->bindToApp();
	return;
}
int kde_DCOPClient_detach( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->detach();
}
int kde_DCOPClient_isAttached( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->isAttached();
}
int kde_DCOPClient_isAttachedToForeignServer( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->isAttachedToForeignServer();
}
int kde_DCOPClient_acceptCalls( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->acceptCalls();
}
void kde_DCOPClient_setAcceptCalls( kde_DCOPClient* instPointer,int b){
	((DCOPClientBridge*)instPointer)->setAcceptCalls((bool)b);
	return;
}
qt_QCString* kde_DCOPClient_registerAs( kde_DCOPClient* instPointer,qt_QCString* appId, int addPID){
	return (qt_QCString*)new QCString(((DCOPClientBridge*)instPointer)->registerAs((QCString&)* (QCString*)appId, (bool)addPID));
}
int kde_DCOPClient_isRegistered( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->isRegistered();
}
qt_QCString* kde_DCOPClient_appId( kde_DCOPClient* instPointer){
	return (qt_QCString*)new QCString(((DCOPClientBridge*)instPointer)->appId());
}
int kde_DCOPClient_socket( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->socket();
}
void kde_DCOPClient_suspend( kde_DCOPClient* instPointer){
	((DCOPClientBridge*)instPointer)->suspend();
	return;
}
void kde_DCOPClient_resume( kde_DCOPClient* instPointer){
	((DCOPClientBridge*)instPointer)->resume();
	return;
}
int kde_DCOPClient_send( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, qt_QCString* remFun, qt_QByteArray* data){
	return (int) ((DCOPClientBridge*)instPointer)->send((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (QCString&)* (QCString*)remFun, (QByteArray&)* (QByteArray*)data);
}
int kde_DCOPClient_send1( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, qt_QCString* remFun, qt_QString * data){
	return (int) ((DCOPClientBridge*)instPointer)->send((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (QCString&)* (QCString*)remFun, (QString&)* (QString*)data);
}
int kde_DCOPClient_call( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, qt_QCString* remFun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData, int useEventLoop){
	return (int) ((DCOPClientBridge*)instPointer)->call((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (QCString&)* (QCString*)remFun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData, (bool)useEventLoop);
}
int kde_DCOPClient_findObject( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, qt_QCString* remFun, qt_QByteArray* data, qt_QCString* foundApp, qt_QCString* foundObj, int useEventLoop){
	return (int) ((DCOPClientBridge*)instPointer)->findObject((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (QCString&)* (QCString*)remFun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)foundApp, (QCString&)* (QCString*)foundObj, (bool)useEventLoop);
}
void kde_DCOPClient_emitDCOPSignal( kde_DCOPClient* instPointer,qt_QCString* object, qt_QCString* signal, qt_QByteArray* data){
	((DCOPClientBridge*)instPointer)->emitDCOPSignal((QCString&)* (QCString*)object, (QCString&)* (QCString*)signal, (QByteArray&)* (QByteArray*)data);
	return;
}
void kde_DCOPClient_emitDCOPSignal1( kde_DCOPClient* instPointer,qt_QCString* signal, qt_QByteArray* data){
	((DCOPClientBridge*)instPointer)->emitDCOPSignal((QCString&)* (QCString*)signal, (QByteArray&)* (QByteArray*)data);
	return;
}
int kde_DCOPClient_connectDCOPSignal( kde_DCOPClient* instPointer,qt_QCString* sender, qt_QCString* senderObj, qt_QCString* signal, qt_QCString* receiverObj, qt_QCString* slot, int Volatile){
	return (int) ((DCOPClientBridge*)instPointer)->connectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)senderObj, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)receiverObj, (QCString&)* (QCString*)slot, (bool)Volatile);
}
int kde_DCOPClient_connectDCOPSignal1( kde_DCOPClient* instPointer,qt_QCString* sender, qt_QCString* signal, qt_QCString* receiverObj, qt_QCString* slot, int Volatile){
	return (int) ((DCOPClientBridge*)instPointer)->connectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)receiverObj, (QCString&)* (QCString*)slot, (bool)Volatile);
}
int kde_DCOPClient_disconnectDCOPSignal( kde_DCOPClient* instPointer,qt_QCString* sender, qt_QCString* senderObj, qt_QCString* signal, qt_QCString* receiverObj, qt_QCString* slot){
	return (int) ((DCOPClientBridge*)instPointer)->disconnectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)senderObj, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)receiverObj, (QCString&)* (QCString*)slot);
}
int kde_DCOPClient_disconnectDCOPSignal1( kde_DCOPClient* instPointer,qt_QCString* sender, qt_QCString* signal, qt_QCString* receiverObj, qt_QCString* slot){
	return (int) ((DCOPClientBridge*)instPointer)->disconnectDCOPSignal((QCString&)* (QCString*)sender, (QCString&)* (QCString*)signal, (QCString&)* (QCString*)receiverObj, (QCString&)* (QCString*)slot);
}
int kde_DCOPClient_process( kde_DCOPClient* instPointer,qt_QCString* fun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData){
	return (int) ((DCOPClientBridge*)instPointer)->process((QCString&)* (QCString*)fun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
}
//kde_DCOPClientTransaction* kde_DCOPClient_beginTransaction( kde_DCOPClient* instPointer){
//	return (kde_DCOPClientTransaction*) ((DCOPClientBridge*)instPointer)->beginTransaction();
//}
//void kde_DCOPClient_endTransaction( kde_DCOPClient* instPointer,kde_DCOPClientTransaction* arg1, qt_QCString* replyType, qt_QByteArray* replyData){
//	((DCOPClientBridge*)instPointer)->endTransaction((DCOPClientTransaction*)arg1, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
//	return;
//}
int kde_DCOPClient_transactionId( kde_DCOPClient* instPointer){
	return (int) ((DCOPClientBridge*)instPointer)->transactionId();
}
int kde_DCOPClient_isApplicationRegistered( kde_DCOPClient* instPointer,qt_QCString* remApp){
	return (int) ((DCOPClientBridge*)instPointer)->isApplicationRegistered((QCString&)* (QCString*)remApp);
}
kde_QCStringList* kde_DCOPClient_registeredApplications( kde_DCOPClient* instPointer){
	return (kde_QCStringList*)new QCStringList(((DCOPClientBridge*)instPointer)->registeredApplications());
}
kde_QCStringList* kde_DCOPClient_remoteObjects( kde_DCOPClient* instPointer,qt_QCString* remApp, int* ok){
	return (kde_QCStringList*)new QCStringList(((DCOPClientBridge*)instPointer)->remoteObjects((QCString&)* (QCString*)remApp, (bool*)ok));
}
kde_QCStringList* kde_DCOPClient_remoteInterfaces( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, int* ok){
	return (kde_QCStringList*)new QCStringList(((DCOPClientBridge*)instPointer)->remoteInterfaces((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (bool*)ok));
}
kde_QCStringList* kde_DCOPClient_remoteFunctions( kde_DCOPClient* instPointer,qt_QCString* remApp, qt_QCString* remObj, int* ok){
	return (kde_QCStringList*)new QCStringList(((DCOPClientBridge*)instPointer)->remoteFunctions((QCString&)* (QCString*)remApp, (QCString&)* (QCString*)remObj, (bool*)ok));
}
int kde_DCOPClient_receive( kde_DCOPClient* instPointer,qt_QCString* app, qt_QCString* obj, qt_QCString* fun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData){
	return (int) ((DCOPClientBridge*)instPointer)->receive((QCString&)* (QCString*)app, (QCString&)* (QCString*)obj, (QCString&)* (QCString*)fun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
}
int kde_DCOPClient_find( kde_DCOPClient* instPointer,qt_QCString* app, qt_QCString* obj, qt_QCString* fun, qt_QByteArray* data, qt_QCString* replyType, qt_QByteArray* replyData){
	return (int) ((DCOPClientBridge*)instPointer)->find((QCString&)* (QCString*)app, (QCString&)* (QCString*)obj, (QCString&)* (QCString*)fun, (QByteArray&)* (QByteArray*)data, (QCString&)* (QCString*)replyType, (QByteArray&)* (QByteArray*)replyData);
}
qt_QCString* kde_DCOPClient_senderId( kde_DCOPClient* instPointer){
	return (qt_QCString*)new QCString(((DCOPClientBridge*)instPointer)->senderId());
}
void kde_DCOPClient_setDefaultObject( kde_DCOPClient* instPointer,qt_QCString* objId){
	((DCOPClientBridge*)instPointer)->setDefaultObject((QCString&)* (QCString*)objId);
	return;
}
qt_QCString* kde_DCOPClient_defaultObject( kde_DCOPClient* instPointer){
	return (qt_QCString*)new QCString(((DCOPClientBridge*)instPointer)->defaultObject());
}
void kde_DCOPClient_setNotifications( kde_DCOPClient* instPointer,int enabled){
	((DCOPClientBridge*)instPointer)->setNotifications((bool)enabled);
	return;
}
void kde_DCOPClient_setDaemonMode( kde_DCOPClient* instPointer,int daemonMode){
	((DCOPClientBridge*)instPointer)->setDaemonMode((bool)daemonMode);
	return;
}
void kde_DCOPClient_setServerAddress( qt_QCString* addr){
	DCOPClientBridge::setServerAddress((QCString&)* (QCString*)addr);
	return;
}
qt_QCString* kde_DCOPClient_normalizeFunctionSignature( qt_QCString* fun){
	return (qt_QCString*)new QCString(DCOPClientBridge::normalizeFunctionSignature((QCString&)* (QCString*)fun));
}
kde_DCOPClient* kde_DCOPClient_mainClient( ){
	return (kde_DCOPClient*) DCOPClientBridge::mainClient();
}
void kde_DCOPClient_setMainClient( kde_DCOPClient* arg1){
	DCOPClientBridge::setMainClient((DCOPClient*)arg1);
	return;
}
void kde_DCOPClient_emergencyClose( ){
	DCOPClientBridge::emergencyClose();
	return;
}
char* kde_DCOPClient_postMortemSender( ){
	return (char*) DCOPClientBridge::postMortemSender();
}
char* kde_DCOPClient_postMortemObject( ){
	return (char*) DCOPClientBridge::postMortemObject();
}
char* kde_DCOPClient_postMortemFunction( ){
	return (char*) DCOPClientBridge::postMortemFunction();
}
qt_QCString* kde_DCOPClient_dcopServerFile( qt_QCString* hostname){
	return (qt_QCString*)new QCString(DCOPClientBridge::dcopServerFile((QCString&)* (QCString*)hostname));
}
qt_QCString* kde_DCOPClient_dcopServerFileOld( qt_QCString* hostname){
	return (qt_QCString*)new QCString(DCOPClientBridge::dcopServerFileOld((QCString&)* (QCString*)hostname));
}
void kde_DCOPClient_processSocketData( kde_DCOPClient* instPointer,int socknum){
	((DCOPClientBridge*)instPointer)->protected_processSocketData((int)socknum);
	return;
}
