i am new to plugin development. I was told to use Firebreath, for developing npapi plugins, and it turned out to be very easy. Now, i wish to access the http response header of the response passed on to plugin. But i couldn't figure out a way as their is scarce doc available for firebreath. In NPAPI tutorials, they use npstream, but i can't figure out how to use this structure in firebreath. Any help will be highly appreciated.
Update:
void tPlugin::handleUnsolicitedStream(FB::BrowserStreamRequest& req)
{
const FB::PluginEventSinkPtr sinkPtr;
req.setEventSink(sinkPtr);
responseHeaders = req.headers;
FB::HeaderMap::const_iterator it = responseHeaders.begin();
str = (*it).first + " : " + (*it).second; // str is a class variable
FB::DOM::WindowPtr window = m_host->getDOMWindow();
window->alert(str);
str = "hello";
window->alert(fname);
}
None of the alert box appears!
void tPlugin::onPluginReady()
{
FB::DOM::WindowPtr window = m_host->getDOMWindow();
window->alert(str);
}
An empty alert box appears!