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

Public Member Functions

 UrlManager ()
 
 ~UrlManager ()
 
int invoke (Request *request, MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size) const
 

Detailed Description

Definition at line 32 of file skiaserve.cpp.

Constructor & Destructor Documentation

◆ UrlManager()

UrlManager::UrlManager ( )
inline

Definition at line 34 of file skiaserve.cpp.

34 {
35 // Register handlers
36 fHandlers.push_back(new RootHandler);
37 fHandlers.push_back(new PostHandler);
38 fHandlers.push_back(new ImgHandler);
39 fHandlers.push_back(new ClipAlphaHandler);
40 fHandlers.push_back(new EnableGPUHandler);
41 fHandlers.push_back(new CmdHandler);
42 fHandlers.push_back(new InfoHandler);
43 fHandlers.push_back(new DownloadHandler);
44 fHandlers.push_back(new DataHandler);
45 fHandlers.push_back(new BreakHandler);
46 fHandlers.push_back(new OpsHandler);
47 fHandlers.push_back(new OpBoundsHandler);
48 fHandlers.push_back(new ColorModeHandler);
49 fHandlers.push_back(new QuitHandler);
50 }

◆ ~UrlManager()

UrlManager::~UrlManager ( )
inline

Definition at line 52 of file skiaserve.cpp.

52 {
53 for (int i = 0; i < fHandlers.size(); i++) { delete fHandlers[i]; }
54 }
int size() const
Definition: SkTArray.h:421

Member Function Documentation

◆ invoke()

int UrlManager::invoke ( Request request,
MHD_Connection *  connection,
const char *  url,
const char *  method,
const char *  upload_data,
size_t *  upload_data_size 
) const
inline

Definition at line 57 of file skiaserve.cpp.

58 {
59 for (int i = 0; i < fHandlers.size(); i++) {
60 if (fHandlers[i]->canHandle(method, url)) {
61 return fHandlers[i]->handle(request, connection, url, method, upload_data,
62 upload_data_size);
63 }
64 }
65 return MHD_NO;
66 }

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