CGSPluginInterface Class Reference

class CGSPluginInterface : public CAknView

Interface class for GS plugin. All GS plugins will implement this class.

The main functionality GS framework will use from CAknView is: -DoActivate() -DoDeactivate() -Id() functions.

Id() function must return the value of the plugin implementation UID. This means that the main view of the plugin will have the same UID as the plugin implementation. This will prevent multiple plugins from having same view UIDs as their main view. If plugin has more views, it is plugin's responsibility to ensure that the UIDs of the other views are unique. This can be done for example reserving a unique UID from Symbian.

Most of the functions have implementation using default values. Override functions if different values or implementations are desired.

CGSPluginInterface UID = 0x10207236

See GSFWViewUIDs.h for plugin UIDs.

Plugin implementation UID will be used when defining the parent view of a plugin. If plugin belongs to application settings view, set the ApplicationSettingsView plugin implementation Uid as a value in the plugin's default_data field in plugin's implementation info resource file.

Needed libraries (at least): GSEcomPlugin.lib GSFramework.lib egul.lib aknskins.lib efsrv.lib

GSFramework.lib
Since
Series60_3.1

Inherits from

Public Member Functions
~CGSPluginInterface ()
IMPORT_C CGulIcon * CreateIconL (const TUid )
IMPORT_C TAny * CustomOperationL ( TAny *, TAny *)
void GetCaptionL ( TDes &)
IMPORT_C TUid GetEcomDestructorKey ()
IMPORT_C void GetValue (const TGSPluginValueKeys , TDes &)
IMPORT_C void HandleSelection (const TGSSelectionTypes )
IMPORT_C TGSListboxItemTypes ItemType ()
IMPORT_C TGSMenuActivationItems MenuActivationItem ()
IMPORT_C CGSPluginInterface * NewL (const TUid , TAny *)
IMPORT_C TInt PluginProviderCategory ()
IMPORT_C void ResetSelectedItemIndex ()
IMPORT_C void SetOrder ( TInt )
IMPORT_C TBool Visible ()
Protected Member Functions
CGSPluginInterface ()
Inherited Functions
CAknView::ActivateViewL(const TVwsViewId &)
CAknView::ActivateViewL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::AknViewActivatedL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::AknViewDeactivated()
CAknView::AppUi()const
CAknView::BaseConstructL(TInt)
CAknView::CAknView()
CAknView::Cba()const
CAknView::ClientRect()const
CAknView::ConstructMenuAndCbaEarlyL()
CAknView::CreateAndSetToolbarL(TInt)
CAknView::DoActivateL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::DoDeactivate()
CAknView::HandleCommandL(TInt)
CAknView::HandleForegroundEventL(TBool)
CAknView::HandleStatusPaneSizeChange()
CAknView::HandleViewRectChange()
CAknView::Id()const
CAknView::IsForeground()const
CAknView::MenuBar()const
CAknView::MopNext()
CAknView::MopSupplyObject(TTypeUid)
CAknView::ProcessCommandL(TInt)
CAknView::ProcessForegroundEventL(TBool)
CAknView::Redraw()const
CAknView::SaveToolbarStatus(TBool,TBool)
CAknView::SetEmphasis(CCoeControl *,TBool)
CAknView::SetToolbar(CAknToolbar *)
CAknView::ShowToolbarOnViewActivation(TBool)
CAknView::StatusPane()const
CAknView::StopDisplayingMenuBar()
CAknView::StopDisplayingToolbar()
CAknView::Toolbar()const
CAknView::ToolbarShownOnViewActivation()const
CAknView::ViewActivatedL(const TVwsViewId &,TUid,const TDesC8 &)
CAknView::ViewDeactivated()
CAknView::ViewId()const
CAknView::ViewScreenDeviceChangedL()
CAknView::~CAknView()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TGSPluginProviderCategory { EGSPluginProviderOEM  = 1, EGSPluginProviderOperator  = 2, EGSPluginProvider3rdParty  = 3 }
Private Attributes
TUid iDtor_ID_Key
TInt iOrder
Inherited Attributes
CAknView::iCoeEnv

Constructor & Destructor Documentation

CGSPluginInterface()

IMPORT_C CGSPluginInterface ( ) [protected]

C++ constructor.

~CGSPluginInterface()

IMPORT_C ~CGSPluginInterface ( )

Destructor

Member Functions Documentation

CreateIconL(const TUid)

IMPORT_C CGulIcon * CreateIconL ( const TUid aIconType ) [virtual]

Creates a new icon of desired type. Override this to provide custom icons. Othervise default icon is used for KGSIconTypeLbxItem. Other icons are empty. Ownership of the created icon is transferred to the caller. NOTE: Return NULL if icon is not to be displayed.

Icon type UIDs (use these defined constants): KGSIconTypeLbxItem - ListBox item icon. KGSIconTypeLbxSettingsItem - Settings item icon. KGSIconTypeTab - Tab icon. KGSIconTypeDColumn - Small icon in D-column.

Parameters

const TUid aIconType UID Icon type UID of the icon to be created.

CustomOperationL(TAny *, TAny *)

IMPORT_C TAny * CustomOperationL ( TAny * aParam1,
TAny * aParam2
) [virtual]

