Convert maxscale/protocol.h to .hh

This commit is contained in:
Esa Korhonen
2019-01-15 17:26:26 +02:00
parent b0663f0b29
commit 45bfbbdd9e
14 changed files with 22 additions and 25 deletions

View File

@ -22,7 +22,7 @@
#include <maxscale/authenticator.hh> #include <maxscale/authenticator.hh>
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/ssl.hh> #include <maxscale/ssl.hh>
#include <memory> #include <memory>

View File

@ -20,7 +20,7 @@
#include <vector> #include <vector>
#include <maxbase/jansson.h> #include <maxbase/jansson.h>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/ssl.hh> #include <maxscale/ssl.hh>
#include <maxscale/service.hh> #include <maxscale/service.hh>
#include <maxscale/routingworker.hh> #include <maxscale/routingworker.hh>

View File

@ -13,7 +13,7 @@
#pragma once #pragma once
/** /**
* @file protocol.h * @file protocol.hh
* *
* The protocol module interface definition. * The protocol module interface definition.
*/ */
@ -21,18 +21,17 @@
#include <maxscale/ccdefs.hh> #include <maxscale/ccdefs.hh>
#include <maxbase/jansson.h> #include <maxbase/jansson.h>
#include <maxscale/buffer.h> #include <maxscale/buffer.hh>
MXS_BEGIN_DECLS
struct DCB; struct DCB;
struct SERVER; class SERVER;
struct MXS_SESSION; struct MXS_SESSION;
/** /**
* Protocol module API * Protocol module API
*/ */
typedef struct mxs_protocol struct MXS_PROTOCOL
{ {
/** /**
* EPOLLIN handler, used to read available data from network socket * EPOLLIN handler, used to read available data from network socket
@ -106,7 +105,7 @@ typedef struct mxs_protocol
* *
* @return The opened file descriptor or DCBFD_CLOSED on error * @return The opened file descriptor or DCBFD_CLOSED on error
*/ */
int32_t (* connect)(DCB* dcb, struct SERVER* server, MXS_SESSION* session); int32_t (* connect)(DCB* dcb, SERVER* server, MXS_SESSION* session);
/** /**
* Free protocol data allocated in the connect handler * Free protocol data allocated in the connect handler
@ -131,7 +130,7 @@ typedef struct mxs_protocol
* *
* @note Currently the return value is ignored * @note Currently the return value is ignored
*/ */
int32_t (* auth)(DCB* dcb, struct SERVER* server, MXS_SESSION* session, GWBUF* buffer); int32_t (* auth)(DCB* dcb, SERVER* server, MXS_SESSION* session, GWBUF* buffer);
/** /**
* Returns the name of the default authenticator module for this protocol * Returns the name of the default authenticator module for this protocol
@ -169,7 +168,7 @@ typedef struct mxs_protocol
* @return JSON representation of the DCB * @return JSON representation of the DCB
*/ */
json_t* (*diagnostics_json)(DCB * dcb); json_t* (*diagnostics_json)(DCB * dcb);
} MXS_PROTOCOL; };
/** /**
* The MXS_PROTOCOL version data. The following should be updated whenever * The MXS_PROTOCOL version data. The following should be updated whenever
@ -186,9 +185,7 @@ typedef struct mxs_protocol
* @note The values of the capabilities here *must* be between 0x010000000000 * @note The values of the capabilities here *must* be between 0x010000000000
* and 0x800000000000, that is, bits 40 to 47. * and 0x800000000000, that is, bits 40 to 47.
*/ */
typedef enum protocol_capability enum protocol_capability_t
{ {
PCAP_TYPE_NONE = 0x0 // TODO: remove once protocol capabilities are defined PCAP_TYPE_NONE = 0x0 // TODO: remove once protocol capabilities are defined
} protocol_capability_t; };
MXS_END_DECLS

View File

@ -23,7 +23,7 @@
#include <maxbase/jansson.h> #include <maxbase/jansson.h>
#include <maxscale/config.hh> #include <maxscale/config.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/dcb.hh> #include <maxscale/dcb.hh>
#include <maxscale/listener.hh> #include <maxscale/listener.hh>
#include <maxscale/filter.hh> #include <maxscale/filter.hh>

View File

@ -19,7 +19,7 @@
*/ */
#include <maxscale/ccdefs.hh> #include <maxscale/ccdefs.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/err.h> #include <openssl/err.h>

View File

@ -29,7 +29,7 @@
#include <maxscale/paths.h> #include <maxscale/paths.h>
#include <maxscale/ssl.hh> #include <maxscale/ssl.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/users.h> #include <maxscale/users.h>
#include <maxscale/service.hh> #include <maxscale/service.hh>

View File

@ -30,7 +30,7 @@
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/json_api.h> #include <maxscale/json_api.h>
#include <maxscale/modulecmd.hh> #include <maxscale/modulecmd.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/router.hh> #include <maxscale/router.hh>
#include <maxscale/filter.hh> #include <maxscale/filter.hh>
#include <maxscale/authenticator.hh> #include <maxscale/authenticator.hh>

View File

@ -42,7 +42,7 @@
#include <maxscale/paths.h> #include <maxscale/paths.h>
#include <maxscale/listener.hh> #include <maxscale/listener.hh>
#include <maxscale/poll.hh> #include <maxscale/poll.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/resultset.hh> #include <maxscale/resultset.hh>
#include <maxscale/router.hh> #include <maxscale/router.hh>
#include <maxscale/server.hh> #include <maxscale/server.hh>

View File

@ -36,7 +36,7 @@
#include <cdc.hh> #include <cdc.hh>
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/poll.hh> #include <maxscale/poll.hh>

View File

@ -37,7 +37,7 @@
#include "httpd.hh" #include "httpd.hh"
#include <ctype.h> #include <ctype.h>
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/resultset.hh> #include <maxscale/resultset.hh>

View File

@ -19,7 +19,7 @@
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/modutil.hh> #include <maxscale/modutil.hh>
#include <maxscale/poll.hh> #include <maxscale/poll.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/protocol/mysql.hh> #include <maxscale/protocol/mysql.hh>
#include <maxscale/router.hh> #include <maxscale/router.hh>
#include <maxscale/server.hh> #include <maxscale/server.hh>

View File

@ -29,7 +29,7 @@
#include <maxscale/modinfo.h> #include <maxscale/modinfo.h>
#include <maxscale/modutil.hh> #include <maxscale/modutil.hh>
#include <maxscale/poll.hh> #include <maxscale/poll.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/protocol/mysql.hh> #include <maxscale/protocol/mysql.hh>
#include <maxscale/query_classifier.h> #include <maxscale/query_classifier.h>
#include <maxscale/router.hh> #include <maxscale/router.hh>

View File

@ -20,7 +20,7 @@
#include <string.h> #include <string.h>
#include <maxscale/dcb.hh> #include <maxscale/dcb.hh>
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <maxscale/service.hh> #include <maxscale/service.hh>
#include <maxscale/session.hh> #include <maxscale/session.hh>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -23,7 +23,7 @@
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/service.hh> #include <maxscale/service.hh>
#include <maxscale/session.hh> #include <maxscale/session.hh>
#include <maxscale/protocol.h> #include <maxscale/protocol.hh>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <errno.h> #include <errno.h>
#include <sys/socket.h> #include <sys/socket.h>