Next: , Previous: , Up: Context Attributes   [Contents][Index]


7.4.12 Status Message Callback

Data type: gpgme_error_t (*gpgme_status_cb_t)(void *hook, const char *keyword, const char *args)

The gpgme_status_cb_t type is the type of function usable as a status message callback function.

The argument keyword is the name of the status message while the args argument contains any arguments for the status message.

If an error occurs, return the corresponding gpgme_error_t value. Otherwise, return 0.

Function: void gpgme_set_status_cb (gpgme_ctx_t ctx, gpgme_status_cb_t statusfunc, void *hook_value)

SINCE: 1.6.0

The function gpgme_set_status_cb sets the function that is used when a status message is received from gpg to statusfunc. The function statusfunc needs to be implemented by the user, and whenever it is called, it is called with its first argument being hook_value. By default, no status message callback function is set.

The user can disable the use of a status message callback function by calling gpgme_set_status_cb with statusfunc being NULL.

Function: void gpgme_get_status_cb (gpgme_ctx_t ctx, gpgme_status_cb_t *statusfunc, void **hook_value)

SINCE: 1.6.0

The function gpgme_get_status_cb returns the function that is used to process status messages from gpg in *statusfunc, and the first argument for this function in *hook_value. If no status message callback is set, or ctx is not a valid pointer, NULL is returned in both variables.