Skip to content

Commit

Permalink
lib_mysqludf_amqp.h: consolidate public API declarations in one heade…
Browse files Browse the repository at this point in the history
…r file
  • Loading branch information
tcort committed Sep 2, 2016
1 parent 22f3fce commit adbe59c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = README.md CONTRIBUTING.md

lib_LTLIBRARIES = lib_mysqludf_amqp.la
lib_mysqludf_amqp_la_SOURCES = lib_mysqludf_amqp_info.c send.h send.c lib_mysqludf_amqp_sendjson.c lib_mysqludf_amqp_sendstring.c uuid.h uuid.c
lib_mysqludf_amqp_la_SOURCES = lib_mysqludf_amqp.h lib_mysqludf_amqp_info.c send.h send.c lib_mysqludf_amqp_sendjson.c lib_mysqludf_amqp_sendstring.c uuid.h uuid.c
lib_mysqludf_amqp_la_CFLAGS = -DMYSQL_SERVER @MYSQL_CFLAGS@ @RABBITMQ_CFLAGS@
lib_mysqludf_amqp_la_LDFLAGS = -module -avoid-version -no-undefined @MYSQL_LDFLAGS@ @RABBITMQ_LIBS@

Expand Down
26 changes: 26 additions & 0 deletions lib_mysqludf_amqp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef __LIB_MYSQLUDF_AMQP_H
#define __LIB_MYSQLUDF_AMQP_H

/* Public User Defined Functions for MySQL */

#ifdef __cplusplus
extern "C" {
#endif

extern my_bool lib_mysqludf_amqp_info_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
extern char *lib_mysqludf_amqp_info(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
extern void lib_mysqludf_amqp_info_deinit(UDF_INIT *initid);

extern my_bool lib_mysqludf_amqp_sendjson_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
extern char *lib_mysqludf_amqp_sendjson(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
extern void lib_mysqludf_amqp_sendjson_deinit(UDF_INIT *initid);

extern my_bool lib_mysqludf_amqp_sendstring_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
extern char *lib_mysqludf_amqp_sendstring(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
extern void lib_mysqludf_amqp_sendstring_deinit(UDF_INIT *initid);

#ifdef __cplusplus
}
#endif

#endif /* __LIB_MYSQLUDF_AMQP_H */
12 changes: 1 addition & 11 deletions lib_mysqludf_amqp_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@
#include <stdint.h>
#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

my_bool lib_mysqludf_amqp_info_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
char *lib_mysqludf_amqp_info(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
void lib_mysqludf_amqp_info_deinit(UDF_INIT *initid);

#ifdef __cplusplus
}
#endif
#include "lib_mysqludf_amqp.h"

my_bool lib_mysqludf_amqp_info_init(UDF_INIT *initid, UDF_ARGS *args, char *message) {

Expand Down
13 changes: 1 addition & 12 deletions lib_mysqludf_amqp_sendjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@
#include <stdint.h>
#include <string.h>

#include "lib_mysqludf_amqp.h"
#include "send.h"

#ifdef __cplusplus
extern "C" {
#endif

my_bool lib_mysqludf_amqp_sendjson_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
char *lib_mysqludf_amqp_sendjson(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
void lib_mysqludf_amqp_sendjson_deinit(UDF_INIT *initid);

#ifdef __cplusplus
}
#endif

my_bool lib_mysqludf_amqp_sendjson_init(UDF_INIT *initid, UDF_ARGS *args, char *message) {
return lib_mysqludf_amqp_send_init(initid, args, message);
}
Expand Down
13 changes: 1 addition & 12 deletions lib_mysqludf_amqp_sendstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@
#include <stdint.h>
#include <string.h>

#include "lib_mysqludf_amqp.h"
#include "send.h"

#ifdef __cplusplus
extern "C" {
#endif

my_bool lib_mysqludf_amqp_sendstring_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
char *lib_mysqludf_amqp_sendstring(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
void lib_mysqludf_amqp_sendstring_deinit(UDF_INIT *initid);

#ifdef __cplusplus
}
#endif

my_bool lib_mysqludf_amqp_sendstring_init(UDF_INIT *initid, UDF_ARGS *args, char *message) {
return lib_mysqludf_amqp_send_init(initid, args, message);
}
Expand Down

0 comments on commit adbe59c

Please sign in to comment.