webappmanager
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WebAppBase Class Reference

#include <WebAppBase.h>

Inheritance diagram for WebAppBase:
[legend]
Collaboration diagram for WebAppBase:
[legend]

Public Member Functions

 WebAppBase ()
 
virtual ~WebAppBase ()
 
virtual void attach (SysMgrWebBridge *)
 
virtual SysMgrWebBridgedetach ()
 
virtual void thawFromCache ()
 
virtual void freezeInCache ()
 
bool inCache () const
 
void markInCache (bool inCache)
 
void setKeepAlive (bool keepAlive)
 
bool keepAlive ()
 
SysMgrWebBridgepage () const
 
virtual bool isWindowed () const
 
virtual bool isCardApp () const
 
virtual bool isChildApp () const
 
virtual bool isDashboardApp () const
 
virtual bool isAlertApp () const
 
void relaunch (const char *args, const char *launchingAppId, const char *launchingProcId)
 
virtual void stagePreparing ()
 
virtual void stageReady ()
 
QString appId () const
 
QString processId () const
 
QString url () const
 
ApplicationDescriptiongetAppDescription ()
 
void setAppDescription (ApplicationDescription *)
 
void setManualEditorFocusEnabled (bool)
 
virtual void setManualEditorFocus (bool focused, const PalmIME::EditorState &)
 
virtual void setExplicitEditorFocus (bool focused, const PalmIME::EditorState &editorState)
 
virtual void suspendAppRendering ()
 
virtual void resumeAppRendering ()
 
virtual void resizeWebPage (uint32_t width, uint32_t height)
 

Protected Slots

virtual void uriChanged (const QUrl &)
 

Protected Member Functions

virtual int getKey () const
 
virtual void focus ()
 
virtual void unfocus ()
 
virtual void close ()
 
virtual void windowSize (int &width, int &height)
 
virtual void screenSize (int &width, int &height)
 
virtual void resizedContents (int contentsWidth, int contentsHeight)
 
virtual void zoomedContents (double scaleFactor, int contentsWidth, int contentsHeight, int newScrollOffsetX, int newScrollOffsetY)
 
virtual void scrolledContents (int newContentsX, int newContentsY)
 
virtual void uriChanged (const char *url)
 
virtual void titleChanged (const char *title)
 
virtual void statusMessage (const char *msg)
 
virtual void dispatchFailedLoad (const char *domain, int errorCode, const char *failingURL, const char *localizedDescription)
 
virtual void loadFinished ()
 
virtual void editorFocusChanged (bool focused, const PalmIME::EditorState &state)
 
virtual void autoCapEnabled (bool enabled)
 
void createActivity ()
 
void destroyActivity ()
 
void focusActivity ()
 
void blurActivity ()
 
void cleanResources ()
 
void setAppId (const QString &appId)
 

Friends

class PalmSystem
 
class SysMgrWebBridge
 

Detailed Description

Base class for different types of app containers to derive from.

Constructor & Destructor Documentation

WebAppBase::WebAppBase ( )

Initializes this app container

Just initializes things to blank values. DOES NOT report to WebAppManager that we've launched.

WebAppBase::~WebAppBase ( )
virtual

Cleans up this app container

This cleans up any resources allocated within this app container. It does not detach from or clean up the WebPage it's attached to - that is expected to be handled by the caller.

Implementation details:

  • Deletes our app from the global app cache (WebAppCache).
  • Lets WebAppManager know that we're being deleted.
  • Cleans up resources, including deleting the content WebPage from memory.
  • Disconnects from sensors.
  • Asks WebAppManager to remove us from the headless watch list.
Note
This deletes the attached WebPage from memory. After deleting this WebAppBase, do not attempt to access any WebPage attached to this instance when it was destroyed.

Member Function Documentation

QString WebAppBase::appId ( ) const
inline

Gets this app's app ID

This is set up when this instance is attached to a page and gets the app ID of the page it's attached to.

Returns
App ID of this app.
void WebAppBase::attach ( SysMgrWebBridge bridge)
virtual

Attaches to a WebPage instance to allow us to manage it

This method sets up the content to display for this app.

In detail, this method:

  • Reports to WebAppManager that this app is launched.
  • Creates a new activity.
  • Loads and applies app properties from the app description.

It's assumed that this WebPage instance will either already have a URL loaded or it will be loaded by the caller after calling this. In other words, this attaches a WebPage, but does not load anything into it.

Note
If still attached when this WebAppBase instance is destroyed, this page will also be deleted from memory. Do not access this page again after attaching it without getting a new pointer to it via WebAppBase::page().
Parameters
pageWebPage of content for this app.

Reimplemented in WindowedWebApp, AlertWebApp, and DashboardWebApp.

virtual void WebAppBase::autoCapEnabled ( bool  enabled)
inlineprotectedvirtual

Enables/disables auto-capitalization in fields in this app

Note
Currently doesn't do anything - see derived class to see if they actually did anything with this.
Parameters
enabledtrue to enable auto-capitalization, false to disable it.

Reimplemented in WindowedWebApp.

void WebAppBase::blurActivity ( )
protected

Asks the Activity Manager service to unfocus our app

Todo:
Document this further once the palm://com.palm.activitymanager/unfocus IPC call is fully documented.
void WebAppBase::cleanResources ( )
protected

Cleans up this app

Implementation details:

