common: Add substitute code for libgpg-error < 1.22.
[gnupg.git] / common / call-gpg.h
index 2c5854d..19993ef 100644 (file)
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef G13_CALL_GPG_H
-#define G13_CALL_GPG_H
+#ifndef GNUPG_COMMON_CALL_GPG_H
+#define GNUPG_COMMON_CALL_GPG_H
 
 #include <gpg-error.h>
 
+#include "fwddecl.h"
 #include "strlist.h"
 
-typedef struct server_control_s *ctrl_t;
-
-gpg_error_t gpg_encrypt_blob (ctrl_t ctrl, const char *gpg_program,
+gpg_error_t gpg_encrypt_blob (ctrl_t ctrl,
+                             const char *gpg_program,
+                             strlist_t gpg_arguments,
                               const void *plain, size_t plainlen,
                               strlist_t keys,
                               void **r_ciph, size_t *r_ciphlen);
 
-gpg_error_t gpg_encrypt_stream (ctrl_t ctrl, const char *gpg_program,
+gpg_error_t gpg_encrypt_stream (ctrl_t ctrl,
+                               const char *gpg_program,
+                               strlist_t gpg_arguments,
                                estream_t plain_stream,
                                strlist_t keys,
                                estream_t cipher_stream);
 
-gpg_error_t gpg_decrypt_blob (ctrl_t ctrl, const char *gpg_program,
+gpg_error_t gpg_decrypt_blob (ctrl_t ctrl,
+                             const char *gpg_program,
+                             strlist_t gpg_arguments,
                              const void *ciph, size_t ciphlen,
                               void **r_plain, size_t *r_plainlen);
 
-gpg_error_t gpg_decrypt_stream (ctrl_t ctrl, const char *gpg_program,
+gpg_error_t gpg_decrypt_stream (ctrl_t ctrl,
+                               const char *gpg_program,
+                               strlist_t gpg_arguments,
                                estream_t cipher_stream,
                                estream_t plain_stream);
 
-#endif /*G13_CALL_GPG_H*/
+#endif /*GNUPG_COMMON_CALL_GPG_H*/