Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18828
Modified Files:
Tag: sidnei-bits
PyIBackgroundCopyCallback.cpp PyIBackgroundCopyCallback.h
Removed Files:
Tag: sidnei-bits
PyAsyncIBackgroundCopyCallback.cpp
PyAsyncIBackgroundCopyCallback.h
Log Message:
- Death to (probably not meaningful) Async interfaces. Callbacks should be Gateways (ie, they will be called from COM, not from Python)
Index: PyIBackgroundCopyCallback.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyCallback.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** PyIBackgroundCopyCallback.cpp 6 Feb 2008 01:51:28 -0000 1.1.2.1
--- PyIBackgroundCopyCallback.cpp 6 Feb 2008 02:43:32 -0000 1.1.2.2
***************
*** 1,3 ****
! // This file implements the IBackgroundCopyCallback Interface for Python.
// Generated by makegw.py
--- 1,3 ----
! // This file implements the IBackgroundCopyCallback Gateway for Python.
// Generated by makegw.py
***************
*** 8,135 ****
// ---------------------------------------------------
//
! // Interface Implementation
!
! PyIBackgroundCopyCallback::PyIBackgroundCopyCallback(IUnknown *pdisp):
! PyIUnknown(pdisp)
! {
! ob_type = &type;
! }
!
! PyIBackgroundCopyCallback::~PyIBackgroundCopyCallback()
! {
! }
!
! /* static */ IBackgroundCopyCallback *PyIBackgroundCopyCallback::GetI(PyObject *self)
! {
! return (IBackgroundCopyCallback *)PyIUnknown::GetI(self);
! }
!
! // @pymethod |PyIBackgroundCopyCallback|JobTransferred|Description of JobTransferred.
! PyObject *PyIBackgroundCopyCallback::JobTransferred(PyObject *self, PyObject *args)
{
! IBackgroundCopyCallback *pIBCC = GetI(self);
! if ( pIBCC == NULL )
! return NULL;
! // @pyparm <o PyIBackgroundCopyJob *>|pJob||Description for pJob
PyObject *obpJob;
! IBackgroundCopyJob * * pJob;
! if ( !PyArg_ParseTuple(args, "O:JobTransferred", &obpJob) )
! return NULL;
! BOOL bPythonIsHappy = TRUE;
! if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpJob, IID_IBackgroundCopyJob *, (void **)&pJob, TRUE /* bNoneOK */))
! bPythonIsHappy = FALSE;
! if (!bPythonIsHappy) return NULL;
! HRESULT hr;
! PY_INTERFACE_PRECALL;
! hr = pIBCC->JobTransferred( *pJob );
! if (pJob) pJob->Release();
!
! PY_INTERFACE_POSTCALL;
!
! if ( FAILED(hr) )
! return PyCom_BuildPyException(hr, pIBCC, IID_IBackgroundCopyCallback );
! Py_INCREF(Py_None);
! return Py_None;
!
}
! // @pymethod |PyIBackgroundCopyCallback|JobError|Description of JobError.
! PyObject *PyIBackgroundCopyCallback::JobError(PyObject *self, PyObject *args)
{
! IBackgroundCopyCallback *pIBCC = GetI(self);
! if ( pIBCC == NULL )
! return NULL;
! // @pyparm <o PyIBackgroundCopyJob *>|pJob||Description for pJob
! // @pyparm <o PyIBackgroundCopyError *>|pError||Description for pError
PyObject *obpJob;
PyObject *obpError;
! IBackgroundCopyJob * * pJob;
! IBackgroundCopyError * * pError;
! if ( !PyArg_ParseTuple(args, "OO:JobError", &obpJob, &obpError) )
! return NULL;
! BOOL bPythonIsHappy = TRUE;
! if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpJob, IID_IBackgroundCopyJob *, (void **)&pJob, TRUE /* bNoneOK */))
! bPythonIsHappy = FALSE;
! if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpError, IID_IBackgroundCopyError *, (void **)&pError, TRUE /* bNoneOK */))
! bPythonIsHappy = FALSE;
! if (!bPythonIsHappy) return NULL;
! HRESULT hr;
! PY_INTERFACE_PRECALL;
! hr = pIBCC->JobError( *pJob, *pError );
! if (pJob) pJob->Release();
! if (pError) pError->Release();
!
! PY_INTERFACE_POSTCALL;
!
! if ( FAILED(hr) )
! return PyCom_BuildPyException(hr, pIBCC, IID_IBackgroundCopyCallback );
! Py_INCREF(Py_None);
! return Py_None;
!
}
! // @pymethod |PyIBackgroundCopyCallback|JobModification|Description of JobModification.
! PyObject *PyIBackgroundCopyCallback::JobModification(PyObject *self, PyObject *args)
{
! IBackgroundCopyCallback *pIBCC = GetI(self);
! if ( pIBCC == NULL )
! return NULL;
! // @pyparm <o PyIBackgroundCopyJob *>|pJob||Description for pJob
! // @pyparm int|dwReserved||Description for dwReserved
PyObject *obpJob;
! IBackgroundCopyJob * * pJob;
! DWORD dwReserved;
! if ( !PyArg_ParseTuple(args, "Ol:JobModification", &obpJob, &dwReserved) )
! return NULL;
! BOOL bPythonIsHappy = TRUE;
! if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpJob, IID_IBackgroundCopyJob *, (void **)&pJob, TRUE /* bNoneOK */))
! bPythonIsHappy = FALSE;
! if (!bPythonIsHappy) return NULL;
! HRESULT hr;
! PY_INTERFACE_PRECALL;
! hr = pIBCC->JobModification( *pJob, dwReserved );
! if (pJob) pJob->Release();
!
! PY_INTERFACE_POSTCALL;
!
! if ( FAILED(hr) )
! return PyCom_BuildPyException(hr, pIBCC, IID_IBackgroundCopyCallback );
! Py_INCREF(Py_None);
! return Py_None;
!
}
- // @object PyIBackgroundCopyCallback|Description of the interface
- static struct PyMethodDef PyIBackgroundCopyCallback_methods[] =
- {
- { "JobTransferred", PyIBackgroundCopyCallback::JobTransferred, 1 }, // @pymeth JobTransferred|Description of JobTransferred
- { "JobError", PyIBackgroundCopyCallback::JobError, 1 }, // @pymeth JobError|Description of JobError
- { "JobModification", PyIBackgroundCopyCallback::JobModification, 1 }, // @pymeth JobModification|Description of JobModification
- { NULL }
- };
-
- PyComTypeObject PyIBackgroundCopyCallback::type("PyIBackgroundCopyCallback",
- &PyIUnknown::type,
- sizeof(PyIBackgroundCopyCallback),
- PyIBackgroundCopyCallback_methods,
- GET_PYCOM_CTOR(PyIBackgroundCopyCallback));
--- 8,48 ----
// ---------------------------------------------------
//
! // Gateway Implementation
! STDMETHODIMP PyGBackgroundCopyCallback::JobTransferred(
! /* [in] */ IBackgroundCopyJob * pJob)
{
! PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(&pJob, IID_IBackgroundCopyJob *, TRUE);
! HRESULT hr=InvokeViaPolicy("JobTransferred", NULL, "O", obpJob);
! Py_XDECREF(obpJob);
! return hr;
}
! STDMETHODIMP PyGBackgroundCopyCallback::JobError(
! /* [in] */ IBackgroundCopyJob * pJob,
! /* [in] */ IBackgroundCopyError * pError)
{
! PY_GATEWAY_METHOD;
PyObject *obpJob;
PyObject *obpError;
! obpJob = PyCom_PyObjectFromIUnknown(&pJob, IID_IBackgroundCopyJob *, TRUE);
! obpError = PyCom_PyObjectFromIUnknown(&pError, IID_IBackgroundCopyError *, TRUE);
! HRESULT hr=InvokeViaPolicy("JobError", NULL, "OO", obpJob, obpError);
! Py_XDECREF(obpJob);
! Py_XDECREF(obpError);
! return hr;
}
! STDMETHODIMP PyGBackgroundCopyCallback::JobModification(
! /* [in] */ IBackgroundCopyJob * pJob,
! /* [in] */ DWORD dwReserved)
{
! PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(&pJob, IID_IBackgroundCopyJob *, TRUE);
! HRESULT hr=InvokeViaPolicy("JobModification", NULL, "Ol", obpJob, dwReserved);
! Py_XDECREF(obpJob);
! return hr;
}
--- PyAsyncIBackgroundCopyCallback.h DELETED ---
Index: PyIBackgroundCopyCallback.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyCallback.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** PyIBackgroundCopyCallback.h 6 Feb 2008 01:51:28 -0000 1.1.2.1
--- PyIBackgroundCopyCallback.h 6 Feb 2008 02:43:32 -0000 1.1.2.2
***************
*** 1,22 ****
! // This file declares the IBackgroundCopyCallback Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
//
! // Interface Declaration
! class PyIBackgroundCopyCallback : public PyIUnknown
{
! public:
! MAKE_PYCOM_CTOR(PyIBackgroundCopyCallback);
! static IBackgroundCopyCallback *GetI(PyObject *self);
! static PyComTypeObject type;
- // The Python methods
- static PyObject *JobTransferred(PyObject *self, PyObject *args);
- static PyObject *JobError(PyObject *self, PyObject *args);
- static PyObject *JobModification(PyObject *self, PyObject *args);
! protected:
! PyIBackgroundCopyCallback(IUnknown *pdisp);
! ~PyIBackgroundCopyCallback();
};
--- 1,27 ----
! // This file declares the IBackgroundCopyCallback Gateway for Python.
// Generated by makegw.py
// ---------------------------------------------------
//
! // Gateway Declaration
! class PyGBackgroundCopyCallback : public PyGatewayBase, public IBackgroundCopyCallback
{
! protected:
! PyGBackgroundCopyCallback(PyObject *instance) : PyGatewayBase(instance) { ; }
! PYGATEWAY_MAKE_SUPPORT2(PyGBackgroundCopyCallback, IBackgroundCopyCallback, IID_IBackgroundCopyCallback, PyGatewayBase)
!
! // IBackgroundCopyCallback
! STDMETHOD(JobTransferred)(
! IBackgroundCopyJob * pJob);
!
! STDMETHOD(JobError)(
! IBackgroundCopyJob * pJob,
! IBackgroundCopyError * pError);
!
! STDMETHOD(JobModification)(
! IBackgroundCopyJob * pJob,
! DWORD dwReserved);
!
};
--- PyAsyncIBackgroundCopyCallback.cpp DELETED ---
|