NaviLibrary::NaviEventListener Class Reference

#include <NaviEventListener.h>

List of all members.

Public Member Functions

virtual void onNaviDataEvent (Navi *caller, const NaviData &naviData)=0
virtual void onNavigateBegin (Navi *caller, const std::string &url, bool &shouldContinue)=0
virtual void onLocationChange (Navi *caller, const std::string &url)=0
virtual void onNavigateComplete (Navi *caller, const std::string &url, int responseCode)=0


Detailed Description

To receive event notifications about your Navis from the NaviManager, inherit from this abstract class and invoke NaviManager::addNaviEventListener.

Member Function Documentation

virtual void NaviLibrary::NaviEventListener::onNaviDataEvent ( Navi caller,
const NaviData naviData 
) [pure virtual]

This is invoked when a NaviData-capable page sends NaviData

Parameters:
caller The Navi that invoked this event.
naviData The sent NaviData.

virtual void NaviLibrary::NaviEventListener::onNavigateBegin ( Navi caller,
const std::string &  url,
bool &  shouldContinue 
) [pure virtual]

This is invoked when a Navi begins to navigate to a certain URL. You may stop or redirect the load by setting "shouldContinue" to false.

Parameters:
caller The Navi that invoked this event.
url The URL (Web Address) that the browser is about to navigate to.
shouldContinue Set this out parameter to false if you wish to abort the navigation.
Note:
You may use this event to implement custom whitelisting/blacklisting or redirection.

virtual void NaviLibrary::NaviEventListener::onLocationChange ( Navi caller,
const std::string &  url 
) [pure virtual]

This is invoked when the internal browser of a Navi begins to navigate to a location.

Parameters:
caller The Navi that invoked this event.
uri The URL (Web Address) that the browser is navigating to.

virtual void NaviLibrary::NaviEventListener::onNavigateComplete ( Navi caller,
const std::string &  url,
int  responseCode 
) [pure virtual]

This is invoked when the internal browser of a Navi completes navigation to a location.

Parameters:
caller The Navi that invoked this event.
uri The URL (Web Address) that the browser has finished navigating to.
responseCode The response code given by the server (for local pages, this will always be 0).
Note:
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for common response code definitions.


The documentation for this class was generated from the following file:
Generated on Tue Jun 10 22:33:20 2008 for NaviLibrary by  doxygen 1.5.3