Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21133/com/win32comext/bits/src
Modified Files:
Tag: sidnei-bits
PyIBackgroundCopyCallback.cpp PyIBackgroundCopyCallback.h
bits.cpp bits_pch.h
Added Files:
Tag: sidnei-bits
PyIBackgroundCopyFile2.cpp PyIBackgroundCopyFile2.h
PyIBackgroundCopyJob2.cpp PyIBackgroundCopyJob2.h
PyIBackgroundCopyJob3.cpp PyIBackgroundCopyJob3.h
Log Message:
- More makegw fixups, and some evil hacks to get it to at least compile.
--- NEW FILE: PyIBackgroundCopyJob3.h ---
// This file declares the IBackgroundCopyJob3 Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
//
// Interface Declaration
class PyIBackgroundCopyJob3 : public PyIBackgroundCopyJob2
{
public:
MAKE_PYCOM_CTOR(PyIBackgroundCopyJob3);
static IBackgroundCopyJob3 *GetI(PyObject *self);
static PyComTypeObject type;
// The Python methods
static PyObject *ReplaceRemotePrefix(PyObject *self, PyObject *args);
static PyObject *AddFileWithRanges(PyObject *self, PyObject *args);
static PyObject *SetFileACLFlags(PyObject *self, PyObject *args);
static PyObject *GetFileACLFlags(PyObject *self, PyObject *args);
protected:
PyIBackgroundCopyJob3(IUnknown *pdisp);
~PyIBackgroundCopyJob3();
};
--- NEW FILE: PyIBackgroundCopyFile2.cpp ---
// This file implements the IBackgroundCopyFile2 Interface for Python.
// Generated by makegw.py
#include "bits_pch.h"
#include "PyIBackgroundCopyFile.h"
#include "PyIBackgroundCopyFile2.h"
// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Implementation
PyIBackgroundCopyFile2::PyIBackgroundCopyFile2(IUnknown *pdisp):
PyIBackgroundCopyFile(pdisp)
{
ob_type = &type;
}
PyIBackgroundCopyFile2::~PyIBackgroundCopyFile2()
{
}
/* static */ IBackgroundCopyFile2 *PyIBackgroundCopyFile2::GetI(PyObject *self)
{
return (IBackgroundCopyFile2 *)PyIBackgroundCopyFile::GetI(self);
}
// @pymethod |PyIBackgroundCopyFile2|GetFileRanges|Description of GetFileRanges.
PyObject *PyIBackgroundCopyFile2::GetFileRanges(PyObject *self, PyObject *args)
{
IBackgroundCopyFile2 *pIBCF2 = GetI(self);
if ( pIBCF2 == NULL )
return NULL;
DWORD * RangeCount;
PyObject *obRangeCount;
BG_FILE_RANGE ** Ranges;
PyObject *obRanges;
if ( !PyArg_ParseTuple(args, ":GetFileRanges") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCF2->GetFileRanges( RangeCount, Ranges );
// PyObject_FreeDWORD(RangeCount);
// PyObject_FreeBG_FILE_RANGE_LIST(Ranges);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCF2, IID_IBackgroundCopyFile2 );
// *** The output argument RangeCount of type "DWORD *" was not processed ***
// The type 'DWORD *' (RangeCount) is unknown.
// *** The output argument Ranges of type "BG_FILE_RANGE **" was not processed ***
// The type 'BG_FILE_RANGE **' (Ranges) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyFile2|SetRemoteName|Description of SetRemoteName.
PyObject *PyIBackgroundCopyFile2::SetRemoteName(PyObject *self, PyObject *args)
{
IBackgroundCopyFile2 *pIBCF2 = GetI(self);
if ( pIBCF2 == NULL )
return NULL;
if ( !PyArg_ParseTuple(args, ":SetRemoteName") )
return NULL;
LPCWSTR RemoteName;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCF2->SetRemoteName(RemoteName);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCF2, IID_IBackgroundCopyFile2 );
Py_INCREF(Py_None);
return Py_None;
}
// @object PyIBackgroundCopyFile2|Description of the interface
static struct PyMethodDef PyIBackgroundCopyFile2_methods[] =
{
{ "GetFileRanges", PyIBackgroundCopyFile2::GetFileRanges, 1 }, // @pymeth GetFileRanges|Description of GetFileRanges
{ "SetRemoteName", PyIBackgroundCopyFile2::SetRemoteName, 1 }, // @pymeth SetRemoteName|Description of SetRemoteName
{ NULL }
};
PyComTypeObject PyIBackgroundCopyFile2::type("PyIBackgroundCopyFile2",
&PyIBackgroundCopyFile::type,
sizeof(PyIBackgroundCopyFile2),
PyIBackgroundCopyFile2_methods,
GET_PYCOM_CTOR(PyIBackgroundCopyFile2));
--- NEW FILE: PyIBackgroundCopyJob3.cpp ---
// This file implements the IBackgroundCopyJob3 Interface for Python.
// Generated by makegw.py
#include "bits_pch.h"
#include "PyIBackgroundCopyJob2.h"
#include "PyIBackgroundCopyJob3.h"
// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Implementation
PyIBackgroundCopyJob3::PyIBackgroundCopyJob3(IUnknown *pdisp):
PyIBackgroundCopyJob2(pdisp)
{
ob_type = &type;
}
PyIBackgroundCopyJob3::~PyIBackgroundCopyJob3()
{
}
/* static */ IBackgroundCopyJob3 *PyIBackgroundCopyJob3::GetI(PyObject *self)
{
return (IBackgroundCopyJob3 *)PyIBackgroundCopyJob2::GetI(self);
}
// @pymethod |PyIBackgroundCopyJob3|ReplaceRemotePrefix|Description of ReplaceRemotePrefix.
PyObject *PyIBackgroundCopyJob3::ReplaceRemotePrefix(PyObject *self, PyObject *args)
{
IBackgroundCopyJob3 *pIBCJ3 = GetI(self);
if ( pIBCJ3 == NULL )
return NULL;
// @pyparm <o unicode>|OldPrefix||Description for OldPrefix
// @pyparm <o unicode>|NewPrefix||Description for NewPrefix
PyObject *obOldPrefix;
PyObject *obNewPrefix;
LPWSTR OldPrefix;
LPWSTR NewPrefix;
if ( !PyArg_ParseTuple(args, "OO:ReplaceRemotePrefix", &obOldPrefix, &obNewPrefix) )
return NULL;
BOOL bPythonIsHappy = TRUE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obOldPrefix, &OldPrefix)) bPythonIsHappy = FALSE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obNewPrefix, &NewPrefix)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ3->ReplaceRemotePrefix( OldPrefix, NewPrefix );
SysFreeString(OldPrefix);
SysFreeString(NewPrefix);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 );
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob3|AddFileWithRanges|Description of AddFileWithRanges.
PyObject *PyIBackgroundCopyJob3::AddFileWithRanges(PyObject *self, PyObject *args)
{
IBackgroundCopyJob3 *pIBCJ3 = GetI(self);
if ( pIBCJ3 == NULL )
return NULL;
// @pyparm <o unicode>|RemoteUrl||Description for RemoteUrl
// @pyparm <o unicode>|LocalName||Description for LocalName
// @pyparm int|RangeCount||Description for RangeCount
// *** The input argument Ranges of type "BG_FILE_RANGE" was not processed ***
// Please check the conversion function is appropriate and exists!
BG_FILE_RANGE *Ranges;
PyObject *obRanges;
// @pyparm <o PyBG_FILE_RANGE>|Ranges||Description for Ranges
PyObject *obRemoteUrl;
PyObject *obLocalName;
LPWSTR RemoteUrl;
LPWSTR LocalName;
DWORD RangeCount;
if ( !PyArg_ParseTuple(args, "OOlO:AddFileWithRanges", &obRemoteUrl, &obLocalName, &RangeCount, &obRanges) )
return NULL;
BOOL bPythonIsHappy = TRUE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obRemoteUrl, &RemoteUrl)) bPythonIsHappy = FALSE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obLocalName, &LocalName)) bPythonIsHappy = FALSE;
if (bPythonIsHappy && !PyObject_AsBG_FILE_RANGE_LIST( obRanges, &Ranges )) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ3->AddFileWithRanges( RemoteUrl, LocalName, RangeCount, Ranges );
SysFreeString(RemoteUrl);
SysFreeString(LocalName);
PyObject_FreeBG_FILE_RANGE_LIST(Ranges);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 );
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob3|SetFileACLFlags|Description of SetFileACLFlags.
PyObject *PyIBackgroundCopyJob3::SetFileACLFlags(PyObject *self, PyObject *args)
{
IBackgroundCopyJob3 *pIBCJ3 = GetI(self);
if ( pIBCJ3 == NULL )
return NULL;
// @pyparm int|Flags||Description for Flags
DWORD Flags;
if ( !PyArg_ParseTuple(args, "l:SetFileACLFlags", &Flags) )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ3->SetFileACLFlags( Flags );
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 );
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob3|GetFileACLFlags|Description of GetFileACLFlags.
PyObject *PyIBackgroundCopyJob3::GetFileACLFlags(PyObject *self, PyObject *args)
{
IBackgroundCopyJob3 *pIBCJ3 = GetI(self);
if ( pIBCJ3 == NULL )
return NULL;
DWORD * Flags;
PyObject *obFlags;
if ( !PyArg_ParseTuple(args, ":GetFileACLFlags") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ3->GetFileACLFlags( Flags );
PyObject_FreeDWORD(Flags);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 );
// *** The output argument Flags of type "DWORD *" was not processed ***
// The type 'DWORD *' (Flags) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @object PyIBackgroundCopyJob3|Description of the interface
static struct PyMethodDef PyIBackgroundCopyJob3_methods[] =
{
{ "ReplaceRemotePrefix", PyIBackgroundCopyJob3::ReplaceRemotePrefix, 1 }, // @pymeth ReplaceRemotePrefix|Description of ReplaceRemotePrefix
{ "AddFileWithRanges", PyIBackgroundCopyJob3::AddFileWithRanges, 1 }, // @pymeth AddFileWithRanges|Description of AddFileWithRanges
{ "SetFileACLFlags", PyIBackgroundCopyJob3::SetFileACLFlags, 1 }, // @pymeth SetFileACLFlags|Description of SetFileACLFlags
{ "GetFileACLFlags", PyIBackgroundCopyJob3::GetFileACLFlags, 1 }, // @pymeth GetFileACLFlags|Description of GetFileACLFlags
{ NULL }
};
PyComTypeObject PyIBackgroundCopyJob3::type("PyIBackgroundCopyJob3",
&PyIBackgroundCopyJob2::type,
sizeof(PyIBackgroundCopyJob3),
PyIBackgroundCopyJob3_methods,
GET_PYCOM_CTOR(PyIBackgroundCopyJob3));
Index: bits_pch.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits_pch.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
*** bits_pch.h 6 Feb 2008 01:51:28 -0000 1.1.2.1
--- bits_pch.h 6 Feb 2008 04:21:20 -0000 1.1.2.2
***************
*** 5,8 ****
--- 5,11 ----
#include <PythonCOM.h>
+ BOOL PyObject_AsDWORD(PyObject *ob, DWORD *dw);
+ void PyObject_FreeDWORD(DWORD *dw);
+
BOOL PyObject_AsULONG(PyObject *ob, ULONG *ul);
void PyObject_FreeULONG(ULONG *ul);
***************
*** 38,41 ****
--- 41,47 ----
void PyObject_FreeBG_FILE_PROGRESS_LIST(BG_FILE_PROGRESS *fi);
+ BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, BG_FILE_RANGE **fr);
+ void PyObject_FreeBG_FILE_RANGE_LIST(BG_FILE_RANGE *fr);
+
BOOL PyObject_AsBG_JOB_STATE(PyObject *ob, BG_JOB_STATE *js);
void PyObject_FreeBG_JOB_STATE(BG_JOB_STATE *js);
Index: PyIBackgroundCopyCallback.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyCallback.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** PyIBackgroundCopyCallback.cpp 6 Feb 2008 02:43:32 -0000 1.1.2.2
--- PyIBackgroundCopyCallback.cpp 6 Feb 2008 04:21:20 -0000 1.1.2.3
***************
*** 2,6 ****
// Generated by makegw.py
! #include "shell_pch.h"
#include "PyIBackgroundCopyCallback.h"
--- 2,6 ----
// Generated by makegw.py
! #include "bits_pch.h"
#include "PyIBackgroundCopyCallback.h"
***************
*** 14,18 ****
PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(&pJob, IID_IBackgroundCopyJob *, TRUE);
HRESULT hr=InvokeViaPolicy("JobTransferred", NULL, "O", obpJob);
Py_XDECREF(obpJob);
--- 14,18 ----
PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(pJob, IID_IBackgroundCopyJob, TRUE);
HRESULT hr=InvokeViaPolicy("JobTransferred", NULL, "O", obpJob);
Py_XDECREF(obpJob);
***************
*** 27,32 ****
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);
--- 27,32 ----
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);
***************
*** 41,45 ****
PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(&pJob, IID_IBackgroundCopyJob *, TRUE);
HRESULT hr=InvokeViaPolicy("JobModification", NULL, "Ol", obpJob, dwReserved);
Py_XDECREF(obpJob);
--- 41,45 ----
PY_GATEWAY_METHOD;
PyObject *obpJob;
! obpJob = PyCom_PyObjectFromIUnknown(pJob, IID_IBackgroundCopyJob, TRUE);
HRESULT hr=InvokeViaPolicy("JobModification", NULL, "Ol", obpJob, dwReserved);
Py_XDECREF(obpJob);
--- NEW FILE: PyIBackgroundCopyJob2.cpp ---
// This file implements the IBackgroundCopyJob2 Interface for Python.
// Generated by makegw.py
#include "bits_pch.h"
#include "PyIBackgroundCopyJob.h"
#include "PyIBackgroundCopyJob2.h"
// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Implementation
PyIBackgroundCopyJob2::PyIBackgroundCopyJob2(IUnknown *pdisp):
PyIBackgroundCopyJob(pdisp)
{
ob_type = &type;
}
PyIBackgroundCopyJob2::~PyIBackgroundCopyJob2()
{
}
/* static */ IBackgroundCopyJob2 *PyIBackgroundCopyJob2::GetI(PyObject *self)
{
return (IBackgroundCopyJob2 *)PyIBackgroundCopyJob::GetI(self);
}
// @pymethod |PyIBackgroundCopyJob2|SetNotifyCmdLine|Description of SetNotifyCmdLine.
PyObject *PyIBackgroundCopyJob2::SetNotifyCmdLine(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
// @pyparm <o unicode>|Program||Description for Program
// @pyparm <o unicode>|Parameters||Description for Parameters
PyObject *obProgram;
PyObject *obParameters;
LPWSTR Program;
LPWSTR Parameters;
if ( !PyArg_ParseTuple(args, "OO:SetNotifyCmdLine", &obProgram, &obParameters) )
return NULL;
BOOL bPythonIsHappy = TRUE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obProgram, &Program)) bPythonIsHappy = FALSE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obParameters, &Parameters)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->SetNotifyCmdLine( Program, Parameters );
SysFreeString(Program);
SysFreeString(Parameters);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|GetNotifyCmdLine|Description of GetNotifyCmdLine.
PyObject *PyIBackgroundCopyJob2::GetNotifyCmdLine(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
LPWSTR * pProgram;
PyObject *obpProgram;
LPWSTR * pParameters;
PyObject *obpParameters;
if ( !PyArg_ParseTuple(args, ":GetNotifyCmdLine") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->GetNotifyCmdLine( pProgram, pParameters );
PyObject_FreeLPWSTR(pProgram);
PyObject_FreeLPWSTR(pParameters);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
// *** The output argument pProgram of type "LPWSTR *" was not processed ***
// The type 'LPWSTR *' (pProgram) is unknown.
// *** The output argument pParameters of type "LPWSTR *" was not processed ***
// The type 'LPWSTR *' (pParameters) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|GetReplyProgress|Description of GetReplyProgress.
PyObject *PyIBackgroundCopyJob2::GetReplyProgress(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
BG_JOB_REPLY_PROGRESS * pProgress;
PyObject *obpProgress;
// @pyparm <o PyBG_JOB_REPLY_PROGRESS *>|pProgress||Description for pProgress
if ( !PyArg_ParseTuple(args, ":GetReplyProgress") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->GetReplyProgress( pProgress );
// PyObject_FreeBG_JOB_REPLY_PROGRESS(pProgress);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
// *** The output argument pProgress of type "BG_JOB_REPLY_PROGRESS *" was not processed ***
// The type 'BG_JOB_REPLY_PROGRESS *' (pProgress) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|GetReplyData|Description of GetReplyData.
PyObject *PyIBackgroundCopyJob2::GetReplyData(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
byte ** ppBuffer;
PyObject *obppBuffer;
UINT64 * pLength;
PyObject *obpLength;
if ( !PyArg_ParseTuple(args, ":GetReplyData") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->GetReplyData( ppBuffer, pLength );
// PyObject_Freebyte(ppBuffer);
// PyObject_FreeUINT64(pLength);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
// *** The output argument ppBuffer of type "byte **" was not processed ***
// The type 'byte **' (ppBuffer) is unknown.
// *** The output argument pLength of type "UINT64 *" was not processed ***
// The type 'UINT64 *' (pLength) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|SetReplyFileName|Description of SetReplyFileName.
PyObject *PyIBackgroundCopyJob2::SetReplyFileName(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
// @pyparm <o unicode>|ReplyFileName||Description for ReplyFileName
PyObject *obReplyFileName;
LPWSTR ReplyFileName;
if ( !PyArg_ParseTuple(args, "O:SetReplyFileName", &obReplyFileName) )
return NULL;
BOOL bPythonIsHappy = TRUE;
if (bPythonIsHappy && !PyWinObject_AsBstr(obReplyFileName, &ReplyFileName)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->SetReplyFileName( ReplyFileName );
SysFreeString(ReplyFileName);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|GetReplyFileName|Description of GetReplyFileName.
PyObject *PyIBackgroundCopyJob2::GetReplyFileName(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
LPWSTR * pReplyFileName;
PyObject *obpReplyFileName;
if ( !PyArg_ParseTuple(args, ":GetReplyFileName") )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->GetReplyFileName( pReplyFileName );
PyObject_FreeLPWSTR(pReplyFileName);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
// *** The output argument pReplyFileName of type "LPWSTR *" was not processed ***
// The type 'LPWSTR *' (pReplyFileName) is unknown.
Py_INCREF(Py_None);
return Py_None;
}
// @pymethod |PyIBackgroundCopyJob2|SetCredentials|Description of SetCredentials.
PyObject *PyIBackgroundCopyJob2::SetCredentials(PyObject *self, PyObject *args)
{
IBackgroundCopyJob2 *pIBCJ2 = GetI(self);
if ( pIBCJ2 == NULL )
return NULL;
if ( !PyArg_ParseTuple(args, ":SetCredentials") )
return NULL;
BG_AUTH_CREDENTIALS *ac;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pIBCJ2->SetCredentials(ac);
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 );
Py_INCREF(Py_None);
return Py_None;
}
// @object PyIBackgroundCopyJob2|Description of the interface
static struct PyMethodDef PyIBackgroundCopyJob2_methods[] =
{
{ "SetNotifyCmdLine", PyIBackgroundCopyJob2::SetNotifyCmdLine, 1 }, // @pymeth SetNotifyCmdLine|Description of SetNotifyCmdLine
{ "GetNotifyCmdLine", PyIBackgroundCopyJob2::GetNotifyCmdLine, 1 }, // @pymeth GetNotifyCmdLine|Description of GetNotifyCmdLine
{ "GetReplyProgress", PyIBackgroundCopyJob2::GetReplyProgress, 1 }, // @pymeth GetReplyProgress|Description of GetReplyProgress
{ "GetReplyData", PyIBackgroundCopyJob2::GetReplyData, 1 }, // @pymeth GetReplyData|Description of GetReplyData
{ "SetReplyFileName", PyIBackgroundCopyJob2::SetReplyFileName, 1 }, // @pymeth SetReplyFileName|Description of SetReplyFileName
{ "GetReplyFileName", PyIBackgroundCopyJob2::GetReplyFileName, 1 }, // @pymeth GetReplyFileName|Description of GetReplyFileName
{ "SetCredentials", PyIBackgroundCopyJob2::SetCredentials, 1 }, // @pymeth SetCredentials|Description of SetCredentials
{ NULL }
};
PyComTypeObject PyIBackgroundCopyJob2::type("PyIBackgroundCopyJob2",
&PyIBackgroundCopyJob::type,
sizeof(PyIBackgroundCopyJob2),
PyIBackgroundCopyJob2_methods,
GET_PYCOM_CTOR(PyIBackgroundCopyJob2));
Index: bits.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits.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
*** bits.cpp 6 Feb 2008 01:51:28 -0000 1.1.2.1
--- bits.cpp 6 Feb 2008 04:21:20 -0000 1.1.2.2
***************
*** 1,13 ****
- # include "PythonCOM.h"
- # include "PythonCOMRegister.h"
# include "Bits.h"
- # include "PyIEnumBackgroundCopyJobs.h"
- # include "PyIEnumBackgroundCopyFiles.h"
# include "PyIBackgroundCopyManager.h"
# include "PyIBackgroundCopyJob.h"
# include "PyIBackgroundCopyFile.h"
# include "PyIBackgroundCopyError.h"
! # include "PyIBackgroundCopyCallback.h"
! # include "PyAsyncIBackgroundCopyCallback.h"
BOOL PyObject_AsULONG(PyObject *ob, ULONG *ul)
--- 1,24 ----
# include "Bits.h"
# include "PyIBackgroundCopyManager.h"
+ # include "PyIBackgroundCopyCallback.h"
# include "PyIBackgroundCopyJob.h"
+ # include "PyIBackgroundCopyJob2.h"
+ # include "PyIBackgroundCopyJob3.h"
# include "PyIBackgroundCopyFile.h"
+ # include "PyIBackgroundCopyFile2.h"
# include "PyIBackgroundCopyError.h"
! # include "PyIEnumBackgroundCopyJobs.h"
! # include "PyIEnumBackgroundCopyFiles.h"
!
! # include "PythonCOMRegister.h"
!
! BOOL PyObject_AsDWORD(PyObject *ob, DWORD *dw)
! {
! return FALSE;
! }
!
! void PyObject_FreeDWORD(DWORD *dw)
! {
! }
BOOL PyObject_AsULONG(PyObject *ob, ULONG *ul)
***************
*** 92,110 ****
}
! BOOL PyObject_AsBG_FILE_PROGRESS(PyObject *ob, BG_FILE_PROGRESS *jp)
{
return FALSE;
}
! void PyObject_FreeBG_FILE_PROGRESS(BG_FILE_PROGRESS *jp)
{
}
! BOOL PyObject_AsBG_FILE_PROGRESS_LIST(PyObject *ob, BG_FILE_PROGRESS **jp)
{
return FALSE;
}
! void PyObject_FreeBG_FILE_PROGRESS_LIST(BG_FILE_PROGRESS *jp)
{
}
--- 103,130 ----
}
! BOOL PyObject_AsBG_FILE_PROGRESS(PyObject *ob, BG_FILE_PROGRESS *fp)
{
return FALSE;
}
! void PyObject_FreeBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp)
{
}
! BOOL PyObject_AsBG_FILE_PROGRESS_LIST(PyObject *ob, BG_FILE_PROGRESS **fp)
{
return FALSE;
}
! void PyObject_FreeBG_FILE_PROGRESS_LIST(BG_FILE_PROGRESS *fp)
! {
! }
!
! BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, BG_FILE_RANGE **fr)
! {
! return FALSE;
! }
!
! void PyObject_FreeBG_FILE_RANGE_LIST(BG_FILE_RANGE *fr)
{
}
***************
*** 233,237 ****
--- 253,260 ----
PYCOM_INTERFACE_CLSID_ONLY ( BackgroundCopyManager ),
PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyManager ),
+ PYCOM_INTERFACE_SERVER_ONLY( BackgroundCopyCallback ),
PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob ),
+ PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob2 ),
+ PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyJob3 ),
PYCOM_INTERFACE_CLIENT_ONLY( BackgroundCopyFile ),
PYCOM_INTERFACE_CLIENT_ONLY( EnumBackgroundCopyJobs ),
Index: PyIBackgroundCopyCallback.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyCallback.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** PyIBackgroundCopyCallback.h 6 Feb 2008 02:43:32 -0000 1.1.2.2
--- PyIBackgroundCopyCallback.h 6 Feb 2008 04:21:20 -0000 1.1.2.3
***************
*** 5,8 ****
--- 5,10 ----
// Gateway Declaration
+ # include "PythonCOMServer.h"
+
class PyGBackgroundCopyCallback : public PyGatewayBase, public IBackgroundCopyCallback
{
--- NEW FILE: PyIBackgroundCopyFile2.h ---
// This file declares the IBackgroundCopyFile2 Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
//
// Interface Declaration
#include "Bits.h"
#include "PythonCOM.h"
class PyIBackgroundCopyFile2 : public PyIBackgroundCopyFile
{
public:
MAKE_PYCOM_CTOR(PyIBackgroundCopyFile2);
static IBackgroundCopyFile2 *GetI(PyObject *self);
static PyComTypeObject type;
// The Python methods
static PyObject *GetFileRanges(PyObject *self, PyObject *args);
static PyObject *SetRemoteName(PyObject *self, PyObject *args);
protected:
PyIBackgroundCopyFile2(IUnknown *pdisp);
~PyIBackgroundCopyFile2();
};
--- NEW FILE: PyIBackgroundCopyJob2.h ---
// This file declares the IBackgroundCopyJob2 Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
//
// Interface Declaration
#include "Bits.h"
class PyIBackgroundCopyJob2 : public PyIBackgroundCopyJob
{
public:
MAKE_PYCOM_CTOR(PyIBackgroundCopyJob2);
static IBackgroundCopyJob2 *GetI(PyObject *self);
static PyComTypeObject type;
// The Python methods
static PyObject *SetNotifyCmdLine(PyObject *self, PyObject *args);
static PyObject *GetNotifyCmdLine(PyObject *self, PyObject *args);
static PyObject *GetReplyProgress(PyObject *self, PyObject *args);
static PyObject *GetReplyData(PyObject *self, PyObject *args);
static PyObject *SetReplyFileName(PyObject *self, PyObject *args);
static PyObject *GetReplyFileName(PyObject *self, PyObject *args);
static PyObject *SetCredentials(PyObject *self, PyObject *args);
protected:
PyIBackgroundCopyJob2(IUnknown *pdisp);
~PyIBackgroundCopyJob2();
};
|