1 /* 2 +--------------------------------------------------------------------+ 3 | PECL :: gnupg | 4 +--------------------------------------------------------------------+ 5 | Redistribution and use in source and binary forms, with or without | 6 | modification, are permitted provided that the conditions mentioned | 7 | in the accompanying LICENSE file are met. | 8 +--------------------------------------------------------------------+ 9 | Copyright (c) 2006, Thilo Raufeisen <traufeisen@php.net> | 10 | Copyright (c) 2013, Jim Jagielski <jimjag@php.net> | 11 | Copyright (c) 2016, Jakub Zelenka <bukka@php.net> | 12 +--------------------------------------------------------------------+ 13 */ 14 15 #ifndef PHP_GNUPG_KEYLISTITERATOR_H 16 #define PHP_GNUPG_KEYLISTITERATOR_H 17 18 extern zend_module_entry gnupg_keyiterator_module_entry; 19 20 #ifdef PHP_WIN32 21 #define PHP_GNUPG_API __declspec(dllexport) 22 #else 23 #define PHP_GNUPG_API 24 #endif 25 26 #ifdef ZTS 27 #include "TSRM.h" 28 #endif 29 30 #include <gpgme.h> 31 #include "phpc/phpc.h" 32 33 #define gnupg_keylistiterator_init() _gnupg_keylistiterator_init(INIT_FUNC_ARGS_PASSTHRU) 34 extern int _gnupg_keylistiterator_init(INIT_FUNC_ARGS); 35 36 PHPC_OBJ_STRUCT_BEGIN(gnupg_keylistiterator) 37 gpgme_ctx_t ctx; 38 gpgme_error_t err; 39 gpgme_key_t gpgkey; 40 char *pattern; 41 PHPC_OBJ_STRUCT_END() 42 43 PHP_METHOD(gnupg_keylistiterator, __construct); 44 PHP_METHOD(gnupg_keylistiterator, current); 45 PHP_METHOD(gnupg_keylistiterator, next); 46 PHP_METHOD(gnupg_keylistiterator, rewind); 47 PHP_METHOD(gnupg_keylistiterator, key); 48 PHP_METHOD(gnupg_keylistiterator, valid); 49 50 #ifdef ZTS 51 #define GNUPG_G(v) TSRMG(gnupg_globals_id, zend_gnupg_globals *, v) 52 #else 53 #define GNUPG_G(v) (gnupg_globals.v) 54 #endif 55 56 #endif /* PHP_GNUPG_H */ 57 58 59 /* 60 * Local variables: 61 * tab-width: 4 62 * c-basic-offset: 4 63 * End: 64 * vim600: noet sw=4 ts=4 fdm=marker 65 * vim<600: noet sw=4 ts=4 66 */ 67