/***************************************************************************
                            kde_DCOPStub.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_DCOPStub.h"
}

#include <dcopstub.h>

class DCOPStubBridge : public DCOPStub
{
public:
	DCOPStubBridge(const QCString& app, const QCString& obj) : DCOPStub(app, obj) {}
	DCOPStubBridge(DCOPClient* client, const QCString& app, const QCString& obj) : DCOPStub(client, app, obj) {}
	~DCOPStubBridge() {}
	void protected_setStatus(Status _status) {
		DCOPStub::setStatus(_status);
		return;
	}
	void protected_callFailed() {
		DCOPStub::callFailed();
		return;
	}
	DCOPClient*  protected_dcopClient() {
		return (DCOPClient* ) DCOPStub::dcopClient();
	}
};

kde_DCOPStub * kde_new_DCOPStub(qt_QCString* app, qt_QCString* obj){
	return (kde_DCOPStub *) new DCOPStubBridge((QCString&)* (QCString*)app, (QCString&)* (QCString*)obj);
}
kde_DCOPStub * kde_new_DCOPStub1(kde_DCOPClient* client, qt_QCString* app, qt_QCString* obj){
	return (kde_DCOPStub *) new DCOPStubBridge((DCOPClient*)client, (QCString&)* (QCString*)app, (QCString&)* (QCString*)obj);
}
void kde_del_DCOPStub( kde_DCOPStub* p ){
	delete (DCOPStubBridge*) p;
}
qt_QCString* kde_DCOPStub_app( kde_DCOPStub* instPointer){
	return (qt_QCString*)new QCString(((DCOPStubBridge*)instPointer)->app());
}
qt_QCString* kde_DCOPStub_obj( kde_DCOPStub* instPointer){
	return (qt_QCString*)new QCString(((DCOPStubBridge*)instPointer)->obj());
}
int kde_DCOPStub_status( kde_DCOPStub* instPointer){
	return (int) ((DCOPStubBridge*)instPointer)->status();
}
int kde_DCOPStub_ok( kde_DCOPStub* instPointer){
	return (int) ((DCOPStubBridge*)instPointer)->ok();
}
void kde_DCOPStub_setStatus( kde_DCOPStub* instPointer,int _status){
	((DCOPStubBridge*)instPointer)->protected_setStatus((DCOPStub::Status)_status);
	return;
}
void kde_DCOPStub_callFailed( kde_DCOPStub* instPointer){
	((DCOPStubBridge*)instPointer)->protected_callFailed();
	return;
}
kde_DCOPClient* kde_DCOPStub_dcopClient( kde_DCOPStub* instPointer){
	return (kde_DCOPClient*) ((DCOPStubBridge*)instPointer)->protected_dcopClient();
}
