Copyright | (c) 2006-2009 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | Sigbjorn Finne <sigbjorn.finne@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Codec.MIME.Type
Description
Representing MIME types and values.
Synopsis
- data MIMEParam = MIMEParam {
- paramName :: Text
- paramValue :: Text
- data Type = Type {
- mimeType :: MIMEType
- mimeParams :: [MIMEParam]
- nullType :: Type
- showType :: Type -> Text
- showMIMEParams :: [MIMEParam] -> Text
- data MIMEType
- showMIMEType :: MIMEType -> Text
- data MIMEPair = MIMEPair Text SubType
- showMIMEPair :: MIMEPair -> Text
- type SubType = Text
- type TextType = SubType
- subTypeString :: Type -> Text
- majTypeString :: Type -> Text
- data Multipart
- = Alternative
- | Byteranges
- | Digest
- | Encrypted
- | FormData
- | Mixed
- | Parallel
- | Related
- | Signed
- | Extension Text
- | OtherMulti Text
- isXmlBased :: Type -> Bool
- isXmlType :: Type -> Bool
- showMultipart :: Multipart -> Text
- type Content = Text
- data MIMEValue = MIMEValue {
- mime_val_type :: Type
- mime_val_disp :: Maybe Disposition
- mime_val_content :: MIMEContent
- mime_val_headers :: [MIMEParam]
- mime_val_inc_type :: Bool
- nullMIMEValue :: MIMEValue
- data MIMEContent
- data Disposition = Disposition {
- dispType :: DispType
- dispParams :: [DispParam]
- data DispType
- = DispInline
- | DispAttachment
- | DispFormData
- | DispOther Text
- data DispParam
- = Name Text
- | Filename Text
- | CreationDate Text
- | ModDate Text
- | ReadDate Text
- | Size Text
- | OtherParam Text Text
Documentation
Constructors
MIMEParam | |
Fields
|
Constructors
Type | |
Fields
|
showMIMEParams :: [MIMEParam] -> Text Source #
Constructors
Application SubType | |
Audio SubType | |
Image SubType | |
Message SubType | |
Model SubType | |
Multipart Multipart | |
Text TextType | |
Video SubType | |
Other | |
Fields
|
showMIMEType :: MIMEType -> Text Source #
a (type, subtype) MIME pair.
showMIMEPair :: MIMEPair -> Text Source #
subTypeString :: Type -> Text Source #
majTypeString :: Type -> Text Source #
Constructors
Alternative | |
Byteranges | |
Digest | |
Encrypted | |
FormData | |
Mixed | |
Parallel | |
Related | |
Signed | |
Extension Text | e.g., 'x-foo' (i.e., includes the 'x-' bit) |
OtherMulti Text |
isXmlBased :: Type -> Bool Source #
showMultipart :: Multipart -> Text Source #
Constructors
MIMEValue | |
Fields
|
data MIMEContent Source #
Instances
Eq MIMEContent Source # | |
Defined in Codec.MIME.Type | |
Show MIMEContent Source # | |
Defined in Codec.MIME.Type Methods showsPrec :: Int -> MIMEContent -> ShowS show :: MIMEContent -> String showList :: [MIMEContent] -> ShowS |
data Disposition Source #
Constructors
Disposition | |
Fields
|
Instances
Eq Disposition Source # | |
Defined in Codec.MIME.Type | |
Show Disposition Source # | |
Defined in Codec.MIME.Type Methods showsPrec :: Int -> Disposition -> ShowS show :: Disposition -> String showList :: [Disposition] -> ShowS |
Constructors
DispInline | |
DispAttachment | |
DispFormData | |
DispOther Text |
Constructors
Name Text | |
Filename Text | |
CreationDate Text | |
ModDate Text | |
ReadDate Text | |
Size Text | |
OtherParam Text Text |