Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
QuitHandler Class Reference

#include <UrlHandler.h>

Inheritance diagram for QuitHandler:
UrlHandler

Public Member Functions

bool canHandle (const char *method, const char *url) override
 
int handle (Request *request, MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size) override
 
- Public Member Functions inherited from UrlHandler
virtual ~UrlHandler ()
 
virtual bool canHandle (const char *method, const char *url)=0
 
virtual int handle (Request *request, MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size)=0
 

Detailed Description

Definition at line 159 of file UrlHandler.h.

Member Function Documentation

◆ canHandle()

bool QuitHandler::canHandle ( const char *  method,
const char *  url 
)
overridevirtual

Implements UrlHandler.

Definition at line 16 of file QuitHandler.cpp.

16 {
17 const char* kBaseName = "/quitquitquit";
18 return 0 == strcmp(method, MHD_HTTP_METHOD_GET) &&
19 0 == strncmp(url, kBaseName, strlen(kBaseName));
20}

◆ handle()

int QuitHandler::handle ( Request request,
MHD_Connection *  connection,
const char *  url,
const char *  method,
const char *  upload_data,
size_t *  upload_data_size 
)
overridevirtual

Implements UrlHandler.

Definition at line 22 of file QuitHandler.cpp.

24 {
25 _exit(0);
26}

The documentation for this class was generated from the following files: