manpagez: man pages & more
info gpgme
Home | html | info | man

File: gpgme.info,  Node: Using the Assuan protocol,  Next: Checking for updates,  Prev: Running other Programs,  Up: Miscellaneous

7.7.2 Using the Assuan protocol
-------------------------------

The Assuan protocol can be used to talk to arbitrary Assuan servers.  By
default it is connected to the GnuPG agent, but it may be connected to
arbitrary servers by using ‘gpgme_ctx_set_engine_info’, passing the
location of the servers socket as FILE_NAME argument, and an empty
string as HOME_DIR argument.

   The Assuan protocol functions use three kinds of callbacks to
transfer data:

 -- Data type: gpgme_error_t (*gpgme_assuan_data_cb_t) (void *OPAQUE,
          const void *DATA, size_t DATALEN)

     SINCE: 1.2.0

     This callback receives any data sent by the server.  OPAQUE is the
     pointer passed to ‘gpgme_op_assuan_transact_start’, DATA of length
     DATALEN refers to the data sent.

 -- Data type: gpgme_error_t (*gpgme_assuan_inquire_cb_t) (void *OPAQUE,
          const char *NAME, const char *ARGS, gpgme_data_t *R_DATA)

     SINCE: 1.2.0

     This callback is used to provide additional data to the Assuan
     server.  OPAQUE is the pointer passed to
     ‘gpgme_op_assuan_transact_start’, NAME and ARGS specify what kind
     of data the server requested, and R_DATA is used to return the
     actual data.

     Note: Returning data is currently not implemented in GPGME.

 -- Data type: gpgme_error_t (*gpgme_assuan_status_cb_t) (void *OPAQUE,
          const char *STATUS, const char *ARGS)

     SINCE: 1.2.0

     This callback receives any status lines sent by the server.  OPAQUE
     is the pointer passed to ‘gpgme_op_assuan_transact_start’, STATUS
     and ARGS denote the status update sent.

 -- Function: gpgme_error_t gpgme_op_assuan_transact_start
          (gpgme_ctx_t CTX, const char *COMMAND,
          gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE,
          gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE,
          gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE)

     SINCE: 1.2.0

     Send the Assuan COMMAND and return results via the callbacks.  Any
     callback may be ‘NULL’.  The result of the operation may be
     retrieved using ‘gpgme_wait_ext’.

     Asynchronous variant.

 -- Function: gpgme_error_t gpgme_op_assuan_transact_ext
          (gpgme_ctx_t CTX, const char *COMMAND,
          gpgme_assuan_data_cb_t DATA_CB, void * DATA_CB_VALUE,
          gpgme_assuan_inquire_cb_t INQUIRE_CB, void * INQUIRE_CB_VALUE,
          gpgme_assuan_status_cb_t STATUS_CB, void * STATUS_CB_VALUE,
          gpgme_error_t *OP_ERR)

     Send the Assuan COMMAND and return results via the callbacks.  The
     result of the operation is returned in OP_ERR.

     Synchronous variant.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.