CLOUD: Use overriden handle() instead of ClientHandlerCallback in page handlers
Using a dedicated callback object for this was an unnecessary overhead.
This commit is contained in:
parent
712410496e
commit
a1de322c18
20 changed files with 126 additions and 171 deletions
|
@ -32,6 +32,10 @@ IndexPageHandler::IndexPageHandler(): CommandSender(nullptr) {}
|
|||
|
||||
IndexPageHandler::~IndexPageHandler() {}
|
||||
|
||||
/// public
|
||||
|
||||
Common::String IndexPageHandler::code() const { return _code; }
|
||||
|
||||
void IndexPageHandler::handle(Client &client) {
|
||||
Common::String code = client.queryParameter("code");
|
||||
|
||||
|
@ -54,12 +58,4 @@ void IndexPageHandler::handle(Client &client) {
|
|||
HandlerUtils::setMessageHandler(client, _("ScummVM got the code and already connects to your cloud storage!"));
|
||||
}
|
||||
|
||||
/// public
|
||||
|
||||
Common::String IndexPageHandler::code() const { return _code; }
|
||||
|
||||
ClientHandlerCallback IndexPageHandler::getHandler() {
|
||||
return new Common::Callback<IndexPageHandler, Client &>(this, &IndexPageHandler::handle);
|
||||
}
|
||||
|
||||
} // End of namespace Networking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue