ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py

#countcontent
1n/a"""Suite Mozilla suite: Experimental Mozilla suite
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'MOSS'
12n/a
13n/aclass Mozilla_suite_Events:
14n/a
15n/a def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):
16n/a """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.
17n/a Keyword argument _attributes: AppleEvent attribute dictionary
18n/a 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)
19n/a """
20n/a _code = 'MOSS'
21n/a _subcode = 'Impt'
22n/a
23n/a if _arguments: raise TypeError, 'No optional args expected'
24n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
25n/a
26n/a
27n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
28n/a _arguments, _attributes)
29n/a if _arguments.get('errn', 0):
30n/a raise aetools.Error, aetools.decodeerror(_arguments)
31n/a # XXXX Optionally decode result
32n/a if _arguments.has_key('----'):
33n/a return _arguments['----']
34n/a
35n/a def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments):
36n/a """Get Profile Name: Get the current User Profile
37n/a Keyword argument _attributes: AppleEvent attribute dictionary
38n/a Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder.
39n/a """
40n/a _code = 'MOSS'
41n/a _subcode = 'upro'
42n/a
43n/a if _arguments: raise TypeError, 'No optional args expected'
44n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
45n/a
46n/a
47n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
48n/a _arguments, _attributes)
49n/a if _arguments.get('errn', 0):
50n/a raise aetools.Error, aetools.decodeerror(_arguments)
51n/a # XXXX Optionally decode result
52n/a if _arguments.has_key('----'):
53n/a return _arguments['----']
54n/a
55n/a def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments):
56n/a """Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL
57n/a Keyword argument _attributes: AppleEvent attribute dictionary
58n/a Returns: Will return text of the from \xd2FILE://foo/applicationname\xd3
59n/a """
60n/a _code = 'MOSS'
61n/a _subcode = 'wurl'
62n/a
63n/a if _arguments: raise TypeError, 'No optional args expected'
64n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
65n/a
66n/a
67n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
68n/a _arguments, _attributes)
69n/a if _arguments.get('errn', 0):
70n/a raise aetools.Error, aetools.decodeerror(_arguments)
71n/a # XXXX Optionally decode result
72n/a if _arguments.has_key('----'):
73n/a return _arguments['----']
74n/a
75n/a _argmap_Go = {
76n/a 'direction' : 'dire',
77n/a }
78n/a
79n/a def Go(self, _object, _attributes={}, **_arguments):
80n/a """Go: navigate a window: back, forward, again(reload), home)
81n/a Required argument: window
82n/a Keyword argument direction: undocumented, typecode 'dire'
83n/a Keyword argument _attributes: AppleEvent attribute dictionary
84n/a """
85n/a _code = 'MOSS'
86n/a _subcode = 'gogo'
87n/a
88n/a aetools.keysubst(_arguments, self._argmap_Go)
89n/a _arguments['----'] = _object
90n/a
91n/a aetools.enumsubst(_arguments, 'dire', _Enum_dire)
92n/a
93n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
94n/a _arguments, _attributes)
95n/a if _arguments.get('errn', 0):
96n/a raise aetools.Error, aetools.decodeerror(_arguments)
97n/a # XXXX Optionally decode result
98n/a if _arguments.has_key('----'):
99n/a return _arguments['----']
100n/a
101n/a def Handle_command(self, _object, _attributes={}, **_arguments):
102n/a """Handle command: Handle a command
103n/a Required argument: The command to handle
104n/a Keyword argument _attributes: AppleEvent attribute dictionary
105n/a """
106n/a _code = 'MOSS'
107n/a _subcode = 'hcmd'
108n/a
109n/a if _arguments: raise TypeError, 'No optional args expected'
110n/a _arguments['----'] = _object
111n/a
112n/a
113n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
114n/a _arguments, _attributes)
115n/a if _arguments.get('errn', 0):
116n/a raise aetools.Error, aetools.decodeerror(_arguments)
117n/a # XXXX Optionally decode result
118n/a if _arguments.has_key('----'):
119n/a return _arguments['----']
120n/a
121n/a def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments):
122n/a """Open Address Book: Opens the address book
123n/a Keyword argument _attributes: AppleEvent attribute dictionary
124n/a """
125n/a _code = 'MOSS'
126n/a _subcode = 'addr'
127n/a
128n/a if _arguments: raise TypeError, 'No optional args expected'
129n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
130n/a
131n/a
132n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
133n/a _arguments, _attributes)
134n/a if _arguments.get('errn', 0):
135n/a raise aetools.Error, aetools.decodeerror(_arguments)
136n/a # XXXX Optionally decode result
137n/a if _arguments.has_key('----'):
138n/a return _arguments['----']
139n/a
140n/a def Open_Component(self, _object, _attributes={}, **_arguments):
141n/a """Open Component: Open a Communicator component
142n/a Required argument: The component to open
143n/a Keyword argument _attributes: AppleEvent attribute dictionary
144n/a """
145n/a _code = 'MOSS'
146n/a _subcode = 'cpnt'
147n/a
148n/a if _arguments: raise TypeError, 'No optional args expected'
149n/a _arguments['----'] = _object
150n/a
151n/a
152n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
153n/a _arguments, _attributes)
154n/a if _arguments.get('errn', 0):
155n/a raise aetools.Error, aetools.decodeerror(_arguments)
156n/a # XXXX Optionally decode result
157n/a if _arguments.has_key('----'):
158n/a return _arguments['----']
159n/a
160n/a def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):
161n/a """Open Profile Manager: Open the user profile manager (obsolete)
162n/a Keyword argument _attributes: AppleEvent attribute dictionary
163n/a """
164n/a _code = 'MOSS'
165n/a _subcode = 'prfl'
166n/a
167n/a if _arguments: raise TypeError, 'No optional args expected'
168n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
169n/a
170n/a
171n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
172n/a _arguments, _attributes)
173n/a if _arguments.get('errn', 0):
174n/a raise aetools.Error, aetools.decodeerror(_arguments)
175n/a # XXXX Optionally decode result
176n/a if _arguments.has_key('----'):
177n/a return _arguments['----']
178n/a
179n/a def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
180n/a """Open bookmark: Reads in a bookmark file
181n/a Required argument: If not available, reloads the current bookmark file
182n/a Keyword argument _attributes: AppleEvent attribute dictionary
183n/a """
184n/a _code = 'MOSS'
185n/a _subcode = 'book'
186n/a
187n/a if _arguments: raise TypeError, 'No optional args expected'
188n/a _arguments['----'] = _object
189n/a
190n/a
191n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
192n/a _arguments, _attributes)
193n/a if _arguments.get('errn', 0):
194n/a raise aetools.Error, aetools.decodeerror(_arguments)
195n/a # XXXX Optionally decode result
196n/a if _arguments.has_key('----'):
197n/a return _arguments['----']
198n/a
199n/a _argmap_Read_help_file = {
200n/a 'with_index' : 'idid',
201n/a 'search_text' : 'sear',
202n/a }
203n/a
204n/a def Read_help_file(self, _object, _attributes={}, **_arguments):
205n/a """Read help file: Reads in the help file (file should be in the help file format)
206n/a Required argument: undocumented, typecode 'alis'
207n/a Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5)
208n/a Keyword argument search_text: Optional text to search for
209n/a Keyword argument _attributes: AppleEvent attribute dictionary
210n/a """
211n/a _code = 'MOSS'
212n/a _subcode = 'help'
213n/a
214n/a aetools.keysubst(_arguments, self._argmap_Read_help_file)
215n/a _arguments['----'] = _object
216n/a
217n/a
218n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
219n/a _arguments, _attributes)
220n/a if _arguments.get('errn', 0):
221n/a raise aetools.Error, aetools.decodeerror(_arguments)
222n/a # XXXX Optionally decode result
223n/a if _arguments.has_key('----'):
224n/a return _arguments['----']
225n/a
226n/a_Enum_comp = {
227n/a 'Navigator' : 'navg', # The Navigator component
228n/a 'InBox' : 'inbx', # The InBox component
229n/a 'Newsgroups' : 'colb', # The Newsgroups component
230n/a 'Composer' : 'cpsr', # The Page Composer component
231n/a 'Conference' : 'conf', # The Conference Component
232n/a 'Calendar' : 'cald', # The Calendar Component
233n/a}
234n/a
235n/a_Enum_dire = {
236n/a 'again' : 'agai', # Again (reload)
237n/a 'home' : 'home', # Home
238n/a 'backward' : 'prev', # Previous page
239n/a 'forward' : 'next', # Next page
240n/a}
241n/a
242n/a_Enum_ncmd = {
243n/a 'Get_new_mail' : '\x00\x00\x04W', #
244n/a 'Send_queued_messages' : '\x00\x00\x04X', #
245n/a 'Read_newsgroups' : '\x00\x00\x04\x04', #
246n/a 'Show_Inbox' : '\x00\x00\x04\x05', #
247n/a 'Show_Bookmarks_window' : '\x00\x00\x04\x06', #
248n/a 'Show_History_window' : '\x00\x00\x04\x07', #
249n/a 'Show_Address_Book_window' : '\x00\x00\x04\t', #
250n/a}
251n/a
252n/a
253n/a#
254n/a# Indices of types declared in this module
255n/a#
256n/a_classdeclarations = {
257n/a}
258n/a
259n/a_propdeclarations = {
260n/a}
261n/a
262n/a_compdeclarations = {
263n/a}
264n/a
265n/a_enumdeclarations = {
266n/a 'comp' : _Enum_comp,
267n/a 'dire' : _Enum_dire,
268n/a 'ncmd' : _Enum_ncmd,
269n/a}