typedef nasal::Ghost<pkg::CatalogRef> NasalCatalog;
typedef nasal::Ghost<pkg::InstallRef> NasalInstall;
-#define ENABLE_PACKAGE_SYSTEM 1
-
namespace {
class FGDelegate : public pkg::Delegate
_http->setProxy(proxyHost, proxyPort, proxyAuth);
}
-#ifdef ENABLE_PACKAGE_SYSTEM
pkg::Root* packageRoot = globals->packageRoot();
if (packageRoot) {
// package system needs access to the HTTP engine too
// start a refresh now
packageRoot->refresh();
}
-#endif // of ENABLE_PACKAGE_SYSTEM
}
static naRef f_package_existingInstall( pkg::Package& pkg,
void FGHTTPClient::postinit()
{
-#ifdef ENABLE_PACKAGE_SYSTEM
NasalPackageRoot::init("PackageRoot")
.member("path", &pkg::Root::path)
.member("version", &pkg::Root::catalogVersion)
nasal::Hash nasalPkg = nasalGlobals.createHash("pkg"); // module
nasalPkg.set("root", packageRoot);
}
-#endif // of ENABLE_PACKAGE_SYSTEM
}
void FGHTTPClient::shutdown()
_uriHandler.push_back(new flightgear::http::JsonUriHandler(uri));
}
-//#ifdef ENABLE_PACKAGE_SYSTEM
if ((uri = n->getStringValue("pkg"))[0] != 0) {
SG_LOG(SG_NETWORK, SG_INFO, "httpd: adding pkg uri handler at " << uri);
_uriHandler.push_back(new flightgear::http::PkgUriHandler(uri));
}
-//#endif
if ((uri = n->getStringValue("flighthistory"))[0] != 0) {
SG_LOG(SG_NETWORK, SG_INFO, "httpd: adding flighthistory uri handler at " << uri);