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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from calibre.constants import plugins
  5. (_chmlib, chmlib_err) = plugins['chmlib']
  6. if chmlib_err:
  7.     raise RuntimeError('Failed to load chmlib: ' + chmlib_err)
  8. chmlib_err
  9.  
  10. def _swig_setattr(self, class_type, name, value):
  11.     if name == 'this':
  12.         if isinstance(value, class_type):
  13.             self.__dict__[name] = value.this
  14.             if hasattr(value, 'thisown'):
  15.                 self.__dict__['thisown'] = value.thisown
  16.             
  17.             del value.thisown
  18.             return None
  19.     
  20.     method = class_type.__swig_setmethods__.get(name, None)
  21.     if method:
  22.         return method(self, value)
  23.     self.__dict__[name] = value
  24.  
  25.  
  26. def _swig_getattr(self, class_type, name):
  27.     method = class_type.__swig_getmethods__.get(name, None)
  28.     if method:
  29.         return method(self)
  30.     raise AttributeError, name
  31.  
  32. import types
  33.  
  34. try:
  35.     _object = types.ObjectType
  36.     _newclass = 1
  37. except AttributeError:
  38.     
  39.     class _object:
  40.         pass
  41.  
  42.     _newclass = 0
  43.  
  44. CHM_UNCOMPRESSED = _chmlib.CHM_UNCOMPRESSED
  45. CHM_COMPRESSED = _chmlib.CHM_COMPRESSED
  46. CHM_MAX_PATHLEN = _chmlib.CHM_MAX_PATHLEN
  47.  
  48. class chmUnitInfo(_object):
  49.     __swig_setmethods__ = { }
  50.     
  51.     __setattr__ = lambda self, name, value: _swig_setattr(self, chmUnitInfo, name, value)
  52.     __swig_getmethods__ = { }
  53.     
  54.     __getattr__ = lambda self, name: _swig_getattr(self, chmUnitInfo, name)
  55.     __swig_setmethods__['start'] = _chmlib.chmUnitInfo_start_set
  56.     __swig_getmethods__['start'] = _chmlib.chmUnitInfo_start_get
  57.     if _newclass:
  58.         start = property(_chmlib.chmUnitInfo_start_get, _chmlib.chmUnitInfo_start_set)
  59.     
  60.     __swig_setmethods__['length'] = _chmlib.chmUnitInfo_length_set
  61.     __swig_getmethods__['length'] = _chmlib.chmUnitInfo_length_get
  62.     if _newclass:
  63.         length = property(_chmlib.chmUnitInfo_length_get, _chmlib.chmUnitInfo_length_set)
  64.     
  65.     __swig_setmethods__['space'] = _chmlib.chmUnitInfo_space_set
  66.     __swig_getmethods__['space'] = _chmlib.chmUnitInfo_space_get
  67.     if _newclass:
  68.         space = property(_chmlib.chmUnitInfo_space_get, _chmlib.chmUnitInfo_space_set)
  69.     
  70.     __swig_setmethods__['path'] = _chmlib.chmUnitInfo_path_set
  71.     __swig_getmethods__['path'] = _chmlib.chmUnitInfo_path_get
  72.     if _newclass:
  73.         path = property(_chmlib.chmUnitInfo_path_get, _chmlib.chmUnitInfo_path_set)
  74.     
  75.     
  76.     def __init__(self, *args):
  77.         _swig_setattr(self, chmUnitInfo, 'this', apply(_chmlib.new_chmUnitInfo, args))
  78.         _swig_setattr(self, chmUnitInfo, 'thisown', 1)
  79.  
  80.     
  81.     def __del__(self, destroy = _chmlib.delete_chmUnitInfo):
  82.         
  83.         try:
  84.             if self.thisown:
  85.                 destroy(self)
  86.         except:
  87.             pass
  88.  
  89.  
  90.     
  91.     def __repr__(self):
  92.         return '<C chmUnitInfo instance at %s>' % (self.this,)
  93.  
  94.  
  95.  
  96. class chmUnitInfoPtr(chmUnitInfo):
  97.     
  98.     def __init__(self, this):
  99.         _swig_setattr(self, chmUnitInfo, 'this', this)
  100.         if not hasattr(self, 'thisown'):
  101.             _swig_setattr(self, chmUnitInfo, 'thisown', 0)
  102.         
  103.         _swig_setattr(self, chmUnitInfo, self.__class__, chmUnitInfo)
  104.  
  105.  
  106. _chmlib.chmUnitInfo_swigregister(chmUnitInfoPtr)
  107. chm_open = _chmlib.chm_open
  108. chm_close = _chmlib.chm_close
  109. CHM_PARAM_MAX_BLOCKS_CACHED = _chmlib.CHM_PARAM_MAX_BLOCKS_CACHED
  110. chm_set_param = _chmlib.chm_set_param
  111. CHM_RESOLVE_SUCCESS = _chmlib.CHM_RESOLVE_SUCCESS
  112. CHM_RESOLVE_FAILURE = _chmlib.CHM_RESOLVE_FAILURE
  113. chm_resolve_object = _chmlib.chm_resolve_object
  114. chm_retrieve_object = _chmlib.chm_retrieve_object
  115. CHM_ENUMERATE_NORMAL = _chmlib.CHM_ENUMERATE_NORMAL
  116. CHM_ENUMERATE_META = _chmlib.CHM_ENUMERATE_META
  117. CHM_ENUMERATE_SPECIAL = _chmlib.CHM_ENUMERATE_SPECIAL
  118. CHM_ENUMERATE_FILES = _chmlib.CHM_ENUMERATE_FILES
  119. CHM_ENUMERATE_DIRS = _chmlib.CHM_ENUMERATE_DIRS
  120. CHM_ENUMERATE_ALL = _chmlib.CHM_ENUMERATE_ALL
  121. CHM_ENUMERATOR_FAILURE = _chmlib.CHM_ENUMERATOR_FAILURE
  122. CHM_ENUMERATOR_CONTINUE = _chmlib.CHM_ENUMERATOR_CONTINUE
  123. CHM_ENUMERATOR_SUCCESS = _chmlib.CHM_ENUMERATOR_SUCCESS
  124. chm_enumerate = _chmlib.chm_enumerate
  125. chm_enumerate_dir = _chmlib.chm_enumerate_dir
  126.