]> git.mxchange.org Git - flightgear.git/blobdiff - src/Canvas/FGCanvasSystemAdapter.cxx
VoiceSynthesizer: add some test/debug properties
[flightgear.git] / src / Canvas / FGCanvasSystemAdapter.cxx
index ad774fd438c11bbaa822ff8203c802f7b840b0b4..69ea6c5a4b20b1e5f3ae470fc91a6cb0ac9d8dbf 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <Main/globals.hxx>
 #include <Main/util.hxx>
+#include <Network/HTTPClient.hxx>
 #include <Viewer/renderer.hxx>
 
 #include <osgDB/ReadFile>
@@ -98,4 +99,19 @@ namespace canvas
     return 0;
   }
 
+  //----------------------------------------------------------------------------
+  simgear::HTTP::Client* FGCanvasSystemAdapter::getHTTPClient() const
+  {
+    FGHTTPClient* http =
+      static_cast<FGHTTPClient*>(globals->get_subsystem("http"));
+
+    if( http )
+      return http->client();
+
+    SG_LOG( SG_IO,
+            SG_ALERT,
+            "FGCanvasSystemAdapter: Failed to get HTTP subsystem" );
+    return 0;
+  }
+
 }