Skip to content

Commit

Permalink
Expose brayns version in HTTP server
Browse files Browse the repository at this point in the history
  • Loading branch information
tribal-tec committed Nov 29, 2016
1 parent dd3a56f commit bf1a63e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitexternals
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- mode: cmake -*-
# CMake/common https://github.com/Eyescale/CMake.git 11ee9c1
# CMake/common https://github.com/Eyescale/CMake.git 4f20da0
4 changes: 4 additions & 0 deletions plugins/extensions/plugins/ZeroEQPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <brayns/common/simulation/AbstractSimulationHandler.h>
#include <brayns/common/simulation/SpikeSimulationHandler.h>

#include <brayns/version.h>


namespace brayns
{
Expand Down Expand Up @@ -95,6 +97,8 @@ void ZeroEQPlugin::_setupHTTPServer()
BRAYNS_INFO << "Registering handlers on " <<
_httpServer->getURI() << std::endl;

_httpServer->handleGET( "brayns/version", brayns::Version::getSchema(),
&brayns::Version::toJSON );
servus::Serializable& cam = *_brayns.getCamera().getSerializable();
_httpServer->handle( cam );
cam.registerDeserializedCallback( std::bind( &ZeroEQPlugin::_cameraUpdated, this ));
Expand Down

0 comments on commit bf1a63e

Please sign in to comment.