MIMETypes.st
changeset 1606 158c10a36736
parent 1604 0c678133dc4b
child 1609 090ee7aa4cab
equal deleted inserted replaced
1605:1ad483b9ac1d 1606:158c10a36736
    75 ! !
    75 ! !
    76 
    76 
    77 !MIMETypes class methodsFor:'initialization'!
    77 !MIMETypes class methodsFor:'initialization'!
    78 
    78 
    79 applicationComprAndArchiveTypeList
    79 applicationComprAndArchiveTypeList
    80     "/ compressors and archivers
    80     "compressors and archivers"
    81 
    81 
    82     ^ #(
    82     ^ #(
    83 
    83 
    84         'tar'                   'application/x-tar'
    84         'tar'                   'application/x-tar'
    85         'gtar'                  'application/x-gtar'
    85         'gtar'                  'application/x-gtar'
    91         'jar'                   'application/java-archive'
    91         'jar'                   'application/java-archive'
    92     )
    92     )
    93 !
    93 !
    94 
    94 
    95 applicationProgLangTypeList
    95 applicationProgLangTypeList
    96     "/ applications for programm languages
    96     "applications for programm languages"
    97 
    97 
    98     ^ #(
    98     ^ #(
    99         ('st' 'cls')                 'application/x-smalltalk-source'
    99         ('st' 'cls')                 'application/x-smalltalk-source'
   100         'sif'                        'application/x-smalltalk-source-sif'
   100         'sif'                        'application/x-smalltalk-source-sif'
   101         'c'                          'application/x-c-source'
   101         'c'                          'application/x-c-source'
   111         ('asn1' 'x409' 'gdmo' 'gdm') 'application/x-asn1-source'
   111         ('asn1' 'x409' 'gdmo' 'gdm') 'application/x-asn1-source'
   112     )
   112     )
   113 !
   113 !
   114 
   114 
   115 applicationTextTypeList
   115 applicationTextTypeList
   116     "/ text applications
   116     "text applications"
   117 
   117 
   118     ^ #(
   118     ^ #(
   119         ('ps' 'eps')                 'application/postscript'
   119         ('ps' 'eps')                 'application/postscript'
   120         'pdf'                        'application/pdf'
   120         'pdf'                        'application/pdf'
   121         'rtf'                        'application/rtf'
   121         'rtf'                        'application/rtf'
   122         'doc'                        'application/winword'
   122         'doc'                        'application/winword'
   123     )
   123     )
   124 !
   124 !
   125 
   125 
   126 applicationTypeList
   126 applicationTypeList
   127     "/ applications
   127     "applications"
   128 
   128 
   129     |types|                            
   129     |types|                            
   130 
   130 
   131     types := Array new.
   131     types := OrderedCollection new.
   132     types addAll:self applicationProgLangTypeList.
   132     types addAll:self applicationProgLangTypeList.
   133     types addAll:self applicationTextTypeList.
   133     types addAll:self applicationTextTypeList.
   134     types addAll:self applicationComprAndArchiveTypeList.
   134     types addAll:self applicationComprAndArchiveTypeList.
   135     ^ types
   135     ^ types
   136 !
   136 !
   137 
   137 
   138 audioTypeList
   138 audioTypeList
   139     "/ audio formats ...
   139     "audio formats ..."
   140 
   140 
   141     ^ #(
   141     ^ #(
   142         ('ra' 'ram')            'audio/x-pn-realaudio'
   142         ('ra' 'ram')            'audio/x-pn-realaudio'
   143         ('mpa' 'mpega')         'audio/x-mpeg'
   143         ('mpa' 'mpega')         'audio/x-mpeg'
   144         ('mp3' )                'audio/x-mp3'
   144         ('mp3' )                'audio/x-mp3'
   192         FileSuffixToTypeMapping := fileSuffixToTypeMapping := Dictionary new
   192         FileSuffixToTypeMapping := fileSuffixToTypeMapping := Dictionary new
   193     ].
   193     ].
   194 
   194 
   195     "/ setup file-suffix to mimeType mapping ...
   195     "/ setup file-suffix to mimeType mapping ...
   196 
   196 
   197     types := Array new.
   197     types := OrderedCollection new.
   198     types addAll:self textTypeList.
   198     types addAll:self textTypeList.
   199     types addAll:self imageTypeList.
   199     types addAll:self imageTypeList.
   200     types addAll:self videoTypeList.
   200     types addAll:self videoTypeList.
   201     types addAll:self audioTypeList.
   201     types addAll:self audioTypeList.
   202     types addAll:self applicationTypeList.
   202     types addAll:self applicationTypeList.
   627 ! !
   627 ! !
   628 
   628 
   629 !MIMETypes class methodsFor:'documentation'!
   629 !MIMETypes class methodsFor:'documentation'!
   630 
   630 
   631 version
   631 version
   632     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.37 2002-09-10 13:50:49 penk Exp $'
   632     ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.38 2002-09-10 15:05:09 cg Exp $'
   633 ! !
   633 ! !
   634 MIMETypes initialize!
   634 MIMETypes initialize!