Distribution: | General Release |
Title: | URI Handler Functional Specification |
Drawing Number: | 1215,215/FS |
Issue: | 2 |
Author(s): | Carl Elkins |
Stewart Brodie | |
Kevin Bracey | |
Simon Middleton | |
Ben Laughton | |
Andrew Hodgkinson | |
Date: | 01/09/98 |
Change Number: | ECO 4102 |
Last Issue: | 1 |
*Desktop_AcornURI
(starts the URI handler)
*URIinfo
(display information about the URI handler)
*URIdispatch
(try to launch a URI)
1307,260/FS | (Developers and, by issue 8, general release) | |
1 | 13/12/96 | Original Version |
2 | 21/12/96 | Added 'handles' concept after discussions with S.Brodie |
3 | 22/02/97 | Corrected omission of URI handle from Message_ReturnResult, clarified responsibility for invalidation of URIs |
4 | 21/04/97 | Added URI_MProcessAck message and *command documentation and updated URI filetype section |
5 | 13/06/97 | Service calls given flags, so 'Check' service call removed. R0
return of URI_Dispatch now a bitfield, not a return value. Added
Service_MReturnResult. Desktop_URI renamed to
Desktop_AcornURI to match the actual module task name.
URI file contents specified; includes a version number linked to
the module version, so this specifies a version 5 file. |
6 | 20/06/97 | Following review of draft 5, some minor wording changes here and there; performance targets and development test strategy sections added |
7 | 21/06/97 | Reworded away from future tense to form an externally releasable specification |
8 | 10/12/97 | A couple of implied future tense references missed in Draft 7, now corrected; some minor rewording associated with this |
11/12/97 | No longer draft; settled on WIMP rather than Wimp; couple of minor typos corrected | |
05/01/98 | Few more typos fixed ('21', '23', 'URI_ProcessAck' and 'URIProcessAck' instead of 'R2', '32', 'URI_MProcessAck' and again 'URI_MProcessAck' respectively) | |
05/02/98 | Minor tweaks to fit in with the rest of the Acorn Internet site (now uses a small style sheet like everything else, site map link added, and so-on). No changes to the content of the specification | |
19/02/98 | A few HTML style changes to make some of the section headings a bit clearer; no content change | |
23/02/98 | Colours changed to blue; now back to green again | |
1215,215/FS |
(General release) |
|
1 | 02/03/98 | Document number now 1215,215/FS. Updated history, and navigation links in the page footer now include the specifications section; no other content changes |
2 | 01/09/98 | Corrected table listing allocated items in the Programmer's Interface section - module name is 'AcornURI', not 'URI'. Issue numbers for 1215,215/FS in this table are now in <strong> to match the 1307,260/FS numbers. ECO 4102 allocated for these changes. |
Module name | AcornURI |
SWI prefix | URI |
SWI chunk | &4E380 |
WIMP message chunk | &4E380 |
Error code chunk | &810A00 |
Service Call | &A7 |
FileType | &F91 |
URI_Version (&4E380) |
R0 = flags: | bit | meaning if set |
0-31 | reserved (0) |
R0 = current version * 100 |
URI_Dispatch (&4E381) |
R0 = flags: | bit | meaning if set |
0 | inform caller of result (=>R2 valid) | |
1 | check only, don't process (R0:0 must be set) | |
2 | don't attempt external process startup | |
3-31 | reserved (0) | |
R1 = pointer to 0 terminated URI string | ||
R2 = 0, or source task handle if bit R0:0 is set and the caller is a WIMP task |
R0 = flags: | bit | meaning if set |
0 | request rejected, URI won't be dispatched | |
1-31 | reserved (0) | |
R2 = task handle of URI handler | ||
R3 = handle of this URI (request identifier) | ||
All other registers preserved. |
URI_RequestURI (&4E382) |
R0 = flags: | bit | meaning if set |
0-31 | reserved (0) | |
R1 = pointer to buffer to hold URI or 0 to read required size | ||
R2 = length of buffer or unused (if R1 = 0) | ||
R3 = URI handle |
R2 = offset into buffer of terminating null, or size of buffer required (if R1 = 0 on entry) |
All other registers preserved. |
URI_InvalidateURI (&4E383) |
R0 = flags: | bit | meaning if set |
0-31 | reserved (0) | |
R3 = URI handle |
All registers preserved. |
Reason 0: Service_URI_Started |
URI handler started |
R0 = 0 (reason code) | ||
R1 = &A7 (service call) | ||
R2 = flags: | bit | meaning if set |
0-31 | reserved (0) |
All registers must be preserved - the call must be passed on. |
Reason 1: Service_URI_Dying |
URI handler dying |
R0 = 1 (reason code) | ||
R1 = &A7 (service call) | ||
R2 = flags: | bit | meaning if set |
0-31 | reserved (0) |
All registers must be preserved - the call must be passed on. |
Reason 2: Service_URI_Process |
Process or check URI |
R0 = 2 (reason code) | ||
R1 = &A7 (service call) | ||
R2 = flags: | bit | meaning if set |
0 | check URI only, do not process | |
1-31 | reserved (0) | |
R3 = pointer to URI string (readonly access) | ||
R4 = handle of this URI |
R1 preserved or 0 to claim All other registers preserved |
Reason 3: Service_URI_ReturnResult |
Return result of a dispatch |
R0 = 3 (reason code) | ||
R1 = &A7 (service call) | ||
R2 = flags: | bit | meaning if set |
0 |
0 => URI was claimed for processing 1 => URI was not claimed for processing |
|
1-31 | reserved (0) | |
R3 = undefined (reserved (0)) | ||
R4 = handle of this URI |
Message &4E380: URI_MStarted |
URI handler started |
R1+20 = flags: | bit | meaning if set |
0-31 | reserved (0) | |
R1+24... undefined (reserved) |
Message &4E381: URI_MDying |
URI handler dying |
R1+20 = flags: | bit | meaning if set |
0-31 | reserved (0) | |
R1+24... undefined (reserved) |
Message &4E382: URI_MProcess |
Process or check URI |
R1+20 = flags: | bit | meaning if set |
0 | check URI only, do not process | |
0-31 | reserved (0) | |
R1+24 = pointer to URI string (URI internal buffer) | ||
R1+28 = URI handle | ||
R1+32... undefined (reserved) |
Message &4E383: URI_MReturnResult |
Return result of a dispatch |
R1+20 = flags: | bit | meaning if set |
0 |
0 => URI was claimed for processing 1 => URI was not claimed for processing |
|
1-31 | reserved (0) | |
R1+24 = URI handle | ||
R1+28... undefined (reserved) |
Message &4E384: URI_MProcessAck |
Acknowledge URI_MProcess |
R1+20 = flags: | bit | meaning if set |
0 | Check URI only, do not process | |
1-31 | reserved (0) | |
R1+24 = pointer to URI string (URI internal buffer) | ||
R1+28 = URI handle | ||
R1+32... undefined (reserved) |
*Desktop_AcornURI
*Desktop_AcornURI
*Desktop_AcornURI
starts the Acorn URI handler.
Do not use *Desktop_AcornURI
, use
*Desktop
instead.
Do not use *Desktop_AcornURI, use *Desktop instead.
Syntax: *Desktop_AcornURI
*Desktop_AcornURI
Use *Desktop to start AcornURI
*URIinfo
*URIinfo
*URIinfo
produces status information from
the Acorn URI handler
URIinfo produces status information from the Acorn URI handler.
Syntax: *URIinfo
*URIinfo
URI_taskhandle: 4b4016d8
URI chain start: 021cc844
URI handle: 022b60d4 (action:00020000) 'http://www.acorn.com/'
*URIdispatch
*URIdispatch <uri>
*URIdispatch
tries to lauch a given URI.
No indication is given of whether or not the
launch succeeded.
URIdispatch tries to launch a URI.
Syntax: *URIdispatch <uri>
*URIdispatch http://www.acorn.com/
Name | Number | Cause |
---|---|---|
Error_URI_NoMemory | Base + 1 | There is not enough memory to complete an operation. |
Error_URI_BadURI | Base + 2 | An empty URI string is supplied (e.g. to URI_DispatchURI). |
Error_URI_BadHandle | Base + 3 | A bad URI handle has been supplied. |
Error_URI_BadFile | Base + 4 | Reported when there is an error accessing a URI file. |
Generator | Returns |
---|---|
URI_DispatchURI | Error_URI_NoMemory Error_URI_BadURI |
URI_RequestURI | Error_URI_BadHandle |
URI_InvalidateURI | Error_URI_BadHandle |
*URIDispatch | Error_URI_NoMemory |
Supporting URI module version | Line number | Contents |
---|---|---|
(None at present) | 1 | 'URI' - this must be present before any comments or other information. |
2 | Text equivalent of the earliest module version number (as returned by URI_Version) that would fully understand the file contents; e.g. '5' for v0.05 (any number of preceeding '0's are also valid). So if lines were added to this file format to produce a version 6 file, this implies that URI v0.06 is required to understand those extra lines, even though v0.05 would still understand lines 1 to 4. The first general release version of the URI handler will adopt a version number of 1.00, so the first URI files will start with '100' in this line. | |
3 | A fully specified URI; v0.05 of the URI handler does not attempt to canonicalise URIs, though future versions may. If this line contains only one character with ASCII code 42 ('*'), the file does not contain a URI and should be ignored (this is to allow future file formats to hold non-fully specified URIs on later lines that could be canonicalised by the URI module, without breaking legacy file reading code). Lines 1 to 3 are required in a minimal URI file. Any other lines may or may not appear. | |
4 | A title string to associate with the URI. Again, if this line contains only one character with ASCII code 42 ('*'), the file does not contain a title string. Processors wishing to display title information alongside a URI may well use the URI itself instead, in this case. |
URI 6 * Acorn Group PLC www.acorn.com <Browse$Dir>.!Run
Alias$Open_URI_<scheme> <file run to>
for example,
Alias$Open_URI_http <Browse>.!Run
Alias$Open_URI_ftp <FTPClient>.!Run
If a variable such as the above is defined, then the task it names will
be run. If this is successful, the URI will be redispatched in the normal
way, so the task has the opportunity of dealing with it.
A comma separated list of handlers may be specified, so applications
must always add to the contents of the variables. At present, only
the first item in the list is used, though this may change in
future versions.
For compatability with existing applications, the URI handler will
support a similar scheme of system variables defined by ANT Ltd.
Details of these are at the time of writing freely available on
the ANT web site.