From: morioka Date: Fri, 19 Jun 1998 22:32:25 +0000 (+0000) Subject: Move structure `mime-content-type' from mime-parse.el. X-Git-Tag: flim-1_5_0~38 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=34003a384cdec9e59999b3c7ff5c69aac572aad5;p=elisp%2Fflim.git Move structure `mime-content-type' from mime-parse.el. --- diff --git a/mime-def.el b/mime-def.el index c16f3b1..a0b50b3 100644 --- a/mime-def.el +++ b/mime-def.el @@ -120,6 +120,32 @@ "][" quoted-printable-hex-chars "]")) +;;; @ Content-Type +;;; + +(defsubst make-mime-content-type (type subtype &optional parameters) + (list* (cons 'type type) + (cons 'subtype subtype) + (nreverse parameters)) + ) + +(defsubst mime-content-type-primary-type (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (car content-type))) + +(defsubst mime-content-type-subtype (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (cadr content-type))) + +(defsubst mime-content-type-parameters (content-type) + "Return primary-type of CONTENT-TYPE." + (cddr content-type)) + +(defsubst mime-content-type-parameter (content-type parameter) + "Return PARAMETER value of CONTENT-TYPE." + (cdr (assoc parameter (mime-content-type-parameters content-type)))) + + ;;; @ MIME-entity ;;;