static int addannot_uid(const char *mailbox __attribute__((unused)),
                        uint32_t uid,
                        const char *entry,
                        const char *userid,
                        const struct buf *value,
                        const struct annotate_metadata *mdata __attribute__((unused)),
                        void *rock)
{
    struct found_uids *annots = (struct found_uids *)rock;

    /* take advantage of the guarantee that all annotations with the same UID
     * will be together in a 'foreach' response */
    if (!annots->nused || annots->found[annots->nused-1].uid != uid) {
        /* we don't support an archive annotations DB yet */
        add_found(annots, uid, /*isarchive*/0);
    }

    /* the last item will be for this UID regardless, check if we have the snoozed annotation */
    if (!strcmpsafe(userid, "") && buf_len(value) &&
        !strcmp(entry, IMAP_ANNOT_NS "snoozed")) {
        annots->found[annots->nused-1].issnoozed = 1;
    }

    return 0;
}
static int addannot_uid(const char *mailbox __attribute__((unused)),
                        uint32_t uid,
                        const char *entry,
                        const char *userid,
                        const struct buf *value,
                        const struct annotate_metadata *mdata __attribute__((unused)),
                        void *rock)
{
    struct found_uids *annots = (struct found_uids *)rock;

     
    if (!annots->nused || annots->found[annots->nused-1].uid != uid) {
         
        add_found(annots, uid,  0);
    }

     
    if (!strcmpsafe(userid, "") && buf_len(value) &&
        !strcmp(entry, IMAP_ANNOT_NS "snoozed")) {
        annots->found[annots->nused-1].issnoozed = 1;
    }

    return 0;
}