Added password support into present3D's vnc support via the tag usage : <vnc password="mypassword">hostname</vnc>
This commit is contained in:
@@ -1313,9 +1313,14 @@ void ReaderWriterP3DXML::parseLayer(osgPresentation::SlideShowConstructor& const
|
||||
osgPresentation::SlideShowConstructor::ImageData imageData;// = constructor.getImageData();
|
||||
getProperties(cur,imageData);
|
||||
|
||||
std::string password;
|
||||
getProperty(cur, "password", password);
|
||||
|
||||
constructor.addVNC(cur->getTrimmedContents(),
|
||||
positionRead ? positionData : constructor.getImagePositionData(),
|
||||
imageData);
|
||||
imageData,
|
||||
password
|
||||
);
|
||||
}
|
||||
else if (cur->name == "browser")
|
||||
{
|
||||
|
||||
@@ -1277,8 +1277,15 @@ void SlideShowConstructor::addGraph(const std::string& contents,const std::strin
|
||||
}
|
||||
|
||||
|
||||
void SlideShowConstructor::addVNC(const std::string& hostname, const PositionData& positionData, const ImageData& imageData)
|
||||
void SlideShowConstructor::addVNC(const std::string& hostname, const PositionData& positionData, const ImageData& imageData, const std::string& password)
|
||||
{
|
||||
if (!password.empty())
|
||||
{
|
||||
OSG_NOTICE<<"Setting password"<<std::endl;
|
||||
if (!osgDB::Registry::instance()->getAuthenticationMap()) osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
|
||||
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(hostname, new osgDB::AuthenticationDetails("", password));
|
||||
}
|
||||
|
||||
addInteractiveImage(hostname+".vnc", positionData, imageData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user