File: gpgme.info, Node: Status Message Callback, Next: Context Flags, Prev: Progress Meter Callback, Up: Context Attributes 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.