MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
client_plugin.h
Go to the documentation of this file.
1
#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
2
/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; version 2 of the License.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
24
#define MYSQL_CLIENT_PLUGIN_INCLUDED
25
26
#ifndef MYSQL_ABI_CHECK
27
#include <stdarg.h>
28
#include <stdlib.h>
29
#endif
30
31
/* known plugin types */
32
#define MYSQL_CLIENT_reserved1 0
33
#define MYSQL_CLIENT_reserved2 1
34
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
35
36
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
37
38
#define MYSQL_CLIENT_MAX_PLUGINS 3
39
40
#define mysql_declare_client_plugin(X) \
41
MYSQL_PLUGIN_EXPORT struct st_mysql_client_plugin_ ## X \
42
_mysql_client_plugin_declaration_ = { \
43
MYSQL_CLIENT_ ## X ## _PLUGIN, \
44
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
45
#define mysql_end_client_plugin }
46
47
/* generic plugin header structure */
48
#define MYSQL_CLIENT_PLUGIN_HEADER \
49
int type; \
50
unsigned int interface_version; \
51
const char *name; \
52
const char *author; \
53
const char *desc; \
54
unsigned int version[3]; \
55
const char *license; \
56
void *mysql_api; \
57
int (*init)(char *, size_t, int, va_list); \
58
int (*deinit)(); \
59
int (*options)(const char *option, const void *);
60
61
struct
st_mysql_client_plugin
62
{
63
MYSQL_CLIENT_PLUGIN_HEADER
64
};
65
66
struct
st_mysql
;
67
68
/******** authentication plugin specific declarations *********/
69
#include <
mysql/plugin_auth_common.h
>
70
71
struct
st_mysql_client_plugin_AUTHENTICATION
72
{
73
MYSQL_CLIENT_PLUGIN_HEADER
74
int (*authenticate_user)(
MYSQL_PLUGIN_VIO
*vio,
struct
st_mysql
*mysql);
75
};
76
77
/******** using plugins ************/
78
92
struct
st_mysql_client_plugin
*
93
mysql_load_plugin
(
struct
st_mysql
*mysql,
const
char
*
name
,
int
type
,
94
int
argc, ...);
95
112
struct
st_mysql_client_plugin
*
113
mysql_load_plugin_v
(
struct
st_mysql
*mysql,
const
char
*
name
,
int
type
,
114
int
argc, va_list args);
115
126
struct
st_mysql_client_plugin
*
127
mysql_client_find_plugin
(
struct
st_mysql
*mysql,
const
char
*
name
,
int
type
);
128
143
struct
st_mysql_client_plugin
*
144
mysql_client_register_plugin
(
struct
st_mysql
*mysql,
145
struct
st_mysql_client_plugin
*plugin);
146
159
int
mysql_plugin_options
(
struct
st_mysql_client_plugin
*plugin,
160
const
char
*
option
,
const
void
*value);
161
#endif
162
include
mysql
client_plugin.h
Generated on Sat Nov 9 2013 01:24:45 for MySQL 5.6.14 Source Code Document by
1.8.1.2