+(defun epg-status-IMPORTED (process string)
+ (if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
+ (let* ((key-id (match-string 1 string))
+ (user-id (match-string 2 string))
+ (entry (assoc key-id epg-user-id-alist)))
+ (if entry
+ (setcdr entry user-id)
+ (setq epg-user-id-alist (cons (cons key-id user-id)
+ epg-user-id-alist)))
+ (epg-context-set-result-for
+ epg-context 'import
+ (cons (list (cons 'key-id key-id)
+ (cons 'user-id user-id))
+ (epg-context-result-for epg-context 'import))))))
+
+(defun epg-status-IMPORT_OK (process string)
+ (let ((result (epg-context-result-for epg-context 'import)))
+ (if (and result
+ (string-match "\\`\\([0-9]+\\)\\( \\(.+\\)\\)?" string))
+ (setcar result
+ (append (list (cons 'reason
+ (string-to-number
+ (match-string 1 string))))
+ (if (match-beginning 2)
+ (list (cons 'fingerprint
+ (match-string 3 string))))
+ (car result))))))
+
+(defun epg-status-IMPORT_PROBLEM (process string)
+ (if (string-match "\\`\\([0-9]+\\)\\( \\(.+\\)\\)?" string)
+ (epg-context-set-result-for
+ epg-context 'error
+ (cons (cons 'import-problem
+ (append (list (cons 'reason
+ (string-to-number
+ (match-string 1 string))))
+ (if (match-beginning 2)
+ (list (cons 'fingerprint
+ (match-string 3 string)))))
+ (epg-context-result-for epg-context 'error))))))
+