-(define-structure mime::content-info
- rcnum point-min point-max type parameters encoding children)
-
-(defsubst make-mime-entity-info (rcnum
- point-min point-max
- media-type media-subtype
- parameters encoding children)
- (let ((ctype (if media-type
- (if media-subtype
- (format "%s/%s" media-type media-subtype)
- (symbol-name media-type)))))
- (mime::content-info/create rcnum point-min point-max
- ctype params encoding
- children)
- ))
-
-(defsubst mime-entity-info-point-min (entity-info)
- (mime::content-info/point-min entity-info))
-
-(defsubst mime-entity-info-point-max (entity-info)
- (mime::content-info/point-max entity-info))
+(defsubst make-mime-entity (node-id
+ point-min point-max
+ media-type media-subtype parameters
+ encoding children)
+ (vector node-id point-min point-max
+ media-type media-subtype parameters encoding children))
+
+(defsubst mime-entity-node-id (entity-info) (aref entity-info 0))
+(defsubst mime-entity-point-min (entity-info) (aref entity-info 1))
+(defsubst mime-entity-point-max (entity-info) (aref entity-info 2))
+(defsubst mime-entity-media-type (entity-info) (aref entity-info 3))
+(defsubst mime-entity-media-subtype (entity-info) (aref entity-info 4))
+(defsubst mime-entity-parameters (entity-info) (aref entity-info 5))
+(defsubst mime-entity-encoding (entity-info) (aref entity-info 6))
+(defsubst mime-entity-children (entity-info) (aref entity-info 7))
+
+(defsubst mime-type/subtype-string (type &optional subtype)
+ "Return type/subtype string from TYPE and SUBTYPE."
+ (if type
+ (if subtype
+ (format "%s/%s" type subtype)
+ (format "%s" type))))
+
+(defsubst mime-entity-type/subtype (entity-info)
+ (mime-type/subtype-string (mime-entity-media-type entity-info)
+ (mime-entity-media-subtype entity-info)))