MoSync 3.3
Wormhole::MessageStream Class Reference

Class that parses messages from the WebView. More...

#include <Wormhole/MessageStream.h>

List of all members.

Public Member Functions

 MessageStream (MAWidgetHandle webViewHandle, MAHandle dataHandle)
 MessageStream::MessageStream (NativeUI::WebView *webView, MAHandle dataHandle)
virtual ~MessageStream ()
bool isValid ()
MAWidgetHandle getWebViewHandle ()
NativeUI::WebViewgetWebView ()
void callJS (const MAUtil::String &script)
const char * getNext (int *length=NULL)

Protected Member Functions

void MessageStream::initialize (MAHandle dataHandle)
int xtoi (char *s, char **newPos)
int raise (int base, int e)

Protected Attributes

MAWidgetHandle mWebViewHandle
char * mData
int mDataSize
char * mStart
char * mEnd

Detailed Description

Class that parses messages from the WebView.

The messages are in the form of a message stream sent from a WebView in a MAW_EVENT_WEB_VIEW_HOOK_INVOKED event.

Messages used with this class has the format:

ms:<4-byte opcode><optional string="" params>="">

TODO: Add copy constructor and assignment operator.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines