Latest News
!System updates

Development tools
C/C++ Tools

Writing 32-bit code
32-bit introduction
32-bit overview
32-bit technical
Memory issues
Developer tools
Paul Skirrow's Guide (PDF)
Download area

32-bit APIs
API changes
CallASWI
FileCore

RISC OS 5
Overview
BBC BASIC
CDFS driver
OS_ClaimDeviceVector behaviour
CDFS
Draw clipping
GraphicsV
HAL
Internet
UTF8 & Japanese support
International IME support
MIMEMap
Module PostInit/Final
PCI Manager
PDumper
Podules
Resource allocation
SCSI
Service Calls
UCS fonts
USB
WIMP API Changes
WIMP Flags

IYONIX pc
DDR memory
Help system
Keyboard layout
Miscellaneous
PCI slots

Opportunities

Iyonix Ltd
IYONIX home page
Contact details

   

MIMEMap

MimeMap and DOSMap

Traditionally many applications have used the DOSMap settings to determine the RISC OS filetype corresponding to a PC file extension. This is now deprecated and applications should be converted to use the MimeMap module instead.

DOSMap is still available in DOSFS and may be used to override the setting given in the MimeMap file, but it is only for DOSFS to use. DOSFS now behaves as follows:

  1. Look for filetype information in the reserved fields in the directory structure. If Acorn filetype is found, then use that (i.e. if DOS disc was written using an Acorn system).
  2. Look up file extension in DOSMap settings and map to Acorn filetype if one is defined.
  3. Look up file extension in MimeMap and map to Acorn filetype if one is defined.
  4. Nothing available so use type DOS.

The MimeMap module provides a MimeMap_Translate SWI to convert between RISC OS filetypes, MIME content type and file type suffix:

     MimeMap_Translate (&50B00)
On entry:  R0 = input format (see below)
  R1 = filetype (if R0=0), or pointer to string buffer (if R0>0)
  R2 = output format (see below)
   R3 = output buffer, if needed (i.e. if R2 = 1, 2 or 3)
On exit:  R0-R2 preserved
  R3 = result (if R2=0), or pointer to buffer (if R2>0)
 
This SWI may be used to convert between RISC OS file types, MIME content types and 'dot' extensions to file names. An error will be returned if the translation cannot be performed. Strings are always null-terminated.
 
The MimeMap translation formats are:
 
Format  Name  Meaning
0  MMM_TYPE_RISCOS  Filetype as a number
1  MMM_TYPE_RISCOS_STRING  Filetype as string
2  MMM_TYPE_MIME  Content type as string
3  MMM_TYPE_DOT_EXTN  Extension as string
others    reserved

© 2006 IYONIX Ltd 32-bit RISC OS