From db3910741347e7d741f4a854075c248e9081d722 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 18 Apr 2017 16:37:57 +0000 Subject: MDEV-11663 Create services for functionality used by plugins Added service for - encryption (AES) - error reporting, e.g my_printf_error() --- libservices/CMakeLists.txt | 4 +++- libservices/my_crypt_service.c | 2 ++ libservices/my_print_error_service.c | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 libservices/my_crypt_service.c create mode 100644 libservices/my_print_error_service.c (limited to 'libservices') diff --git a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt index 0b68a156077..e20be6d7a7c 100644 --- a/libservices/CMakeLists.txt +++ b/libservices/CMakeLists.txt @@ -22,7 +22,9 @@ SET(MYSQLSERVICES_SOURCES encryption_service.c kill_statement_service.c logger_service.c + my_crypt_service.c my_md5_service.c + my_print_error_service.c my_sha1_service.c my_sha2_service.c my_snprintf_service.c @@ -35,7 +37,7 @@ SET(MYSQLSERVICES_SOURCES thd_timezone_service.c thd_wait_service.c wsrep_service.c -) + ) ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) diff --git a/libservices/my_crypt_service.c b/libservices/my_crypt_service.c new file mode 100644 index 00000000000..e6b9e273094 --- /dev/null +++ b/libservices/my_crypt_service.c @@ -0,0 +1,2 @@ +#include +SERVICE_VERSION my_crypt_service= (void*)VERSION_my_crypt; diff --git a/libservices/my_print_error_service.c b/libservices/my_print_error_service.c new file mode 100644 index 00000000000..7642668d470 --- /dev/null +++ b/libservices/my_print_error_service.c @@ -0,0 +1,17 @@ +/* Copyright (c) 2016 MariaDB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include +SERVICE_VERSION my_print_error_service= (void*)VERSION_my_print_error; \ No newline at end of file -- cgit v1.2.1