- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathmysqlnd_ext_plugin.h
162 lines (130 loc) · 7.79 KB
/
mysqlnd_ext_plugin.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andrey Hristov <andrey@php.net> |
| Johannes Schlüter <johannes@php.net> |
| Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefMYSQLND_EXT_PLUGIN_H
#defineMYSQLND_EXT_PLUGIN_H
structst_mysqlnd_plugin__plugin_area_getters
{
void** (*get_connection_area)(constMYSQLND*conn, constunsigned intplugin_id);
void** (*get_connection_data_area)(constMYSQLND_CONN_DATA*conn, constunsigned intplugin_id);
void** (*get_result_area)(constMYSQLND_RES*result, constunsigned intplugin_id);
void** (*get_unbuffered_area)(constMYSQLND_RES_UNBUFFERED*result, constunsigned intplugin_id);
void** (*get_result_buffered_aread)(constMYSQLND_RES_BUFFERED*result, constunsigned intplugin_id);
void** (*get_stmt_area)(constMYSQLND_STMT*stmt, constunsigned intplugin_id);
void** (*get_protocol_decoder_area)(constMYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY*factory, constunsigned intplugin_id);
void** (*get_pfc_area)(constMYSQLND_PFC*pfc, constunsigned intplugin_id);
void** (*get_vio_area)(constMYSQLND_VIO*vio, constunsigned intplugin_id);
};
PHPAPIexternstructst_mysqlnd_plugin__plugin_area_gettersmysqlnd_plugin_area_getters;
#definemysqlnd_plugin_get_plugin_connection_data(c, p_id) mysqlnd_plugin_area_getters.get_connection_area((c), (p_id))
#definemysqlnd_plugin_get_plugin_connection_data_data(c, p_id) mysqlnd_plugin_area_getters.get_connection_data_area((c), (p_id))
#definemysqlnd_plugin_get_plugin_result_data(res, p_id) mysqlnd_plugin_area_getters.get_result_area((res), (p_id))
#definemysqlnd_plugin_get_plugin_result_unbuffered_data(res, p_id) mysqlnd_plugin_area_getters.get_unbuffered_area((res), (p_id))
#definemysqlnd_plugin_get_plugin_result_buffered_data_c(res, p_id) mysqlnd_plugin_area_getters.get_result_buffered_aread((res), (p_id))
#definemysqlnd_plugin_get_plugin_stmt_data(stmt, p_id) mysqlnd_plugin_area_getters.get_stmt_area((stmt), (p_id))
#definemysqlnd_plugin_get_plugin_protocol_data(proto, p_id) mysqlnd_plugin_area_getters.get_protocol_decoder_area((proto), (p_id))
#definemysqlnd_plugin_get_plugin_pfc_data(pfc, p_id) mysqlnd_plugin_area_getters.get_pfc_area((pfc), (p_id))
#definemysqlnd_plugin_get_plugin_vio_data(vio, p_id) mysqlnd_plugin_area_getters.get_pfc_area((vio), (p_id))
structst_mysqlnd_plugin_methods_xetters
{
structst_mnd_object_factory_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods);
} object_factory;
structst_mnd_connection_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods);
} connection;
structst_mnd_connection_data_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *methods);
} connection_data;
structst_mnd_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *methods);
} result;
structst_mnd_unbuffered_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *methods);
} unbuffered_result;
structst_mnd_buffered_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered)* (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *methods);
} buffered_result;
structst_mnd_stmt_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *methods);
} statement;
structst_mnd_protocol_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory)* (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *methods);
} protocol;
structst_mnd_pfc_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) *methods);
} pfc;
structst_mnd_vio_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) *methods);
} vio;
structst_mnd_error_info_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *methods);
} error_info;
structst_mnd_command_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) *methods);
} command;
};
PHPAPIexternstructst_mysqlnd_plugin_methods_xettersmysqlnd_plugin_methods_xetters;
#definemysqlnd_object_factory_get_methods() mysqlnd_plugin_methods_xetters.object_factory.get()
#definemysqlnd_object_factory_set_methods(m) mysqlnd_plugin_methods_xetters.object_factory.set((m))
#definemysqlnd_conn_get_methods() mysqlnd_plugin_methods_xetters.connection.get()
#definemysqlnd_conn_set_methods(m) mysqlnd_plugin_methods_xetters.connection.set((m))
#definemysqlnd_conn_data_get_methods() mysqlnd_plugin_methods_xetters.connection_data.get()
#definemysqlnd_conn_data_set_methods(m) mysqlnd_plugin_methods_xetters.connection_data.set((m))
#definemysqlnd_result_get_methods() mysqlnd_plugin_methods_xetters.result.get()
#definemysqlnd_result_set_methods(m) mysqlnd_plugin_methods_xetters.result.set((m))
#definemysqlnd_result_unbuffered_get_methods() mysqlnd_plugin_methods_xetters.unbuffered_result.get()
#definemysqlnd_result_unbuffered_set_methods(m) mysqlnd_plugin_methods_xetters.unbuffered_result.set((m))
#definemysqlnd_result_buffered_get_methods() mysqlnd_plugin_methods_xetters.buffered_result.get()
#definemysqlnd_result_buffered_set_methods(m) mysqlnd_plugin_methods_xetters.buffered_result.set((m))
#definemysqlnd_stmt_get_methods() mysqlnd_plugin_methods_xetters.statement.get()
#definemysqlnd_stmt_set_methods(m) mysqlnd_plugin_methods_xetters.statement.set((m))
#definemysqlnd_protocol_get_methods() mysqlnd_plugin_methods_xetters.protocol.get()
#definemysqlnd_protocol_set_methods(m) mysqlnd_plugin_methods_xetters.protocol.set((m))
#definemysqlnd_pfc_get_methods() mysqlnd_plugin_methods_xetters.pfc.get()
#definemysqlnd_pfc_set_methods(m) mysqlnd_plugin_methods_xetters.pfc.set((m))
#definemysqlnd_vio_get_methods() mysqlnd_plugin_methods_xetters.vio.get()
#definemysqlnd_vio_set_methods(m) mysqlnd_plugin_methods_xetters.vio.set((m))
#definemysqlnd_command_get_methods() mysqlnd_plugin_methods_xetters.command.get()
#definemysqlnd_command_set_methods(m) mysqlnd_plugin_methods_xetters.command.set((m))
#definemysqlnd_error_info_get_methods() mysqlnd_plugin_methods_xetters.error_info.get()
#definemysqlnd_error_info_set_methods(m) mysqlnd_plugin_methods_xetters.error_info.set((m))
#endif/* MYSQLND_EXT_PLUGIN_H */