/[winpt]/trunk/Src/wptKeyEdit.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeyEdit.cpp

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

revision 327 by twoaday, Fri Aug 3 13:54:55 2007 UTC revision 328 by twoaday, Fri Sep 25 16:07:38 2009 UTC
# Line 344  GpgKeyEdit::clear (void) Line 344  GpgKeyEdit::clear (void)
344      cnt = 0;      cnt = 0;
345      cmd_sent = 0;      cmd_sent = 0;
346      resval = 0;      resval = 0;
347      uid_index = sig_index = key_index = -1;      uid_index = -1;
348        sig_index = -1;
349        key_index = -1;
350      key_has_passwd = true;      key_has_passwd = true;
351  }  }
352    
353    
354  GpgKeyEdit::GpgKeyEdit (void)  GpgKeyEdit::GpgKeyEdit (void)
355  {  {    
356      clear ();      clear ();
357      key = NULL;      key = NULL;
358      gpgme_new (&ctx); /*FIXME */      gpgme_new (&ctx); /*FIXME */
359        
360  }  }
361    
362    
# Line 378  GpgKeyEdit::~GpgKeyEdit (void) Line 381  GpgKeyEdit::~GpgKeyEdit (void)
381  {  {
382      free_if_alloc (name);      free_if_alloc (name);
383      free_if_alloc (cmt);      free_if_alloc (cmt);
384      free_if_alloc (email);      free_if_alloc (email);    
385      gpgme_release (ctx);      gpgme_release (ctx);
386  }  }
387    
# Line 434  GpgKeyEdit::setNoPassphrase (bool val) Line 437  GpgKeyEdit::setNoPassphrase (bool val)
437      key_has_passwd = !val;      key_has_passwd = !val;
438  }  }
439    
440    
441    void
442    GpgKeyEdit::setPassphraseCallback (gpgme_passphrase_cb_t cb, void *cb_value)
443    {    
444        key_has_passwd = false;
445        gpgme_set_passphrase_cb (ctx, cb, cb_value);
446    }
447    
448    
449    bool
450    GpgKeyEdit::usePassphraseCallback (void)
451    {
452        gpgme_passphrase_cb_t cb_ptr;
453        void *cb_value;
454    
455        gpgme_get_passphrase_cb (ctx, &cb_ptr, &cb_value);
456        if (cb_ptr)
457            return true;
458        return false;
459    }
460    
461  /* Set the passphrase to @pass. */  /* Set the passphrase to @pass. */
462  void  void
463  GpgKeyEdit::setPassphrase (const char *_pass)  GpgKeyEdit::setPassphrase (const char *_pass)

Legend:
Removed from v.327  
changed lines
  Added in v.328

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26