+2003-09-24 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-message-entity-number,
+ elmo-message-entity-set-number,
+ elmo-message-entity-field,
+ elmo-message-entity-set-field): Moved to elmo-msgdb.el.
+
+ * elmo-msgdb.el (elmo-message-entity-number,
+ elmo-message-entity-set-number,
+ elmo-message-entity-field,
+ elmo-message-entity-set-field): Moved from elmo.el.
+
2003-09-24 Yuuichi Teranishi <teranisi@gohome.org>
* elmo.el (toplevel): Changed definition orders.
;;; MSGDB interface.
;;
;; MSGDB elmo-load-msgdb PATH
-
+;; MSGDB elmo-make-msgdb LOCATION TYPE
;; elmo-msgdb-sort-by-date MSGDB
;; elmo-flag-table-load
;; elmo-crosspost-alist-load
;; elmo-crosspost-alist-save
-;; elmo-msgdb-create-overview-from-buffer NUMBER SIZE TIME
-;; elmo-msgdb-create-overview-entity-from-file NUMBER FILE
-
;; elmo-folder-get-info
;; elmo-folder-get-info-max
;; elmo-folder-get-info-length
;; elmo-folder-get-info-unread
+;;; message entity wrappers
+;;
+(defsubst elmo-message-entity-number (entity)
+ (elmo-msgdb-message-entity-number (elmo-message-entity-handler entity)
+ entity))
+
+(defsubst elmo-message-entity-set-number (entity number)
+ (elmo-msgdb-message-entity-set-number (elmo-message-entity-handler entity)
+ entity
+ number))
+
+(defsubst elmo-message-entity-field (entity field &optional decode)
+ "Get message entity field value.
+ENTITY is the message entity structure obtained by `elmo-message-entity'.
+FIELD is the symbol of the field name.
+if optional DECODE is non-nil, returned value is decoded."
+ (elmo-msgdb-message-entity-field (elmo-message-entity-handler entity)
+ entity field decode))
+
+(defsubst elmo-message-entity-set-field (entity field value)
+ "Set message entity field value.
+ENTITY is the message entity structure.
+FIELD is the symbol of the field name.
+VALUE is the field value (raw)."
+ (elmo-msgdb-message-entity-set-field (elmo-message-entity-handler entity)
+ entity field value))
+
(defconst elmo-msgdb-load-priorities '(legacy standard)
"Priority list of modb type for load.")
(elmo-message-entity-field y 'date)))
(error)))))
-
(defsubst elmo-msgdb-get-parent-entity (entity msgdb)
(setq entity (elmo-message-entity-field entity 'references))
;; entity is parent-id.
(luna-define-generic elmo-message-file-p (folder number)
"Return t if message in the FOLDER with NUMBER is a file.")
-(defmacro elmo-message-entity-number (entity)
- `(elmo-msgdb-message-entity-number (elmo-message-entity-handler ,entity)
- ,entity))
-
-(defmacro elmo-message-entity-set-number (entity number)
- `(elmo-msgdb-message-entity-set-number (elmo-message-entity-handler ,entity)
- ,entity
- ,number))
-
(luna-define-generic elmo-message-flags (folder number)
"Return a list of flags.
FOLDER is a ELMO folder structure.
`(dolist (,(car spec) (elmo-folder-list-message-entities ,(car (cdr spec))))
,@form))
-(defun elmo-message-entity-field (entity field &optional decode)
- "Get message entity field value.
-ENTITY is the message entity structure obtained by `elmo-message-entity'.
-FIELD is the symbol of the field name.
-if optional DECODE is non-nil, returned value is decoded."
- (elmo-msgdb-message-entity-field
- (elmo-message-entity-handler entity)
- entity field decode))
-
-(defun elmo-message-entity-set-field (entity field value)
- "Set message entity field value.
-ENTITY is the message entity structure.
-FIELD is the symbol of the field name.
-VALUE is the field value (raw)."
- (elmo-msgdb-message-entity-set-field
- (elmo-message-entity-handler entity)
- entity field value))
-
(luna-define-generic elmo-folder-count-flags (folder)
"Count flagged message number in the msgdb of the FOLDER.
Return a list of numbers (`new' `unread' `answered')")