-
Notifications
You must be signed in to change notification settings - Fork 146
/
php_mosquitto.h
42 lines (31 loc) · 1.12 KB
/
php_mosquitto.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef PHP_MOSQUITTO_H
#define PHP_MOSQUITTO_H
extern zend_module_entry mosquitto_module_entry;
#define phpext_mosquitto_ptr &mosquitto_module_entry
#ifdef PHP_WIN32
# define PHP_MOSQUITTO_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_MOSQUITTO_API __attribute__ ((visibility("default")))
#else
# define PHP_MOSQUITTO_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
#include <mosquitto.h>
#define PHP_MOSQUITTO_ERROR_HANDLING() \
zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &mosquitto_original_error_handling TSRMLS_CC)
#define PHP_MOSQUITTO_RESTORE_ERRORS() \
zend_restore_error_handling(&mosquitto_original_error_handling TSRMLS_CC)
typedef struct _mosquitto_client_object {
zend_object std;
struct mosquitto *client;
zend_fcall_info connect_callback;
zend_fcall_info_cache connect_callback_cache;
} mosquitto_client_object;
PHP_MOSQUITTO_API void php_mosquitto_connect_callback(struct mosquitto *mosq, void *obj, int rc);
PHP_MINIT_FUNCTION(mosquitto);
PHP_MSHUTDOWN_FUNCTION(mosquitto);
PHP_MINFO_FUNCTION(mosquitto);
#endif /* PHP_MOSQUITTO_H */
/* __footer_here__ */