/* this file was generated by the MCOP idl compiler - DO NOT EDIT */

#ifndef ARTSKDE_H
#define ARTSKDE_H

#include "common.h"

#include "arts_export.h"

// includes of other idl definitions
#include "kmedia2.h"
#include "artsflow.h"

namespace Arts {
class KFloatWatchProxy;
class KIOInputStream;
class KDataRequest;
class KIOTestSlow;

class ARTS_EXPORT KFloatWatchProxy_base : virtual public Arts::Object_base {
public:
	static unsigned long _IID; // interface ID

	static KFloatWatchProxy_base *_create(const std::string& subClass = "Arts::KFloatWatchProxy");
	static KFloatWatchProxy_base *_fromString(const std::string& objectref);
	static KFloatWatchProxy_base *_fromReference(Arts::ObjectReference ref, bool needcopy);

	static KFloatWatchProxy_base *_fromDynamicCast(const Arts::Object& object);
	inline KFloatWatchProxy_base *_copy() {
		assert(_refCnt > 0);
		_refCnt++;
		return this;
	}

	virtual std::vector<std::string> _defaultPortsIn() const;
	virtual std::vector<std::string> _defaultPortsOut() const;

	void *_cast(unsigned long iid);

	virtual float value() = 0;
	virtual void value(float newValue) = 0;
};

class ARTS_EXPORT KFloatWatchProxy_stub : virtual public KFloatWatchProxy_base, virtual public Arts::Object_stub {
protected:
	KFloatWatchProxy_stub();

public:
	KFloatWatchProxy_stub(Arts::Connection *connection, long objectID);

	float value();
	void value(float newValue);
};

class ARTS_EXPORT KFloatWatchProxy_skel : virtual public KFloatWatchProxy_base, virtual public Arts::Object_skel {
protected:
	// emitters for change notifications
	inline void value_changed(float newValue) {
		_emit_changed("value_changed",newValue);
	}

public:
	KFloatWatchProxy_skel();

