MScreensaverPlugin Class Reference

#include <mw/screensaverplugin.h>

class MScreensaverPlugin
Public Member Functions
virtual ~MScreensaverPlugin()
virtual TInt Capabilities()
pure virtual TInt Draw(CWindowGc &)
pure virtual TInt HandleScreensaverEventL(TScreensaverEvent, TAny *)
pure virtual TInt InitializeL(MScreensaverPluginHost *)
pure virtual const TDesC16 &Name()
virtual TInt PluginFunction(TScPluginCaps, TAny *)

Detailed Description

The base class for screensaver plugin modules. Every plugin module must inherit and implement this class.

Constructor & Destructor Documentation

~MScreensaverPlugin ( )

~MScreensaverPlugin()[inline, virtual]

Virtual desctructor.

Member Function Documentation

Capabilities ( )

TInt Capabilities()[inline, virtual]

Screensaver plugin capabilities query. The capabilitities reveal which functions the plugin implements, that can be used by calling PluginFunction().


Capabilites need to be defined as opaque_data in ECom plugin registration file as well.

Return Value
Bit mask of plugin capabilities.

Draw ( CWindowGc & )

TInt Draw(CWindowGc &aGc)[pure virtual]

When a plugin module is active this method is called every time when refresh timer expires in screensaver application.

aGcGraphics context for plugin module to draw to.
Return Value
KErrNone if everything went ok. Otherwise system wide error code (doesn't have any effect in current version).

HandleScreensaverEventL ( TScreensaverEvent, TAny * )

TInt HandleScreensaverEventL(TScreensaverEventaEvent,
TAny *aData
)[pure virtual]

Handler function for screensaver events.

aEventEvent to be handled.
aDataData related to the event. To be decided on a case-by-case basis.
Return Value
KErrNone if OK, otherwise an error code.

InitializeL ( MScreensaverPluginHost * )

TInt InitializeL(MScreensaverPluginHost *aHost)[pure virtual]

Used to initialize the plugin module after creation. Name() function may be called without the plugin being initialized, to enable name query from modules that are not plugin hosts.

aHostScreensaver plugin host.
Return Value
KErrNone if everything went ok. Otherwise system wide error code.

Name ( )

const TDesC16 &Name()const [pure virtual]

Returns the name of plugin module. Returned name is displayed in the list of installed plugin modules in Themes application. If this function returns an empty name (KNullDesC), displayed name is taken from ECom registration resource.

Return Value
Descriptor containing the name of the plugin module.

PluginFunction ( TScPluginCaps, TAny * )

TInt PluginFunction(TScPluginCaps,
TAny *
)[inline, virtual]

Screensaver plugin function method. Only the functions returned by Capabilities() can be used, and only one function at a time.


Return Value
System wide error code. KErrNone on success.