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

#include "xinePlayObject.h"

// Implementation
xinePlayObject_base *xinePlayObject_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	xinePlayObject_base *castedObject = (xinePlayObject_base *)skel->_cast(xinePlayObject_base::_IID);
	assert(castedObject);
	return castedObject;
}

xinePlayObject_base *xinePlayObject_base::_fromString(const std::string& objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return xinePlayObject_base::_fromReference(r,true);
	return 0;
}

xinePlayObject_base *xinePlayObject_base::_fromDynamicCast(const Arts::Object& object)
{
	if(object.isNull()) return 0;

	xinePlayObject_base *castedObject = (xinePlayObject_base *)object._base()->_cast(xinePlayObject_base::_IID);
	if(castedObject) return castedObject->_copy();

	return _fromString(object._toString());
}

xinePlayObject_base *xinePlayObject_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	xinePlayObject_base *result;
	result = (xinePlayObject_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"xinePlayObject");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new xinePlayObject_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("xinePlayObject")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> xinePlayObject_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	return ret;
}
std::vector<std::string> xinePlayObject_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	return ret;
}

void *xinePlayObject_base::_cast(unsigned long iid)
{
	if(iid == xinePlayObject_base::_IID) return (xinePlayObject_base *)this;
	if(iid == Arts::PlayObject_base::_IID) return (Arts::PlayObject_base *)this;
	if(iid == Arts::PlayObject_private_base::_IID) return (Arts::PlayObject_private_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

xinePlayObject_stub::xinePlayObject_stub()
{
	// constructor for subclasses (don't use directly)
}

xinePlayObject_stub::xinePlayObject_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

std::string xinePlayObject_skel::_interfaceName()
{
	return "xinePlayObject";
}

bool xinePlayObject_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "xinePlayObject") return true;
	if (interfacename == "Arts::PlayObject") return true;
	if (interfacename == "Arts::PlayObject_private") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string xinePlayObject_skel::_interfaceNameSkel()
{
	return "xinePlayObject";
}

void xinePlayObject_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:",
		"MethodTable"
	);
	Arts::PlayObject_skel::_buildMethodTable();
	Arts::SynthModule_skel::_buildMethodTable();
}

xinePlayObject_skel::xinePlayObject_skel()
{
	_initStream("left",&left,10);
	_initStream("right",&right,10);
}

Arts::Object_base* xinePlayObject::_Creator() {
	return xinePlayObject_base::_create();
}

unsigned long xinePlayObject_base::_IID = Arts::MCOPUtils::makeIID("xinePlayObject");

xineAudioPlayObject_base *xineAudioPlayObject_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	xineAudioPlayObject_base *castedObject = (xineAudioPlayObject_base *)skel->_cast(xineAudioPlayObject_base::_IID);
	assert(castedObject);
	return castedObject;
}

xineAudioPlayObject_base *xineAudioPlayObject_base::_fromString(const std::string& objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return xineAudioPlayObject_base::_fromReference(r,true);
	return 0;
}

xineAudioPlayObject_base *xineAudioPlayObject_base::_fromDynamicCast(const Arts::Object& object)
{
	if(object.isNull()) return 0;

	xineAudioPlayObject_base *castedObject = (xineAudioPlayObject_base *)object._base()->_cast(xineAudioPlayObject_base::_IID);
	if(castedObject) return castedObject->_copy();

	return _fromString(object._toString());
}

xineAudioPlayObject_base *xineAudioPlayObject_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	xineAudioPlayObject_base *result;
	result = (xineAudioPlayObject_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"xineAudioPlayObject");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new xineAudioPlayObject_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("xineAudioPlayObject")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> xineAudioPlayObject_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	return ret;
}
std::vector<std::string> xineAudioPlayObject_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	return ret;
}

void *xineAudioPlayObject_base::_cast(unsigned long iid)
{
	if(iid == xineAudioPlayObject_base::_IID) return (xineAudioPlayObject_base *)this;
	if(iid == xinePlayObject_base::_IID) return (xinePlayObject_base *)this;
	if(iid == Arts::PlayObject_base::_IID) return (Arts::PlayObject_base *)this;
	if(iid == Arts::PlayObject_private_base::_IID) return (Arts::PlayObject_private_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

xineAudioPlayObject_stub::xineAudioPlayObject_stub()
{
	// constructor for subclasses (don't use directly)
}

xineAudioPlayObject_stub::xineAudioPlayObject_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

std::string xineAudioPlayObject_skel::_interfaceName()
{
	return "xineAudioPlayObject";
}

bool xineAudioPlayObject_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "xineAudioPlayObject") return true;
	if (interfacename == "xinePlayObject") return true;
	if (interfacename == "Arts::PlayObject") return true;
	if (interfacename == "Arts::PlayObject_private") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string xineAudioPlayObject_skel::_interfaceNameSkel()
{
	return "xineAudioPlayObject";
}

void xineAudioPlayObject_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:",
		"MethodTable"
	);
	xinePlayObject_skel::_buildMethodTable();
	Arts::PlayObject_skel::_buildMethodTable();
	Arts::SynthModule_skel::_buildMethodTable();
}

