MIMETypes.st
changeset 1888 ef0f346b8f43
parent 1887 ae19bd933dbd
child 1889 1ee468c2ae02
--- a/MIMETypes.st	Fri Jan 16 16:00:43 2004 +0100
+++ b/MIMETypes.st	Tue Jan 20 14:16:32 2004 +0100
@@ -211,6 +211,8 @@
     types addAll:self videoTypeList.
     types addAll:self audioTypeList.
     types addAll:self applicationTypeList.
+    types addAll:self osSpecificTypeList.
+
     types pairWiseDo:[:suff :typeString|
         |type|
 
@@ -234,6 +236,10 @@
             FilenameToTypeMapping at:nm put:type
         ]
     ].
+
+    "
+     self initializeFileNameToMimeTypeMapping
+    "
 !
 
 initializeImageReaderMappings
@@ -351,7 +357,8 @@
         ('au' 'snd')            'audio/basic'
         ('ra')                  'audio/x-realaudio'
         ('ram' 'rm')            'audio/x-pn-realaudio'
-        'rpm'                   'audio/x-pn-realaudio-plugin'
+"/ cg: see unixSpecific / windowsSpecific
+"/        'rpm'                   'audio/x-pn-realaudio-plugin'
         ('mpa' 'mpega')         'audio/mpeg'
         "/ 'mp3'                   'audio/x-mp3'
         ('mp3' 'mp2')           'audio/mpeg'
@@ -395,6 +402,13 @@
     )
 !
 
+osSpecificTypeList
+    OperatingSystem isMSWINDOWSlike ifTrue:[
+        ^ self windowsSpecificTypeList
+    ].
+    ^ self unixSpecificTypeList
+!
+
 textTypeList
    "/ misc text ...
 
@@ -406,6 +420,15 @@
     )
 !
 
+unixSpecificTypeList
+
+    ^ #(
+"/ cg: RPM is 'audio/x-pn-realaudio-plugin' for WIN32
+"/     and 'application/x-rpm' for Unix
+        'rpm'                   'application/x-rpm'
+    )
+!
+
 videoTypeList
     "/ video formats ...
 
@@ -418,6 +441,14 @@
         'rm'                               'application/vnd.rn-realmedia'
         'rv'                               'video/x-pn-realvideo'
    )
+!
+
+windowsSpecificTypeList
+    ^ #(
+"/ cg: RPM is 'audio/x-pn-realaudio-plugin' for WIN32
+"/     and 'application/x-rpm' for Unix
+        'rpm'                   'audio/x-pn-realaudio-plugin'
+    )
 ! !
 
 !MIMETypes class methodsFor:'obsolete'!
@@ -575,6 +606,7 @@
 
     "
      self mimeTypeForSuffix:'gif'     
+     self mimeTypeForSuffix:'rpm'     
     "
 
     "Created: / 30.6.1997 / 21:55:51 / cg"
@@ -883,7 +915,7 @@
 !MIMETypes class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.67 2004-01-16 15:00:43 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.68 2004-01-20 13:16:32 cg Exp $'
 ! !
 
 MIMETypes initialize!