/[winpt]/trunk/MyGPGME/keylist.c
ViewVC logotype

Diff of /trunk/MyGPGME/keylist.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 16 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 17 by twoaday, Fri May 20 08:38:32 2005 UTC
# Line 1  Line 1 
1  /* keylist.c -  key listing  /* keylist.c -  key listing
2   *      Copyright (C) 2000, 2001 Werner Koch (dd9jn), g10 Code GmbH   *      Copyright (C) 2000, 2001 Werner Koch (dd9jn), g10 Code GmbH
3   *      Copyright (C) 2002-2004 Timo Schulz   *      Copyright (C) 2002-2005 Timo Schulz
4   *   *
5   * This file is part of MyGPGME.   * This file is part of MyGPGME.
6   *   *
# Line 658  gpgme_op_keylist_next( gpgme_ctx_t ctx, Line 658  gpgme_op_keylist_next( gpgme_ctx_t ctx,
658      ctx->key_queue = q->next;      ctx->key_queue = q->next;
659            
660      *r_key = q->key;      *r_key = q->key;
661      safe_free( q );      safe_free (q);
662      return 0;      return 0;
663  }  }
664    
665    
666    gpgme_error_t
667    gpgme_op_keylist_getkey (int listmode, const char *pattern, gpgme_key_t *r_key)
668    {
669        gpgme_ctx_t listctx;
670        gpgme_error_t err;
671    
672        err = gpgme_new (&listctx);
673        if (err)
674            return err;
675        /*gpgme_control (listctx, GPGME_CTRL_LISTMODE, listctx->keylist_mode);*/
676        err = gpgme_op_keylist_start (listctx, pattern, 0);
677        if (!err)
678            err = gpgme_op_keylist_next (listctx, r_key);
679        gpgme_release (listctx);
680        return err;
681    }

Legend:
Removed from v.16  
changed lines
  Added in v.17

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26