/usr/share/ada/adainclude/aws/aws-mime.ads is in libaws2.10.2-dev 2.10.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2000-2011, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or (at --
-- your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, but --
-- WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public License --
-- along with this library; if not, write to the Free Software Foundation, --
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
-- --
------------------------------------------------------------------------------
package AWS.MIME is
-- Some content type constants. All of them will be defined into this
-- package and associated with the right extensions. It is possible to
-- add new MIME types with the routines below or by placing a file named
-- aws.mime into the startup directory.
--
-- A MIME type is written in two parts: type/format
----------
-- Text --
----------
Text_CSS : constant String := "text/css";
Text_Javascript : constant String := "text/javascript";
Text_HTML : constant String := "text/html";
Text_Plain : constant String := "text/plain";
Text_XML : constant String := "text/xml";
Text_X_SGML : constant String := "text/x-sgml";
-----------
-- Image --
-----------
Image_Gif : constant String := "image/gif";
Image_Jpeg : constant String := "image/jpeg";
Image_Png : constant String := "image/png";
Image_Tiff : constant String := "image/tiff";
Image_Icon : constant String := "image/x-icon";
Image_X_Portable_Anymap : constant String := "image/x-portable-anymap";
Image_X_Portable_Bitmap : constant String := "image/x-portable-bitmap";
Image_X_Portable_Graymap : constant String := "image/x-portable-graymap";
Image_X_Portable_Pixmap : constant String := "image/x-portable-pixmap";
Image_X_RGB : constant String := "image/x-rgb";
Image_X_Xbitmap : constant String := "image/x-xbitmap";
Image_X_Xpixmap : constant String := "image/x-xpixmap";
Image_X_Xwindowdump : constant String := "image/x-xwindowdump";
-----------------
-- Application --
-----------------
Application_Postscript : constant String := "application/postscript";
Application_Pdf : constant String := "application/pdf";
Application_Zip : constant String := "application/zip";
Application_Octet_Stream : constant String := "application/octet-stream";
Application_Form_Data : constant String
:= "application/x-www-form-urlencoded";
Application_Mac_Binhex40 : constant String := "application/mac-binhex40";
Application_Msword : constant String := "application/msword";
Application_Powerpoint : constant String := "application/powerpoint";
Application_Rtf : constant String := "application/rtf";
Application_XML : constant String := "application/xml";
Application_X_Compress : constant String := "application/x-compress";
Application_X_GTar : constant String := "application/x-gtar";
Application_X_GZip : constant String := "application/x-gzip";
Application_X_Latex : constant String := "application/x-latex";
Application_X_Sh : constant String := "application/x-sh";
Application_X_Shar : constant String := "application/x-shar";
Application_X_Tar : constant String := "application/x-tar";
Application_X_Tcl : constant String := "application/x-tcl";
Application_X_Tex : constant String := "application/x-tex";
Application_X_Texinfo : constant String := "application/x-texinfo";
Application_X_Troff : constant String := "application/x-troff";
Application_X_Troff_Man : constant String := "application/x-troff-man";
-----------
-- Audio --
-----------
Audio_Basic : constant String := "audio/basic";
Audio_Mpeg : constant String := "audio/mpeg";
Audio_X_Wav : constant String := "audio/x-wav";
Audio_X_Pn_Realaudio : constant String := "audio/x-pn-realaudio";
Audio_X_Pn_Realaudio_Plugin : constant String
:= "audio/x-pn-realaudio-plugin";
Audio_X_Realaudio : constant String := "audio/x-realaudio";
-----------
-- Video --
-----------
Video_Mpeg : constant String := "video/mpeg";
Video_Quicktime : constant String := "video/quicktime";
Video_X_Msvideo : constant String := "video/x-msvideo";
---------------
-- Multipart --
---------------
Multipart_Form_Data : constant String := "multipart/form-data";
Multipart_Byteranges : constant String := "multipart/byteranges";
Multipart_Related : constant String := "multipart/related";
Multipart_X_Mixed_Replace : constant String
:= "multipart/x-mixed-replace";
-------------
-- Setting --
-------------
procedure Add_Extension (Ext : String; MIME_Type : String);
-- Add extension Ext (file extension without the dot, e.g. "txt") to the
-- set of MIME type extension handled by this API. Ext will be mapped to
-- the MIME_Type string.
procedure Add_Regexp (Filename : String; MIME_Type : String);
-- Add a specific rule to the MIME type table. Filename is a regular
-- expression and will be mapped to the MIME_Type string.
---------------
-- MIME Type --
---------------
function Content_Type
(Filename : String;
Default : String := Application_Octet_Stream) return String;
-- Returns the MIME Content Type based on filename's extension or if not
-- found the MIME Content type where Filename matches one of the specific
-- rules set by Add_Regexp (see below).
-- Returns Default if the file type is unknown (i.e. no extension and
-- no regular expression match filename).
function Extension (Content_Type : String) return String;
-- Returns the best guess of the extension to use for the Content Type.
-- Note that extensions added indirectly by Add_Regexp are not searched.
function Is_Text (MIME_Type : String) return Boolean;
-- Returns True if the MIME_Type is a text data
function Is_Audio (MIME_Type : String) return Boolean;
-- Returns True if the MIME_Type is an audio data
function Is_Image (MIME_Type : String) return Boolean;
-- Returns True if the MIME_Type is an image data
function Is_Video (MIME_Type : String) return Boolean;
-- Returns True if the MIME_Type is a video data
function Is_Application (MIME_Type : String) return Boolean;
-- Returns True if the MIME_Type is an application data
procedure Load (MIME_File : String);
-- Load MIME_File, record every MIME type. Note that the format of this
-- file follows the common standard format used by Apache mime.types.
end AWS.MIME;
|