Reformat testprotocol.c
This commit is contained in:
@ -34,7 +34,8 @@
|
|||||||
#include <dcb.h>
|
#include <dcb.h>
|
||||||
#include <buffer.h>
|
#include <buffer.h>
|
||||||
|
|
||||||
MODULE_INFO info = {
|
MODULE_INFO info =
|
||||||
|
{
|
||||||
MODULE_API_PROTOCOL,
|
MODULE_API_PROTOCOL,
|
||||||
MODULE_IN_DEVELOPMENT,
|
MODULE_IN_DEVELOPMENT,
|
||||||
GWPROTOCOL_VERSION,
|
GWPROTOCOL_VERSION,
|
||||||
@ -57,7 +58,8 @@ static int test_session(DCB *dcb, void* data){ return 1;}
|
|||||||
/**
|
/**
|
||||||
* The "module object" for the httpd protocol module.
|
* The "module object" for the httpd protocol module.
|
||||||
*/
|
*/
|
||||||
static GWPROTOCOL MyObject = {
|
static GWPROTOCOL MyObject =
|
||||||
|
{
|
||||||
test_read, /**< Read - EPOLLIN handler */
|
test_read, /**< Read - EPOLLIN handler */
|
||||||
test_write, /**< Write - data from gateway */
|
test_write, /**< Write - data from gateway */
|
||||||
test_write_ready, /**< WriteReady - EPOLLOUT handler */
|
test_write_ready, /**< WriteReady - EPOLLOUT handler */
|
||||||
@ -69,7 +71,7 @@ static GWPROTOCOL MyObject = {
|
|||||||
test_listen, /**< Create a listener */
|
test_listen, /**< Create a listener */
|
||||||
test_auth, /**< Authentication */
|
test_auth, /**< Authentication */
|
||||||
test_session /**< Session */
|
test_session /**< Session */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,8 +79,7 @@ static GWPROTOCOL MyObject = {
|
|||||||
*
|
*
|
||||||
* @return version string of the module
|
* @return version string of the module
|
||||||
*/
|
*/
|
||||||
char *
|
char* version()
|
||||||
version()
|
|
||||||
{
|
{
|
||||||
return version_str;
|
return version_str;
|
||||||
}
|
}
|
||||||
@ -87,8 +88,7 @@ version()
|
|||||||
* The module initialisation routine, called when the module
|
* The module initialisation routine, called when the module
|
||||||
* is first loaded.
|
* is first loaded.
|
||||||
*/
|
*/
|
||||||
void
|
void ModuleInit()
|
||||||
ModuleInit()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,8 +100,7 @@ ModuleInit()
|
|||||||
*
|
*
|
||||||
* @return The module object
|
* @return The module object
|
||||||
*/
|
*/
|
||||||
GWPROTOCOL *
|
GWPROTOCOL* GetModuleObject()
|
||||||
GetModuleObject()
|
|
||||||
{
|
{
|
||||||
return &MyObject;
|
return &MyObject;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user