allow plugins to integrate into the JSON API

This commit is contained in:
electron128 2015-12-15 19:56:49 +01:00
parent e824a2faea
commit f7ab3ad04f
9 changed files with 204 additions and 94 deletions

View file

@ -55,4 +55,17 @@ ResponseTask* ResourceRouter::handleRequest(Request& req, Response& resp)
return 0;
}
bool ResourceRouter::isNameUsed(std::string name)
{
std::vector<std::pair<std::string, HandlerBase*> >::iterator vit;
for(vit = mHandlers.begin(); vit != mHandlers.end(); vit++)
{
if(vit->first == name)
{
return true;
}
}
return false;
}
} // namespace resource_api