mime-0.3.2: Working with MIME types.Source codeContentsIndex
Codec.MIME.Type
Portabilityportable
Stabilityprovisional
MaintainerSigbjorn Finne <sigbjorn.finne@gmail.com>
Description
Representing MIME types and values.
Synopsis
data Type = Type {
mimeType :: MIMEType
mimeParams :: [(String, String)]
}
nullType :: Type
showType :: Type -> String
showMIMEParams :: [(String, String)] -> String
data MIMEType
= Application SubType
| Audio SubType
| Image SubType
| Message SubType
| Model SubType
| Multipart Multipart
| Text TextType
| Video SubType
| Other String SubType
showMIMEType :: MIMEType -> String
data MIMEPair = MIMEPair String SubType
showMIMEPair :: MIMEPair -> String
type SubType = String
type TextType = SubType
subTypeString :: Type -> String
majTypeString :: Type -> String
data Multipart
= Alternative
| Byteranges
| Digest
| Encrypted
| FormData
| Mixed
| Parallel
| Related
| Signed
| Extension String
| OtherMulti String
isXmlBased :: Type -> Bool
isXmlType :: Type -> Bool
showMultipart :: Multipart -> String
type Content = String
data MIMEValue = MIMEValue {
mime_val_type :: Type
mime_val_disp :: Maybe Disposition
mime_val_content :: MIMEContent
mime_val_headers :: [(String, String)]
mime_val_inc_type :: Bool
}
nullMIMEValue :: MIMEValue
data MIMEContent
= Single Content
| Multi [MIMEValue]
data Disposition = Disposition {
dispType :: DispType
dispParams :: [DispParam]
}
data DispType
= DispInline
| DispAttachment
| DispFormData
| DispOther String
data DispParam
= Name String
| Filename String
| CreationDate String
| ModDate String
| ReadDate String
| Size String
| OtherParam String String
Documentation
data Type Source
Constructors
Type
mimeType :: MIMEType
mimeParams :: [(String, String)]
show/hide Instances
nullType :: TypeSource
The null MIME record type value; currently a text/plain.
showType :: Type -> StringSource
showMIMEParams :: [(String, String)] -> StringSource
data MIMEType Source
Constructors
Application SubType
Audio SubType
Image SubType
Message SubType
Model SubType
Multipart Multipart
Text TextType
Video SubType
Other String SubType
show/hide Instances
showMIMEType :: MIMEType -> StringSource
data MIMEPair Source
a (type, subtype) MIME pair.
Constructors
MIMEPair String SubType
show/hide Instances
showMIMEPair :: MIMEPair -> StringSource
type SubType = StringSource
default subtype representation.
type TextType = SubTypeSource
subtype for text content; currently just a string.
subTypeString :: Type -> StringSource
majTypeString :: Type -> StringSource
data Multipart Source
Constructors
Alternative
Byteranges
Digest
Encrypted
FormData
Mixed
Parallel
Related
Signed
Extension Stringe.g., 'x-foo' (i.e., includes the 'x-' bit)
OtherMulti String
show/hide Instances
isXmlBased :: Type -> BoolSource
isXmlType :: Type -> BoolSource
showMultipart :: Multipart -> StringSource
type Content = StringSource
data MIMEValue Source
Constructors
MIMEValue
mime_val_type :: Type
mime_val_disp :: Maybe Disposition
mime_val_content :: MIMEContent
mime_val_headers :: [(String, String)]
mime_val_inc_type :: Bool
show/hide Instances
nullMIMEValue :: MIMEValueSource
data MIMEContent Source
Constructors
Single Content
Multi [MIMEValue]
show/hide Instances
data Disposition Source
Constructors
Disposition
dispType :: DispType
dispParams :: [DispParam]
show/hide Instances
data DispType Source
Constructors
DispInline
DispAttachment
DispFormData
DispOther String
show/hide Instances
data DispParam Source
Constructors
Name String
Filename String
CreationDate String
ModDate String
ReadDate String
Size String
OtherParam String String
show/hide Instances
Produced by Haddock version 2.4.2