// This file implements the IBackgroundCopyFile Interface for Python.
// Generated by makegw.py

#include "bits_pch.h"
#include "PyIBackgroundCopyFile.h"

// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Implementation

PyIBackgroundCopyFile::PyIBackgroundCopyFile(IUnknown *pdisp):
	PyIUnknown(pdisp)
{
	ob_type = &type;
}

PyIBackgroundCopyFile::~PyIBackgroundCopyFile()
{
}

/* static */ IBackgroundCopyFile *PyIBackgroundCopyFile::GetI(PyObject *self)
{
	return (IBackgroundCopyFile *)PyIUnknown::GetI(self);
}

// @pymethod |PyIBackgroundCopyFile|GetRemoteName|Description of GetRemoteName.
PyObject *PyIBackgroundCopyFile::GetRemoteName(PyObject *self, PyObject *args)
{
	IBackgroundCopyFile *pIBCF = GetI(self);
	if ( pIBCF == NULL )
		return NULL;
	if ( !PyArg_ParseTuple(args, ":GetRemoteName") )
		return NULL;
	WCHAR *pVal;
	HRESULT hr;
	PY_INTERFACE_PRECALL;
	hr = pIBCF->GetRemoteName( &pVal );
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile );
	PyObject *ret = PyWinObject_FromWCHAR(pVal);
	CoTaskMemFree(pVal);
	return ret;
}

// @pymethod |PyIBackgroundCopyFile|GetLocalName|Description of GetLocalName.
PyObject *PyIBackgroundCopyFile::GetLocalName(PyObject *self, PyObject *args)
{
	IBackgroundCopyFile *pIBCF = GetI(self);
	if ( pIBCF == NULL )
		return NULL;
	if ( !PyArg_ParseTuple(args, ":GetLocalName") )
		return NULL;
	WCHAR *pVal;
	HRESULT hr;
	PY_INTERFACE_PRECALL;
	hr = pIBCF->GetLocalName( &pVal );
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile );
	PyObject *ret = PyWinObject_FromWCHAR(pVal);
	CoTaskMemFree(pVal);
	return ret;
}

// @pymethod |PyIBackgroundCopyFile|GetProgress|Description of GetProgress.
PyObject *PyIBackgroundCopyFile::GetProgress(PyObject *self, PyObject *args)
{
	IBackgroundCopyFile *pIBCF = GetI(self);
	if ( pIBCF == NULL )
		return NULL;
	if ( !PyArg_ParseTuple(args, ":GetProgress") )
		return NULL;
	HRESULT hr;
	BG_FILE_PROGRESS val;
	PY_INTERFACE_PRECALL;
	hr = pIBCF->GetProgress(&val);
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile );
	return PyObject_FromBG_FILE_PROGRESS(&val);
}

// @object PyIBackgroundCopyFile|Description of the interface
static struct PyMethodDef PyIBackgroundCopyFile_methods[] =
{
	{ "GetRemoteName", PyIBackgroundCopyFile::GetRemoteName, 1 }, // @pymeth GetRemoteName|Description of GetRemoteName
	{ "GetLocalName", PyIBackgroundCopyFile::GetLocalName, 1 }, // @pymeth GetLocalName|Description of GetLocalName
	{ "GetProgress", PyIBackgroundCopyFile::GetProgress, 1 }, // @pymeth GetProgress|Description of GetProgress
	{ NULL }
};

PyComTypeObject PyIBackgroundCopyFile::type("PyIBackgroundCopyFile",
		&PyIUnknown::type,
		sizeof(PyIBackgroundCopyFile),
		PyIBackgroundCopyFile_methods,
		GET_PYCOM_CTOR(PyIBackgroundCopyFile));
