+2002-04-23 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpgme.texi (Passphrase Callback): Document that either return
+ argument can be NULL.
+ (Progress Meter Callback): Likewise.
+
2002-04-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase Callback): Fix small typo. Document the
@var{*passfunc}, and the first argument for this function in
@var{*hook_value}. If no passphrase callback is set, or @var{ctx} is
not a valid pointer, @code{NULL} is returned in both variables.
+
+@var{passfunc} or @var{hook_value} can be @code{NULL}. In this case,
+the corresponding value will not be returned.
@end deftypefun
and the first argument for this function in @var{*hook_value}. If no
progress callback is set, or @var{ctx} is not a valid pointer,
@code{NULL} is returned in both variables.
+
+@var{progfunc} or @var{hook_value} can be @code{NULL}. In this case,
+the corresponding value will not be returned.
@end deftypefun
+2002-04-23 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpgme.c (gpgme_get_progress_cb): Allow either return parameter
+ to be NULL.
+ (gpgme_get_passphrase_cb): Likewise.
+
2002-04-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (gpgme_get_passphrase_cb): New function.
/**
* gpgme_get_passphrase_cb:
* @ctx: the context
- * @cb: The current callback function
- * @cb_value: The current value passed to the callback function
+ * @r_cb: The current callback function
+ * @r_cb_value: The current value passed to the callback function
*
* This function returns the callback function to be used to pass a passphrase
* to the crypto engine.
**/
void
-gpgme_get_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb *cb, void **cb_value)
+gpgme_get_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb *r_cb, void **r_cb_value)
{
if (ctx)
{
- *cb = ctx->passphrase_cb;
- *cb_value = ctx->passphrase_cb_value;
+ if (r_cb)
+ *r_cb = ctx->passphrase_cb;
+ if (r_cb_value)
+ *r_cb_value = ctx->passphrase_cb_value;
}
else
{
- *cb = NULL;
- *cb_value = NULL;
+ if (r_cb)
+ *r_cb = NULL;
+ if (r_cb_value)
+ *r_cb_value = NULL;
}
}
/**
* gpgme_get_progress_cb:
* @ctx: the context
- * @cb: The current callback function
- * @cb_value: The current value passed to the callback function
+ * @r_cb: The current callback function
+ * @r_cb_value: The current value passed to the callback function
*
* This function returns the callback function to be used as a progress indicator.
**/
void
-gpgme_get_progress_cb (GpgmeCtx ctx, GpgmeProgressCb *cb, void **cb_value)
+gpgme_get_progress_cb (GpgmeCtx ctx, GpgmeProgressCb *r_cb, void **r_cb_value)
{
if (ctx)
{
- *cb = ctx->progress_cb;
- *cb_value = ctx->progress_cb_value;
+ if (r_cb)
+ *r_cb = ctx->progress_cb;
+ if (r_cb_value)
+ *r_cb_value = ctx->progress_cb_value;
}
else
{
- *cb = NULL;
- *cb_value = NULL;
+ if (r_cb)
+ *r_cb = NULL;
+ if (r_cb_value)
+ *r_cb_value = NULL;
}
}