|
MoSync 3.2.1
|
Class that parses JSON messages from the WebView. More...
#include <Wormhole/MessageStreamJSON.h>
Public Member Functions | |
| MessageStreamJSON (MAWidgetHandle webViewHandle, MAHandle dataHandle) | |
| MessageStreamJSON::MessageStreamJSON (NativeUI::WebView *webView, MAHandle dataHandle) | |
| virtual | ~MessageStreamJSON () |
| MAWidgetHandle | getWebViewHandle () |
| NativeUI::WebView * | getWebView () |
| void | callJS (const MAUtil::String &script) |
| bool | next () |
| bool | is (const char *paramName) |
| MAUtil::String | getParam (const char *paramName) |
| int | getParamInt (const char *paramName) |
| bool | hasParam (const char *paramName) |
| MAUtil::YAJLDom::Value * | getParamNode (const char *paramName) |
| MAUtil::YAJLDom::Value * | getJSONRoot () |
| void | parse (MAHandle dataHandle) |
Protected Attributes | |
| MAWidgetHandle | mWebViewHandle |
| NativeUI::WebView * | mWebView |
| MAUtil::YAJLDom::Value * | mJSONRoot |
| int | mCurrentMessageIndex |
Class that parses JSON messages from the WebView.
The messages are in the form of urls sent from a WebView as MAW_EVENT_WEB_VIEW_HOOK_INVOKED events.
Message data used with this class has the format:
ma:[{"messageName":"message1",...},{"messageName":"message2",...},...]
TODO: Add copy constructor and assignment operator.