Reserved for future use/plugin's custom functionality. This can be overwritten if plugin needs to have custom functionality which cannot be fulfilled otherwise.

Use TGSCustomOperationType enumeration as aParam1 to define operation type.

Parameters

TAny * aParam1
TAny * aParam2

GetCaptionL(TDes &)

void GetCaptionL ( TDes & aCaption ) const [pure virtual]

Method for getting caption of this plugin. This should be the localized name of the settings view to be shown in parent view.

Parameters

TDes & aCaption pointer to Caption variable

GetEcomDestructorKey()

IMPORT_C TUid GetEcomDestructorKey ( )

In case plug-in is loaded outside GS application and CGSPluginLoader, cleaning up plug-in's ECOM resources must be done manually.

Example: CGSPluginInterface* myPlugin = CGSPluginInterface::NewL (...); REComSession::DestroyedImplementation ( myPlugin-> GetEcomDestructorKey() ); delete myPlugin;

GetValue(const TGSPluginValueKeys, TDes &)

IMPORT_C void GetValue ( const TGSPluginValueKeys aKey,
TDes & aValue
) [virtual]

Function for getting plugin's value for a certain key. Override to provide own functionality.

Parameters

const TGSPluginValueKeys aKey Key for the value to be retrieved. aValue Value for the given gey in TDes format.
TDes & aValue

HandleSelection(const TGSSelectionTypes)

IMPORT_C void HandleSelection ( const TGSSelectionTypes aSelectionType ) [virtual]

This function is called in case plugin is an item in a settings listbox and user selects the item. Override this if plugin needs to provide functionality for item selection.

Default implementation activates the plugin.

Parameters

const TGSSelectionTypes aSelectionType Defines how user selected the plugin. See TGSSelectionTypes.

ItemType()

IMPORT_C TGSListboxItemTypes ItemType ( ) [virtual]

This defines the appearance of the plugin in a parent plugin listbox. Default value is EGSItemTypeSingleLarge. Please notice that the parent listbox type cannot be defined by a child plugin so plugins using these must be aware of the parent plugin listbox type.

MenuActivationItem()

IMPORT_C TGSMenuActivationItems MenuActivationItem ( ) [virtual]

This function is only used for child plugins. Defines the dynamic menu item that activates this plugin from parent plugin. This menu item will override the item defined in resource file. Normally 'Open' is used to open the child plugin. Override this to change the activation to for example 'Change'. TGSMenuActivationItems defines the different possible menu items that can be used to open this plugin.

Note: This also defines MSK. Menu activation item and MSK have identical label and behaviour. An exception to this is when custom text is empty: in this case MSK is empty but there is no item in options menu (no empty item in menu).

@ return Type of the menu item and MSK that should activate this child plugin from parent plugin.

NewL(const TUid, TAny *)

IMPORT_C CGSPluginInterface * NewL ( const TUid aImplementationUid,
TAny * aInitParams
) [static]

Creates new GS plugin having the given UID. Uses Leave code KErrNotFound if implementation is not found.

Parameters

const TUid aImplementationUid Implementation UID of the plugin to be created.
TAny * aInitParams Plugin's initialization parameters. Make sure you know what the plugin expects as initialization parameters. This should be an agreement between the plugin client and the plugin. Parameter can be used for example as sharing a common data model between multiple plugins.

PluginProviderCategory()

IMPORT_C TInt PluginProviderCategory ( ) const [virtual]

Method for reading the ID of the plugin provider category. See TGSPluginProviderCategory. PluginProviderCategory can be used for sorting plugins.

Default value is EGSPluginProvider3rdParty. Override this function to change the category.

ResetSelectedItemIndex()

IMPORT_C void ResetSelectedItemIndex ( ) [virtual]

Resets plugin's selected item index if this is supported. Default implementation does nothing. This is needed when navigating from child plugin back to parent plugin. In this case child plugin should reset selected index in its listbox.

SetOrder(TInt)

IMPORT_C void SetOrder ( TInt aOrder )

Sets the Index of the plugin in listbox. Used for CGSPluginLoader. Default value is KGSPluginNotIndexed which means not ordered. This value is read, if defined, from the opaque_data field of the plugin's resource definition. Index starts from 0.

Parameters

TInt aOrder

Visible()

IMPORT_C TBool Visible ( ) const [virtual]

Method for checking, if plugin should be visible and used in GS FW. (for example shown in listbox of the parent view).

On default plugin is visible. Overwrite this function to enable or disable your plugin dynamically.

Member Enumerations Documentation

Enum TGSPluginProviderCategory

Category of the plugin provider. Provider's type affects the sorting of the plugins. Type EGSPluginProvider3rdParty plugins are allowed to be loaded only by Applications-plugin. Other categories may exist but they should be used only internally.

Enumerators

EGSPluginProviderOEM = 1
EGSPluginProviderOperator = 2
EGSPluginProvider3rdParty = 3

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key [private]

TInt iOrder

TInt iOrder [private]

Index of the plugin in listbox. Used for CGSPluginLoader. Default value is KGSPluginNotIndexed which means not ordered. This value is read, if defined, from the opaque_data field of the plugin's resource definition. Index starts from 0.