xineAudioPlayObject_skel::xineAudioPlayObject_skel()
{
}

Arts::Object_base* xineAudioPlayObject::_Creator() {
	return xineAudioPlayObject_base::_create();
}

unsigned long xineAudioPlayObject_base::_IID = Arts::MCOPUtils::makeIID("xineAudioPlayObject");

xineVideoPlayObject_base *xineVideoPlayObject_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	xineVideoPlayObject_base *castedObject = (xineVideoPlayObject_base *)skel->_cast(xineVideoPlayObject_base::_IID);
	assert(castedObject);
	return castedObject;
}

xineVideoPlayObject_base *xineVideoPlayObject_base::_fromString(const std::string& objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return xineVideoPlayObject_base::_fromReference(r,true);
	return 0;
}

xineVideoPlayObject_base *xineVideoPlayObject_base::_fromDynamicCast(const Arts::Object& object)
{
	if(object.isNull()) return 0;

	xineVideoPlayObject_base *castedObject = (xineVideoPlayObject_base *)object._base()->_cast(xineVideoPlayObject_base::_IID);
	if(castedObject) return castedObject->_copy();

	return _fromString(object._toString());
}

xineVideoPlayObject_base *xineVideoPlayObject_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	xineVideoPlayObject_base *result;
	result = (xineVideoPlayObject_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"xineVideoPlayObject");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new xineVideoPlayObject_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("xineVideoPlayObject")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> xineVideoPlayObject_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	return ret;
}
std::vector<std::string> xineVideoPlayObject_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	return ret;
}

void *xineVideoPlayObject_base::_cast(unsigned long iid)
{
	if(iid == xineVideoPlayObject_base::_IID) return (xineVideoPlayObject_base *)this;
	if(iid == xinePlayObject_base::_IID) return (xinePlayObject_base *)this;
	if(iid == Arts::PlayObject_base::_IID) return (Arts::PlayObject_base *)this;
	if(iid == Arts::PlayObject_private_base::_IID) return (Arts::PlayObject_private_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::VideoPlayObject_base::_IID) return (Arts::VideoPlayObject_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

xineVideoPlayObject_stub::xineVideoPlayObject_stub()
{
	// constructor for subclasses (don't use directly)
}

xineVideoPlayObject_stub::xineVideoPlayObject_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

std::string xineVideoPlayObject_skel::_interfaceName()
{
	return "xineVideoPlayObject";
}

bool xineVideoPlayObject_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "xineVideoPlayObject") return true;
	if (interfacename == "xinePlayObject") return true;
	if (interfacename == "Arts::PlayObject") return true;
	if (interfacename == "Arts::PlayObject_private") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::VideoPlayObject") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string xineVideoPlayObject_skel::_interfaceNameSkel()
{
	return "xineVideoPlayObject";
}

void xineVideoPlayObject_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:",
		"MethodTable"
	);
	xinePlayObject_skel::_buildMethodTable();
	Arts::PlayObject_skel::_buildMethodTable();
	Arts::VideoPlayObject_skel::_buildMethodTable();
	Arts::SynthModule_skel::_buildMethodTable();
}

xineVideoPlayObject_skel::xineVideoPlayObject_skel()
{
}

Arts::Object_base* xineVideoPlayObject::_Creator() {
	return xineVideoPlayObject_base::_create();
}

unsigned long xineVideoPlayObject_base::_IID = Arts::MCOPUtils::makeIID("xineVideoPlayObject");

static Arts::IDLFileReg IDLFileReg_xinePlayObject("xinePlayObject",
    "IDLFile:00000001000000000000000000000000030000000f78696e65506c61794f62"
    "6a656374000000000200000011417274733a3a506c61794f626a656374000000001241"
    "7274733a3a53796e74684d6f64756c65000000000000000002000000056c6566740000"
    "000006666c6f6174000000000a000000000000000672696768740000000006666c6f61"
    "74000000000a0000000000000000000000000000001478696e65417564696f506c6179"
    "4f626a65637400000000030000000f78696e65506c61794f626a656374000000001141"
    "7274733a3a506c61794f626a6563740000000012417274733a3a53796e74684d6f6475"
    "6c6500000000000000000000000000000000000000001478696e65566964656f506c61"
    "794f626a65637400000000040000000f78696e65506c61794f626a6563740000000011"
    "417274733a3a506c61794f626a6563740000000016417274733a3a566964656f506c61"
    "794f626a6563740000000012417274733a3a53796e74684d6f64756c65000000000000"
    "000000000000000000000000000000"
);
