[pywin32-checkins] pywin32/com/win32comext/bits/test test_bits.py, 1.1.2.3, 1.1.2.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-02-07 08:47:22
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23484 Modified Files: Tag: sidnei-bits test_bits.py Log Message: Use a simpler wrap Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** test_bits.py 7 Feb 2008 07:58:40 -0000 1.1.2.3 --- test_bits.py 7 Feb 2008 08:43:44 -0000 1.1.2.4 *************** *** 1,3 **** ! import win32com.server.policy import pythoncom, sys, os, time, win32api, win32event, tempfile from win32com.bits import bits --- 1,3 ---- ! from win32com.server.util import wrap import pythoncom, sys, os, time, win32api, win32event, tempfile from win32com.bits import bits *************** *** 16,26 **** bits.IID_IBackgroundCopyManager) ! class BackgroundJobCallback(win32com.server.policy.DesignatedWrapPolicy): _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] _public_methods_ = ["JobTransferred", "JobError", "JobModification"] - def __init__(self): - self._wrap_(self) - def JobTransferred(self, job): print 'Job Transferred', job --- 16,23 ---- bits.IID_IBackgroundCopyManager) ! class BackgroundJobCallback: _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] _public_methods_ = ["JobTransferred", "JobError", "JobModification"] def JobTransferred(self, job): print 'Job Transferred', job *************** *** 49,53 **** print job ! job.SetNotifyInterface(pythoncom.WrapObject(BackgroundJobCallback(), bits.IID_IBackgroundCopyCallback, pythoncom.IID_IUnknown)) job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | bits.BG_NOTIFY_JOB_ERROR | --- 46,50 ---- print job ! job.SetNotifyInterface(wrap(BackgroundJobCallback())) job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | bits.BG_NOTIFY_JOB_ERROR | |