home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2710 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  8.9 KB  |  198 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from win32com import universal
  5. from win32com.server.exception import COMException
  6. from win32com.client import gencache
  7. import winerror
  8. from win32com.client import constants
  9. from win32com.server.util import wrap
  10. import pythoncom
  11. pythoncom.__future_currency__ = True
  12. gencache.EnsureModule('{6BCDCB60-5605-11D0-AE5F-CADD4C000000}', 0, 1, 1)
  13.  
  14. class PyCOMTest:
  15.     _typelib_guid_ = '{6BCDCB60-5605-11D0-AE5F-CADD4C000000}'
  16.     _typelib_version = (1, 0)
  17.     _com_interfaces_ = [
  18.         'IPyCOMTest']
  19.     _reg_clsid_ = '{e743d9cd-cb03-4b04-b516-11d3a81c1597}'
  20.     _reg_progid_ = 'Python.Test.PyCOMTest'
  21.     
  22.     def DoubleString(self, str):
  23.         return str * 2
  24.  
  25.     
  26.     def DoubleInOutString(self, str):
  27.         return str * 2
  28.  
  29.     
  30.     def Fire(self, nID):
  31.         raise COMException(hresult = winerror.E_NOTIMPL)
  32.  
  33.     
  34.     def GetLastVarArgs(self):
  35.         raise COMException(hresult = winerror.E_NOTIMPL)
  36.  
  37.     
  38.     def GetMultipleInterfaces(self, outinterface1, outinterface2):
  39.         raise COMException(hresult = winerror.E_NOTIMPL)
  40.  
  41.     
  42.     def GetSafeArrays(self, attrs, attrs2, ints):
  43.         raise COMException(hresult = winerror.E_NOTIMPL)
  44.  
  45.     
  46.     def GetSetDispatch(self, indisp):
  47.         raise COMException(hresult = winerror.E_NOTIMPL)
  48.  
  49.     
  50.     def GetSetInterface(self, ininterface):
  51.         return wrap(self)
  52.  
  53.     
  54.     def GetSetVariant(self, indisp):
  55.         return indisp
  56.  
  57.     
  58.     def TestByRefVariant(self, v):
  59.         return v * 2
  60.  
  61.     
  62.     def TestByRefString(self, v):
  63.         return v * 2
  64.  
  65.     
  66.     def GetSetInterfaceArray(self, ininterface):
  67.         raise COMException(hresult = winerror.E_NOTIMPL)
  68.  
  69.     
  70.     def GetSetUnknown(self, inunk):
  71.         raise COMException(hresult = winerror.E_NOTIMPL)
  72.  
  73.     
  74.     def GetSimpleCounter(self):
  75.         raise COMException(hresult = winerror.E_NOTIMPL)
  76.  
  77.     
  78.     def GetSimpleSafeArray(self, ints):
  79.         raise COMException(hresult = winerror.E_NOTIMPL)
  80.  
  81.     
  82.     def GetStruct(self):
  83.         raise COMException(hresult = winerror.E_NOTIMPL)
  84.  
  85.     
  86.     def SetIntSafeArray(self, ints):
  87.         return len(ints)
  88.  
  89.     
  90.     def SetVarArgs(self, *args):
  91.         raise COMException(hresult = winerror.E_NOTIMPL)
  92.  
  93.     
  94.     def SetVariantSafeArray(self, vars):
  95.         raise COMException(hresult = winerror.E_NOTIMPL)
  96.  
  97.     
  98.     def Start(self):
  99.         raise COMException(hresult = winerror.E_NOTIMPL)
  100.  
  101.     
  102.     def Stop(self, nID):
  103.         raise COMException(hresult = winerror.E_NOTIMPL)
  104.  
  105.     
  106.     def StopAll(self):
  107.         raise COMException(hresult = winerror.E_NOTIMPL)
  108.  
  109.     
  110.     def TakeByRefDispatch(self, inout):
  111.         raise COMException(hresult = winerror.E_NOTIMPL)
  112.  
  113.     
  114.     def TakeByRefTypedDispatch(self, inout):
  115.         raise COMException(hresult = winerror.E_NOTIMPL)
  116.  
  117.     
  118.     def Test(self, key, inval):
  119.         return not inval
  120.  
  121.     
  122.     def Test2(self, inval):
  123.         return inval
  124.  
  125.     
  126.     def Test3(self, inval):
  127.         raise COMException(hresult = winerror.E_NOTIMPL)
  128.  
  129.     
  130.     def Test4(self, inval):
  131.         raise COMException(hresult = winerror.E_NOTIMPL)
  132.  
  133.     
  134.     def Test5(self, inout):
  135.         if inout == constants.TestAttr1:
  136.             return constants.TestAttr1_1
  137.         if inout == constants.TestAttr1_1:
  138.             return constants.TestAttr1
  139.         return -1
  140.  
  141.     
  142.     def Test6(self, inval):
  143.         return inval
  144.  
  145.     
  146.     def TestOptionals(self, strArg = 'def', sval = 0, lval = 1, dval = 3.14):
  147.         raise COMException(hresult = winerror.E_NOTIMPL)
  148.  
  149.     
  150.     def TestOptionals2(self, dval, strval = '', sval = 1):
  151.         raise COMException(hresult = winerror.E_NOTIMPL)
  152.  
  153.     
  154.     def CheckVariantSafeArray(self, data):
  155.         return 1
  156.  
  157.     
  158.     def LongProp(self):
  159.         return self.longval
  160.  
  161.     
  162.     def SetLongProp(self, val):
  163.         self.longval = val
  164.  
  165.     
  166.     def ULongProp(self):
  167.         return self.ulongval
  168.  
  169.     
  170.     def SetULongProp(self, val):
  171.         self.ulongval = val
  172.  
  173.     
  174.     def IntProp(self):
  175.         return self.intval
  176.  
  177.     
  178.     def SetIntProp(self, val):
  179.         self.intval = val
  180.  
  181.  
  182.  
  183. class PyCOMTestMI(PyCOMTest):
  184.     _typelib_guid_ = '{6BCDCB60-5605-11D0-AE5F-CADD4C000000}'
  185.     _typelib_version = (1, 0)
  186.     _com_interfaces_ = [
  187.         'IPyCOMTest',
  188.         pythoncom.IID_IStream,
  189.         str(pythoncom.IID_IStorage)]
  190.     _reg_clsid_ = '{F506E9A1-FB46-4238-A597-FA4EB69787CA}'
  191.     _reg_progid_ = 'Python.Test.PyCOMTestMI'
  192.  
  193. if __name__ == '__main__':
  194.     import win32com.server.register as win32com
  195.     win32com.server.register.UseCommandLine(PyCOMTest)
  196.     win32com.server.register.UseCommandLine(PyCOMTestMI)
  197.  
  198.