From Stepan Huber, "attached are my changes for the osc, zeroconf and resthttp-plugin to use the new event-class. I refactored the osgoscdevice-example so that it’s working again. "
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
return !(getEventQueue()->empty());
|
||||
}
|
||||
|
||||
virtual void sendEvent(const osgGA::GUIEventAdapter& event)
|
||||
virtual void sendEvent(const osgGA::Event& event)
|
||||
{
|
||||
if (event.getName() == "/zeroconf/advertise")
|
||||
{
|
||||
@@ -96,11 +96,10 @@ public:
|
||||
virtual bool ignoreIP6Addresses() { return true; }
|
||||
virtual void serviceAdded(const std::string& host, unsigned int port)
|
||||
{
|
||||
osg::ref_ptr<osgGA::GUIEventAdapter> event = new osgGA::GUIEventAdapter();
|
||||
osg::ref_ptr<osgGA::Event> event = new osgGA::Event();
|
||||
|
||||
OSG_NOTICE << "ZeroConfDevice :: serviceAdded: " << host << ":" << port << " event " << event << std::endl;
|
||||
|
||||
event->setEventType(osgGA::GUIEventAdapter::USER);
|
||||
|
||||
event->setName("/zeroconf/service-added");
|
||||
event->setUserValue("host", host);
|
||||
@@ -112,12 +111,10 @@ public:
|
||||
|
||||
virtual void serviceRemoved(const std::string& host, unsigned int port)
|
||||
{
|
||||
osg::ref_ptr<osgGA::GUIEventAdapter> event = new osgGA::GUIEventAdapter();
|
||||
osg::ref_ptr<osgGA::Event> event = new osgGA::Event();
|
||||
|
||||
OSG_NOTICE << "ZeroConfDevice :: serviceRemoved: " << host << ":" << port << " event " << event << std::endl;
|
||||
|
||||
event->setEventType(osgGA::GUIEventAdapter::USER);
|
||||
|
||||
event->setName("/zeroconf/service-removed");
|
||||
event->setUserValue("host", host);
|
||||
event->setUserValue("port", port);
|
||||
|
||||
Reference in New Issue
Block a user