	static std::string _interfaceNameSkel();
	std::string _interfaceName();
	bool _isCompatibleWith(const std::string& interfacename);
	void _buildMethodTable();
	void dispatch(Arts::Buffer *request, Arts::Buffer *result,long methodID);
};

}
#include "reference.h"
namespace Arts {
class ARTS_EXPORT KFloatWatchProxy : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	KFloatWatchProxy_base *_cache;
	inline KFloatWatchProxy_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(KFloatWatchProxy_base *)_pool->base->_cast(KFloatWatchProxy_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline KFloatWatchProxy(KFloatWatchProxy_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef KFloatWatchProxy_base _base_class;

	inline KFloatWatchProxy() : Arts::Object(_Creator), _cache(0) {}
	inline KFloatWatchProxy(const Arts::SubClass& s) :
		Arts::Object(KFloatWatchProxy_base::_create(s.string())), _cache(0) {}
	inline KFloatWatchProxy(const Arts::Reference &r) :
		Arts::Object(r.isString()?(KFloatWatchProxy_base::_fromString(r.string())):(KFloatWatchProxy_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline KFloatWatchProxy(const Arts::DynamicCast& c) : Arts::Object(KFloatWatchProxy_base::_fromDynamicCast(c.object())), _cache(0) {}
	inline KFloatWatchProxy(const KFloatWatchProxy& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline KFloatWatchProxy(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static KFloatWatchProxy null() {return KFloatWatchProxy((KFloatWatchProxy_base*)0);}
	inline static KFloatWatchProxy _from_base(KFloatWatchProxy_base* b) {return KFloatWatchProxy(b);}
	inline KFloatWatchProxy& operator=(const KFloatWatchProxy& target) {
		if (_pool == target._pool) return *this;
		_pool->Dec();
		_pool = target._pool;
		_cache = target._cache;
		_pool->Inc();
		return *this;
	}
	inline KFloatWatchProxy_base* _base() {return _cache?_cache:_method_call();}

	inline float value();
	inline void value(float _newValue);
};

class ARTS_EXPORT KIOInputStream_base : virtual public Arts::InputStream_base {
public:
	static unsigned long _IID; // interface ID

	static KIOInputStream_base *_create(const std::string& subClass = "Arts::KIOInputStream");
	static KIOInputStream_base *_fromString(const std::string& objectref);
	static KIOInputStream_base *_fromReference(Arts::ObjectReference ref, bool needcopy);

	static KIOInputStream_base *_fromDynamicCast(const Arts::Object& object);
	inline KIOInputStream_base *_copy() {
		assert(_refCnt > 0);
		_refCnt++;
		return this;
	}

	virtual std::vector<std::string> _defaultPortsIn() const;
	virtual std::vector<std::string> _defaultPortsOut() const;

	void *_cast(unsigned long iid);

	virtual long bufferPackets() = 0;
	virtual void bufferPackets(long newValue) = 0;
	virtual bool openURL(const std::string& url) = 0;
	virtual long packetSize() = 0;
};

class ARTS_EXPORT KIOInputStream_stub : virtual public KIOInputStream_base, virtual public Arts::InputStream_stub {
protected:
	KIOInputStream_stub();

public:
	KIOInputStream_stub(Arts::Connection *connection, long objectID);

	long bufferPackets();
	void bufferPackets(long newValue);
	bool openURL(const std::string& url);
	long packetSize();
};

class ARTS_EXPORT KIOInputStream_skel : virtual public KIOInputStream_base, virtual public Arts::InputStream_skel {
protected:
	// emitters for change notifications
	inline void bufferPackets_changed(long newValue) {
		_emit_changed("bufferPackets_changed",newValue);
	}

public:
	KIOInputStream_skel();

	static std::string _interfaceNameSkel();
	std::string _interfaceName();
	bool _isCompatibleWith(const std::string& interfacename);
	void _buildMethodTable();
	void dispatch(Arts::Buffer *request, Arts::Buffer *result,long methodID);
};

}
#include "reference.h"
namespace Arts {
class ARTS_EXPORT KIOInputStream : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	KIOInputStream_base *_cache;
	inline KIOInputStream_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(KIOInputStream_base *)_pool->base->_cast(KIOInputStream_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline KIOInputStream(KIOInputStream_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef KIOInputStream_base _base_class;

	inline KIOInputStream() : Arts::Object(_Creator), _cache(0) {}
	inline KIOInputStream(const Arts::SubClass& s) :
		Arts::Object(KIOInputStream_base::_create(s.string())), _cache(0) {}
	inline KIOInputStream(const Arts::Reference &r) :
		Arts::Object(r.isString()?(KIOInputStream_base::_fromString(r.string())):(KIOInputStream_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline KIOInputStream(const Arts::DynamicCast& c) : Arts::Object(KIOInputStream_base::_fromDynamicCast(c.object())), _cache(0) {}
	inline KIOInputStream(const KIOInputStream& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline KIOInputStream(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static KIOInputStream null() {return KIOInputStream((KIOInputStream_base*)0);}
	inline static KIOInputStream _from_base(KIOInputStream_base* b) {return KIOInputStream(b);}
	inline KIOInputStream& operator=(const KIOInputStream& target) {
		if (_pool == target._pool) return *this;
		_pool->Dec();
		_pool = target._pool;
		_cache = target._cache;
		_pool->Inc();
		return *this;
	}
	inline operator Arts::InputStream() const { return Arts::InputStream(*_pool); }
	inline operator Arts::SynthModule() const { return Arts::SynthModule(*_pool); }
	inline KIOInputStream_base* _base() {return _cache?_cache:_method_call();}

	inline bool eof();
	inline long size();
	inline bool seekOk();
	inline long seek(long position);
	inline Arts::AutoSuspendState autoSuspend();
	inline void start();
	inline void stop();
	inline void streamInit();
	inline void streamStart();
	inline void streamEnd();
	inline long bufferPackets();
	inline void bufferPackets(long _newValue);
	inline bool openURL(const std::string& url);
	inline long packetSize();
};

class ARTS_EXPORT KDataRequest_base : virtual public Arts::SynthModule_base {
public:
	static unsigned long _IID; // interface ID

	static KDataRequest_base *_create(const std::string& subClass = "Arts::KDataRequest");
	static KDataRequest_base *_fromString(const std::string& objectref);
	static KDataRequest_base *_fromReference(Arts::ObjectReference ref, bool needcopy);

	static KDataRequest_base *_fromDynamicCast(const Arts::Object& object);
	inline KDataRequest_base *_copy() {
		assert(_refCnt > 0);
		_refCnt++;
		return this;
	}

	virtual std::vector<std::string> _defaultPortsIn() const;
	virtual std::vector<std::string> _defaultPortsOut() const;

	void *_cast(unsigned long iid);

	virtual void goOn() = 0;
};

class ARTS_EXPORT KDataRequest_stub : virtual public KDataRequest_base, virtual public Arts::SynthModule_stub {
protected:
	KDataRequest_stub();

public:
	KDataRequest_stub(Arts::Connection *connection, long objectID);

	void goOn();
};

class ARTS_EXPORT KDataRequest_skel : virtual public KDataRequest_base, virtual public Arts::SynthModule_skel {
protected:
	// variables for streams
	float *left;                              // incoming stream
	float *right;                             // incoming stream

public:
	KDataRequest_skel();

	static std::string _interfaceNameSkel();
	std::string _interfaceName();
	bool _isCompatibleWith(const std::string& interfacename);
	void _buildMethodTable();
	void dispatch(Arts::Buffer *request, Arts::Buffer *result,long methodID);
};

}
#include "reference.h"
namespace Arts {
class ARTS_EXPORT KDataRequest : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	KDataRequest_base *_cache;
	inline KDataRequest_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(KDataRequest_base *)_pool->base->_cast(KDataRequest_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline KDataRequest(KDataRequest_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef KDataRequest_base _base_class;

	inline KDataRequest() : Arts::Object(_Creator), _cache(0) {}
	inline KDataRequest(const Arts::SubClass& s) :
		Arts::Object(KDataRequest_base::_create(s.string())), _cache(0) {}
	inline KDataRequest(const Arts::Reference &r) :
		Arts::Object(r.isString()?(KDataRequest_base::_fromString(r.string())):(KDataRequest_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline KDataRequest(const Arts::DynamicCast& c) : Arts::Object(KDataRequest_base::_fromDynamicCast(c.object())), _cache(0) {}
	inline KDataRequest(const KDataRequest& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline KDataRequest(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static KDataRequest null() {return KDataRequest((KDataRequest_base*)0);}
	inline static KDataRequest _from_base(KDataRequest_base* b) {return KDataRequest(b);}
	inline KDataRequest& operator=(const KDataRequest& target) {
		if (_pool == target._pool) return *this;
		_pool->Dec();
		_pool = target._pool;
		_cache = target._cache;
		_pool->Inc();
		return *this;
	}
	inline operator Arts::SynthModule() const { return Arts::SynthModule(*_pool); }
	inline KDataRequest_base* _base() {return _cache?_cache:_method_call();}

	inline Arts::AutoSuspendState autoSuspend();
	inline void start();
	inline void stop();
	inline void streamInit();
	inline void streamStart();
	inline void streamEnd();
	inline void goOn();
};

class ARTS_EXPORT KIOTestSlow_base : virtual public Arts::SynthModule_base {
public:
	static unsigned long _IID; // interface ID

	static KIOTestSlow_base *_create(const std::string& subClass = "Arts::KIOTestSlow");
	static KIOTestSlow_base *_fromString(const std::string& objectref);
	static KIOTestSlow_base *_fromReference(Arts::ObjectReference ref, bool needcopy);

	static KIOTestSlow_base *_fromDynamicCast(const Arts::Object& object);
	inline KIOTestSlow_base *_copy() {
		assert(_refCnt > 0);
		_refCnt++;
		return this;
	}

	virtual std::vector<std::string> _defaultPortsIn() const;
	virtual std::vector<std::string> _defaultPortsOut() const;

	void *_cast(unsigned long iid);

	virtual Arts::InputStream inputStream() = 0;
	virtual void inputStream(Arts::InputStream newValue) = 0;
};

class ARTS_EXPORT KIOTestSlow_stub : virtual public KIOTestSlow_base, virtual public Arts::SynthModule_stub {
protected:
	KIOTestSlow_stub();

public:
	KIOTestSlow_stub(Arts::Connection *connection, long objectID);

	Arts::InputStream inputStream();
	void inputStream(Arts::InputStream newValue);
};

class ARTS_EXPORT KIOTestSlow_skel : virtual public KIOTestSlow_base, virtual public Arts::SynthModule_skel {
protected:
	// variables for streams
	Arts::ByteAsyncStream data;               // incoming stream

	// handler for asynchronous streams
	virtual void process_data(Arts::DataPacket<Arts::mcopbyte> *) = 0;

public:
	KIOTestSlow_skel();

	static std::string _interfaceNameSkel();
	std::string _interfaceName();
	bool _isCompatibleWith(const std::string& interfacename);
	void _buildMethodTable();
	void dispatch(Arts::Buffer *request, Arts::Buffer *result,long methodID);
	void notify(const Arts::Notification& notification);
};

}
#include "reference.h"
namespace Arts {
class ARTS_EXPORT KIOTestSlow : public Arts::Object {
private:
	static Arts::Object_base* _Creator();
	KIOTestSlow_base *_cache;
	inline KIOTestSlow_base *_method_call() {
		_pool->checkcreate();
		if(_pool->base) {
			_cache=(KIOTestSlow_base *)_pool->base->_cast(KIOTestSlow_base::_IID);
			assert(_cache);
		}
		return _cache;
	}

protected:
	inline KIOTestSlow(KIOTestSlow_base* b) : Arts::Object(b), _cache(0) {}


public:
	typedef KIOTestSlow_base _base_class;

	inline KIOTestSlow() : Arts::Object(_Creator), _cache(0) {}
	inline KIOTestSlow(const Arts::SubClass& s) :
		Arts::Object(KIOTestSlow_base::_create(s.string())), _cache(0) {}
	inline KIOTestSlow(const Arts::Reference &r) :
		Arts::Object(r.isString()?(KIOTestSlow_base::_fromString(r.string())):(KIOTestSlow_base::_fromReference(r.reference(),true))), _cache(0) {}
	inline KIOTestSlow(const Arts::DynamicCast& c) : Arts::Object(KIOTestSlow_base::_fromDynamicCast(c.object())), _cache(0) {}
	inline KIOTestSlow(const KIOTestSlow& target) : Arts::Object(target._pool), _cache(target._cache) {}
	inline KIOTestSlow(Arts::Object::Pool& p) : Arts::Object(p), _cache(0) {}
	inline static KIOTestSlow null() {return KIOTestSlow((KIOTestSlow_base*)0);}
	inline static KIOTestSlow _from_base(KIOTestSlow_base* b) {return KIOTestSlow(b);}
	inline KIOTestSlow& operator=(const KIOTestSlow& target) {
		if (_pool == target._pool) return *this;
		_pool->Dec();
		_pool = target._pool;
		_cache = target._cache;
		_pool->Inc();
		return *this;
	}
	inline operator Arts::SynthModule() const { return Arts::SynthModule(*_pool); }
	inline KIOTestSlow_base* _base() {return _cache?_cache:_method_call();}

	inline Arts::AutoSuspendState autoSuspend();
	inline void start();
	inline void stop();
	inline void streamInit();
	inline void streamStart();
	inline void streamEnd();
	inline Arts::InputStream inputStream();
	inline void inputStream(Arts::InputStream _newValue);
};

}
// Forward wrapper calls to _base classes:

inline float Arts::KFloatWatchProxy::value()
{
	return _cache?static_cast<Arts::KFloatWatchProxy_base*>(_cache)->value():static_cast<Arts::KFloatWatchProxy_base*>(_method_call())->value();
}

inline void Arts::KFloatWatchProxy::value(float _newValue)
{
	 _cache?static_cast<Arts::KFloatWatchProxy_base*>(_cache)->value(_newValue):static_cast<Arts::KFloatWatchProxy_base*>(_method_call())->value(_newValue);
}

inline bool Arts::KIOInputStream::eof()
{
	return _cache?static_cast<Arts::InputStream_base*>(_cache)->eof():static_cast<Arts::InputStream_base*>(_method_call())->eof();
}

inline long Arts::KIOInputStream::size()
{
	return _cache?static_cast<Arts::InputStream_base*>(_cache)->size():static_cast<Arts::InputStream_base*>(_method_call())->size();
}

inline bool Arts::KIOInputStream::seekOk()
{
	return _cache?static_cast<Arts::InputStream_base*>(_cache)->seekOk():static_cast<Arts::InputStream_base*>(_method_call())->seekOk();
}

inline long Arts::KIOInputStream::seek(long position)
{
	return _cache?static_cast<Arts::InputStream_base*>(_cache)->seek(position):static_cast<Arts::InputStream_base*>(_method_call())->seek(position);
}

inline Arts::AutoSuspendState Arts::KIOInputStream::autoSuspend()
{
	return _cache?static_cast<Arts::SynthModule_base*>(_cache)->autoSuspend():static_cast<Arts::SynthModule_base*>(_method_call())->autoSuspend();
}

inline void Arts::KIOInputStream::start()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->start():static_cast<Arts::SynthModule_base*>(_method_call())->start();
}

inline void Arts::KIOInputStream::stop()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->stop():static_cast<Arts::SynthModule_base*>(_method_call())->stop();
}

inline void Arts::KIOInputStream::streamInit()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamInit():static_cast<Arts::SynthModule_base*>(_method_call())->streamInit();
}

inline void Arts::KIOInputStream::streamStart()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamStart():static_cast<Arts::SynthModule_base*>(_method_call())->streamStart();
}

inline void Arts::KIOInputStream::streamEnd()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamEnd():static_cast<Arts::SynthModule_base*>(_method_call())->streamEnd();
}

inline long Arts::KIOInputStream::bufferPackets()
{
	return _cache?static_cast<Arts::KIOInputStream_base*>(_cache)->bufferPackets():static_cast<Arts::KIOInputStream_base*>(_method_call())->bufferPackets();
}

inline void Arts::KIOInputStream::bufferPackets(long _newValue)
{
	 _cache?static_cast<Arts::KIOInputStream_base*>(_cache)->bufferPackets(_newValue):static_cast<Arts::KIOInputStream_base*>(_method_call())->bufferPackets(_newValue);
}

inline bool Arts::KIOInputStream::openURL(const std::string& url)
{
	return _cache?static_cast<Arts::KIOInputStream_base*>(_cache)->openURL(url):static_cast<Arts::KIOInputStream_base*>(_method_call())->openURL(url);
}

inline long Arts::KIOInputStream::packetSize()
{
	return _cache?static_cast<Arts::KIOInputStream_base*>(_cache)->packetSize():static_cast<Arts::KIOInputStream_base*>(_method_call())->packetSize();
}

inline Arts::AutoSuspendState Arts::KDataRequest::autoSuspend()
{
	return _cache?static_cast<Arts::SynthModule_base*>(_cache)->autoSuspend():static_cast<Arts::SynthModule_base*>(_method_call())->autoSuspend();
}

inline void Arts::KDataRequest::start()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->start():static_cast<Arts::SynthModule_base*>(_method_call())->start();
}

inline void Arts::KDataRequest::stop()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->stop():static_cast<Arts::SynthModule_base*>(_method_call())->stop();
}

inline void Arts::KDataRequest::streamInit()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamInit():static_cast<Arts::SynthModule_base*>(_method_call())->streamInit();
}

inline void Arts::KDataRequest::streamStart()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamStart():static_cast<Arts::SynthModule_base*>(_method_call())->streamStart();
}

inline void Arts::KDataRequest::streamEnd()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamEnd():static_cast<Arts::SynthModule_base*>(_method_call())->streamEnd();
}

inline void Arts::KDataRequest::goOn()
{
	 _cache?static_cast<Arts::KDataRequest_base*>(_cache)->goOn():static_cast<Arts::KDataRequest_base*>(_method_call())->goOn();
}

inline Arts::AutoSuspendState Arts::KIOTestSlow::autoSuspend()
{
	return _cache?static_cast<Arts::SynthModule_base*>(_cache)->autoSuspend():static_cast<Arts::SynthModule_base*>(_method_call())->autoSuspend();
}

inline void Arts::KIOTestSlow::start()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->start():static_cast<Arts::SynthModule_base*>(_method_call())->start();
}

inline void Arts::KIOTestSlow::stop()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->stop():static_cast<Arts::SynthModule_base*>(_method_call())->stop();
}

inline void Arts::KIOTestSlow::streamInit()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamInit():static_cast<Arts::SynthModule_base*>(_method_call())->streamInit();
}

inline void Arts::KIOTestSlow::streamStart()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamStart():static_cast<Arts::SynthModule_base*>(_method_call())->streamStart();
}

inline void Arts::KIOTestSlow::streamEnd()
{
	 _cache?static_cast<Arts::SynthModule_base*>(_cache)->streamEnd():static_cast<Arts::SynthModule_base*>(_method_call())->streamEnd();
}

inline Arts::InputStream Arts::KIOTestSlow::inputStream()
{
	return _cache?static_cast<Arts::KIOTestSlow_base*>(_cache)->inputStream():static_cast<Arts::KIOTestSlow_base*>(_method_call())->inputStream();
}

inline void Arts::KIOTestSlow::inputStream(Arts::InputStream _newValue)
{
	 _cache?static_cast<Arts::KIOTestSlow_base*>(_cache)->inputStream(_newValue):static_cast<Arts::KIOTestSlow_base*>(_method_call())->inputStream(_newValue);
}

#endif /* ARTSKDE_H */
