PageRenderTime 59ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/lib-python/2.7/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py

https://bitbucket.org/dac_io/pypy
Python | 269 lines | 229 code | 17 blank | 23 comment | 12 complexity | 17d299638cace1782d3170ab9f9f3621 MD5 | raw file
  1. """Suite Mozilla suite: Experimental Mozilla suite
  2. Level 1, version 1
  3. Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
  4. AETE/AEUT resource version 1/0, language 0, script 0
  5. """
  6. import aetools
  7. import MacOS
  8. _code = 'MOSS'
  9. class Mozilla_suite_Events:
  10. def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):
  11. """Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator.
  12. Keyword argument _attributes: AppleEvent attribute dictionary
  13. Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes)
  14. """
  15. _code = 'MOSS'
  16. _subcode = 'Impt'
  17. if _arguments: raise TypeError, 'No optional args expected'
  18. if _no_object is not None: raise TypeError, 'No direct arg expected'
  19. _reply, _arguments, _attributes = self.send(_code, _subcode,
  20. _arguments, _attributes)
  21. if _arguments.get('errn', 0):
  22. raise aetools.Error, aetools.decodeerror(_arguments)
  23. # XXXX Optionally decode result
  24. if _arguments.has_key('----'):
  25. return _arguments['----']
  26. def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments):
  27. """Get Profile Name: Get the current User Profile
  28. Keyword argument _attributes: AppleEvent attribute dictionary
  29. Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder.
  30. """
  31. _code = 'MOSS'
  32. _subcode = 'upro'
  33. if _arguments: raise TypeError, 'No optional args expected'
  34. if _no_object is not None: raise TypeError, 'No direct arg expected'
  35. _reply, _arguments, _attributes = self.send(_code, _subcode,
  36. _arguments, _attributes)
  37. if _arguments.get('errn', 0):
  38. raise aetools.Error, aetools.decodeerror(_arguments)
  39. # XXXX Optionally decode result
  40. if _arguments.has_key('----'):
  41. return _arguments['----']
  42. def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments):
  43. """Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL
  44. Keyword argument _attributes: AppleEvent attribute dictionary
  45. Returns: Will return text of the from \xd2FILE://foo/applicationname\xd3
  46. """
  47. _code = 'MOSS'
  48. _subcode = 'wurl'
  49. if _arguments: raise TypeError, 'No optional args expected'
  50. if _no_object is not None: raise TypeError, 'No direct arg expected'
  51. _reply, _arguments, _attributes = self.send(_code, _subcode,
  52. _arguments, _attributes)
  53. if _arguments.get('errn', 0):
  54. raise aetools.Error, aetools.decodeerror(_arguments)
  55. # XXXX Optionally decode result
  56. if _arguments.has_key('----'):
  57. return _arguments['----']
  58. _argmap_Go = {
  59. 'direction' : 'dire',
  60. }
  61. def Go(self, _object, _attributes={}, **_arguments):
  62. """Go: navigate a window: back, forward, again(reload), home)
  63. Required argument: window
  64. Keyword argument direction: undocumented, typecode 'dire'
  65. Keyword argument _attributes: AppleEvent attribute dictionary
  66. """
  67. _code = 'MOSS'
  68. _subcode = 'gogo'
  69. aetools.keysubst(_arguments, self._argmap_Go)
  70. _arguments['----'] = _object
  71. aetools.enumsubst(_arguments, 'dire', _Enum_dire)
  72. _reply, _arguments, _attributes = self.send(_code, _subcode,
  73. _arguments, _attributes)
  74. if _arguments.get('errn', 0):
  75. raise aetools.Error, aetools.decodeerror(_arguments)
  76. # XXXX Optionally decode result
  77. if _arguments.has_key('----'):
  78. return _arguments['----']
  79. def Handle_command(self, _object, _attributes={}, **_arguments):
  80. """Handle command: Handle a command
  81. Required argument: The command to handle
  82. Keyword argument _attributes: AppleEvent attribute dictionary
  83. """
  84. _code = 'MOSS'
  85. _subcode = 'hcmd'
  86. if _arguments: raise TypeError, 'No optional args expected'
  87. _arguments['----'] = _object
  88. _reply, _arguments, _attributes = self.send(_code, _subcode,
  89. _arguments, _attributes)
  90. if _arguments.get('errn', 0):
  91. raise aetools.Error, aetools.decodeerror(_arguments)
  92. # XXXX Optionally decode result
  93. if _arguments.has_key('----'):
  94. return _arguments['----']
  95. def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments):
  96. """Open Address Book: Opens the address book
  97. Keyword argument _attributes: AppleEvent attribute dictionary
  98. """
  99. _code = 'MOSS'
  100. _subcode = 'addr'
  101. if _arguments: raise TypeError, 'No optional args expected'
  102. if _no_object is not None: raise TypeError, 'No direct arg expected'
  103. _reply, _arguments, _attributes = self.send(_code, _subcode,
  104. _arguments, _attributes)
  105. if _arguments.get('errn', 0):
  106. raise aetools.Error, aetools.decodeerror(_arguments)
  107. # XXXX Optionally decode result
  108. if _arguments.has_key('----'):
  109. return _arguments['----']
  110. def Open_Component(self, _object, _attributes={}, **_arguments):
  111. """Open Component: Open a Communicator component
  112. Required argument: The component to open
  113. Keyword argument _attributes: AppleEvent attribute dictionary
  114. """
  115. _code = 'MOSS'
  116. _subcode = 'cpnt'
  117. if _arguments: raise TypeError, 'No optional args expected'
  118. _arguments['----'] = _object
  119. _reply, _arguments, _attributes = self.send(_code, _subcode,
  120. _arguments, _attributes)
  121. if _arguments.get('errn', 0):
  122. raise aetools.Error, aetools.decodeerror(_arguments)
  123. # XXXX Optionally decode result
  124. if _arguments.has_key('----'):
  125. return _arguments['----']
  126. def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):
  127. """Open Profile Manager: Open the user profile manager (obsolete)
  128. Keyword argument _attributes: AppleEvent attribute dictionary
  129. """
  130. _code = 'MOSS'
  131. _subcode = 'prfl'
  132. if _arguments: raise TypeError, 'No optional args expected'
  133. if _no_object is not None: raise TypeError, 'No direct arg expected'
  134. _reply, _arguments, _attributes = self.send(_code, _subcode,
  135. _arguments, _attributes)
  136. if _arguments.get('errn', 0):
  137. raise aetools.Error, aetools.decodeerror(_arguments)
  138. # XXXX Optionally decode result
  139. if _arguments.has_key('----'):
  140. return _arguments['----']
  141. def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
  142. """Open bookmark: Reads in a bookmark file
  143. Required argument: If not available, reloads the current bookmark file
  144. Keyword argument _attributes: AppleEvent attribute dictionary
  145. """
  146. _code = 'MOSS'
  147. _subcode = 'book'
  148. if _arguments: raise TypeError, 'No optional args expected'
  149. _arguments['----'] = _object
  150. _reply, _arguments, _attributes = self.send(_code, _subcode,
  151. _arguments, _attributes)
  152. if _arguments.get('errn', 0):
  153. raise aetools.Error, aetools.decodeerror(_arguments)
  154. # XXXX Optionally decode result
  155. if _arguments.has_key('----'):
  156. return _arguments['----']
  157. _argmap_Read_help_file = {
  158. 'with_index' : 'idid',
  159. 'search_text' : 'sear',
  160. }
  161. def Read_help_file(self, _object, _attributes={}, **_arguments):
  162. """Read help file: Reads in the help file (file should be in the help file format)
  163. Required argument: undocumented, typecode 'alis'
  164. Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5)
  165. Keyword argument search_text: Optional text to search for
  166. Keyword argument _attributes: AppleEvent attribute dictionary
  167. """
  168. _code = 'MOSS'
  169. _subcode = 'help'
  170. aetools.keysubst(_arguments, self._argmap_Read_help_file)
  171. _arguments['----'] = _object
  172. _reply, _arguments, _attributes = self.send(_code, _subcode,
  173. _arguments, _attributes)
  174. if _arguments.get('errn', 0):
  175. raise aetools.Error, aetools.decodeerror(_arguments)
  176. # XXXX Optionally decode result
  177. if _arguments.has_key('----'):
  178. return _arguments['----']
  179. _Enum_comp = {
  180. 'Navigator' : 'navg', # The Navigator component
  181. 'InBox' : 'inbx', # The InBox component
  182. 'Newsgroups' : 'colb', # The Newsgroups component
  183. 'Composer' : 'cpsr', # The Page Composer component
  184. 'Conference' : 'conf', # The Conference Component
  185. 'Calendar' : 'cald', # The Calendar Component
  186. }
  187. _Enum_dire = {
  188. 'again' : 'agai', # Again (reload)
  189. 'home' : 'home', # Home
  190. 'backward' : 'prev', # Previous page
  191. 'forward' : 'next', # Next page
  192. }
  193. _Enum_ncmd = {
  194. 'Get_new_mail' : '\x00\x00\x04W', #
  195. 'Send_queued_messages' : '\x00\x00\x04X', #
  196. 'Read_newsgroups' : '\x00\x00\x04\x04', #
  197. 'Show_Inbox' : '\x00\x00\x04\x05', #
  198. 'Show_Bookmarks_window' : '\x00\x00\x04\x06', #
  199. 'Show_History_window' : '\x00\x00\x04\x07', #
  200. 'Show_Address_Book_window' : '\x00\x00\x04\t', #
  201. }
  202. #
  203. # Indices of types declared in this module
  204. #
  205. _classdeclarations = {
  206. }
  207. _propdeclarations = {
  208. }
  209. _compdeclarations = {
  210. }
  211. _enumdeclarations = {
  212. 'comp' : _Enum_comp,
  213. 'dire' : _Enum_dire,
  214. 'ncmd' : _Enum_ncmd,
  215. }