Todo:
Document this more fully once we know what a "desc image" is.
void WebAppBase::close ( )
protectedvirtual
void WebAppBase::createActivity ( )
protected

Asks the Activity Manager service to create an activity for us

Todo:
Document this further once the palm://com.palm.activitymanager/create IPC call is fully documented.
void WebAppBase::destroyActivity ( )
protected

Destroys our activity

Todo:
Fully document this once LSCallCancel() is documented.
SysMgrWebBridge * WebAppBase::detach ( void  )
virtual

Detaches this instance from the WebPage it was previously managing

This essentially removes the content from this app.

In detail, this method:

  • Reports to WebAppManager that this app is closed.
  • Destroys the activity for the app.
Returns
The previously-managed WebPage instance containing this app's content.
void WebAppBase::dispatchFailedLoad ( const char *  domain,
int  errorCode,
const char *  failingURL,
const char *  localizedDescription 
)
protectedvirtual
virtual void WebAppBase::editorFocusChanged ( bool  focused,
const PalmIME::EditorState &  state 
)
inlineprotectedvirtual

Reimplemented in WindowedWebApp.

virtual void WebAppBase::focus ( )
inlineprotectedvirtual

Reimplemented in WindowedWebApp, and CardWebApp.

void WebAppBase::focusActivity ( )
protected
virtual void WebAppBase::freezeInCache ( )
inlinevirtual

Reimplemented in CardWebApp.

ApplicationDescription* WebAppBase::getAppDescription ( )
inline
virtual int WebAppBase::getKey ( ) const
inlineprotectedvirtual

Reimplemented in WindowedWebApp.

bool WebAppBase::inCache ( ) const
inline
virtual bool WebAppBase::isAlertApp ( ) const
inlinevirtual

Reimplemented in AlertWebApp.

virtual bool WebAppBase::isCardApp ( ) const
inlinevirtual

Reimplemented in WindowedWebApp, CardWebApp, and DockWebApp.

virtual bool WebAppBase::isChildApp ( ) const
inlinevirtual

Reimplemented in CardWebApp.

virtual bool WebAppBase::isDashboardApp ( ) const
inlinevirtual

Reimplemented in WindowedWebApp, and DashboardWebApp.

virtual bool WebAppBase::isWindowed ( ) const
inlinevirtual

Reimplemented in WindowedWebApp.

bool WebAppBase::keepAlive ( )
inline
virtual void WebAppBase::loadFinished ( )
inlineprotectedvirtual

Reimplemented in WindowedWebApp.

void WebAppBase::markInCache ( bool  inCache)
inline
SysMgrWebBridge* WebAppBase::page ( ) const
inline
QString WebAppBase::processId ( ) const
inline
void WebAppBase::relaunch ( const char *  args,
const char *  launchingAppId,
const char *  launchingProcId 
)
void WebAppBase::resizedContents ( int  contentsWidth,
int  contentsHeight 
)
protectedvirtual
void WebAppBase::resizeWebPage ( uint32_t  width,
uint32_t  height 
)
virtual

Reimplemented in CardWebApp.

virtual void WebAppBase::resumeAppRendering ( )
inlinevirtual

Reimplemented in CardWebApp.

void WebAppBase::screenSize ( int &  width,
int &  height 
)
protectedvirtual

Reimplemented in CardWebApp, and WindowedWebApp.

void WebAppBase::scrolledContents ( int  newContentsX,
int  newContentsY 
)
protectedvirtual
void WebAppBase::setAppDescription ( ApplicationDescription appDesc)
void WebAppBase::setAppId ( const QString &  appId)
inlineprotected
void WebAppBase::setExplicitEditorFocus ( bool  focused,
const PalmIME::EditorState &  editorState 
)
virtual
void WebAppBase::setKeepAlive ( bool  keepAlive)
inline
void WebAppBase::setManualEditorFocus ( bool  focused,
const PalmIME::EditorState &  editorState 
)
virtual
void WebAppBase::setManualEditorFocusEnabled ( bool  enable)
void WebAppBase::stagePreparing ( )
virtual

Reimplemented in WindowedWebApp.

void WebAppBase::stageReady ( )
virtual

Reimplemented in WindowedWebApp, and AlertWebApp.

void WebAppBase::statusMessage ( const char *  msg)
protectedvirtual
virtual void WebAppBase::suspendAppRendering ( )
inlinevirtual

Reimplemented in CardWebApp.

virtual void WebAppBase::thawFromCache ( )
inlinevirtual

Reimplemented in CardWebApp.

void WebAppBase::titleChanged ( const char *  title)
protectedvirtual
virtual void WebAppBase::unfocus ( )
inlineprotectedvirtual

Reimplemented in WindowedWebApp.

void WebAppBase::uriChanged ( const char *  url)
protectedvirtual
void WebAppBase::uriChanged ( const QUrl &  uri)
protectedvirtualslot
QString WebAppBase::url ( ) const
inline
virtual void WebAppBase::windowSize ( int &  width,
int &  height 
)
inlineprotectedvirtual

Reimplemented in WindowedWebApp.

void WebAppBase::zoomedContents ( double  scaleFactor,
int  contentsWidth,
int  contentsHeight,
int  newScrollOffsetX,
int  newScrollOffsetY 
)
protectedvirtual

Friends And Related Function Documentation

friend class PalmSystem
friend
friend class SysMgrWebBridge
friend

The documentation for this class was generated from the following files: