CMPXPluginHandlerBase Class Reference
class CMPXPluginHandlerBase : public CBase |
CMPXPluginHandlerBase instantiates and owns a CMPXPluginMonitor to monitor plugins for the designated plugin interface. It also provides plugin selection APIs and a common method for resolving a plugin from a set of selection criteria.
mpxcommon.lib
Public Member Functions |
---|
| CMPXPluginHandlerBase(TUid, TPluginSelection, TInt, MMPXPluginHandlerObserver &, CMPXPluginMonitor *) |
| ~CMPXPluginHandlerBase() |
IMPORT_C void | ClearSelectionCriteria() |
IMPORT_C void | CreatePluginListL() |
IMPORT_C TUid | FindPlugin(const TArray< TUid > &) |
IMPORT_C void | GetPluginTypes(RArray< TInt > &) |
IMPORT_C void | GetPluginUids(RArray< TUid > &) |
IMPORT_C void | GetPluginUidsL(RArray< TUid > &, TInt) |
IMPORT_C void | GetSelectionCriteria(TPluginSelection &, TInt &, TUid &, TPtrC8 &, TPtrC8 &, TPtrC8 &) |
IMPORT_C TInt | IndexOf(const TUid &) |
IMPORT_C TUint | PluginFlagsL(const TUid &) |
IMPORT_C const TDesC & | PluginName(TInt) |
IMPORT_C const TDesC & | PluginName(const TUid &) |
IMPORT_C CDesCArray * | PluginNamesL() |
IMPORT_C TUid | PluginType(const TUid &) |
IMPORT_C TUid | PluginUid(const TDesC &) |
IMPORT_C TBool | ReleasePlugin(const TUid &) |
IMPORT_C void | SelectPluginL(const TUid &) |
IMPORT_C void | SelectPluginL(const TDesC &) |
IMPORT_C void | SelectPluginL(const TDesC &, const TDesC8 &) |
IMPORT_C void | SelectPluginL(const RFile &) |
IMPORT_C void | SelectPluginL(TInt) |
IMPORT_C TBool | SupportUids(const TUid &, const TArray< TUid > &) |
IMPORT_C TUid | SupportedAppUid(const TUid &) |
IMPORT_C CDesCArray * | SupportedExtensionsL() |
IMPORT_C CDesCArray * | SupportedExtensionsL(const TUid &) |
IMPORT_C CDesCArray * | SupportedMimeTypesL() |
IMPORT_C CDesCArray * | SupportedMimeTypesL(const TUid &) |
IMPORT_C CDesCArray * | SupportedSchemasL() |
IMPORT_C void | UsePlugin(const TUid &) |
Constructor & Destructor Documentation
CMPXPluginHandlerBase(TUid, TPluginSelection, TInt, MMPXPluginHandlerObserver &, CMPXPluginMonitor *)
Parameters
TUid aInterfaceUid | The UID of the ECOM plugin interface this plugin handler is designated for |
TPluginSelection aSelection | plugin selection choices as defined in TPluginSelection |
TInt aSelectionType | specifies the type of plugin for selection |
MMPXPluginHandlerObserver & aObserver | plugin handler observer instance |
CMPXPluginMonitor * aPluginMonitor = NULL | plugin monitor. It is for the clients to share the same plugin monitor object. |
~CMPXPluginHandlerBase()
IMPORT_C | ~CMPXPluginHandlerBase | ( | ) | |
Member Functions Documentation
BaseConstructL()
IMPORT_C void | BaseConstructL | ( | ) | [protected] |
ClearSelectionCriteria()
IMPORT_C void | ClearSelectionCriteria | ( | ) | [virtual] |
Clear selection criteria parameters.
ConstructPluginInfoLC(const CImplementationInformation &)
IMPORT_C CMPXPluginInfo * | ConstructPluginInfoLC | ( | const CImplementationInformation & | aData | ) | [protected, virtual] |
Constructs the plugins info class. Can be overwritten by subclasses to construct specialized instances of the plugin info. Default implementation constructs a CMPXPluginInfo class.
Parameters
const CImplementationInformation & aData | implementation data |
CreatePluginListL()
IMPORT_C void | CreatePluginListL | ( | ) | |
Create a list of plugins.
DoResolvePluginL(TUid &, TInt &, TPtrC &, TInt &)
IMPORT_C void | DoResolvePluginL | ( | TUid & | aPluginUid, |
| TInt & | aIndex, |
| TPtrC & | aDisplayName, |
| TInt & | aPluginType |
| ) | [protected, virtual] |
Resolves a plugin based on properties (iDataType, iExt and iScheme) and selection criteria. When a plugin is found, information about the plugin is returned through parameters.
- Since
- S60 3.2.3
-
leave
- KErrNotSupported Index is not found
Parameters
TUid & aPluginUid | This is an OUT parameter. The UID of the matching plugin |
TInt & aIndex | This is an OUT parameter. The index for the plugin info, plugin UID, and plugin types array for the matching plugin |
TPtrC & aDisplayName | This is an OUT parameter. The display name for the matching plugin. CMPXPluginHandlerBase is responsible for the memory management of this parameter. |
TInt & aPluginType | This is an OUT parameter. The plugin type for the matching plugin |
FindPlugin(const TArray< TUid > &)
Find a plugin with matches the array of uids the best.
GetPluginTypes(RArray< TInt > &)
IMPORT_C void | GetPluginTypes | ( | RArray< TInt > & | aTypes | ) | const |
Get currently available plug-in types.
GetPluginUids(RArray< TUid > &)
IMPORT_C void | GetPluginUids | ( | RArray< TUid > & | aUids | ) | const |
Get currently available plug-in UIDs.
GetPluginUidsL(RArray< TUid > &, TInt)
IMPORT_C void | GetPluginUidsL | ( | RArray< TUid > & | aPlugins, |
| TInt | aPluginType |
| ) | const |
All the UIDs of the plug-ins in the system of a specific type.
Parameters
RArray< TUid > & aPlugins | OUT parameter. Array of UIDs of all plugins of type aPluginType. Client is responsible for the memory management of this RArray. |
TInt aPluginType | IN parameter. Plugin type |
GetSelectionCriteria(TPluginSelection &, TInt &, TUid &, TPtrC8 &, TPtrC8 &, TPtrC8 &)
Retrieves the current selection criteria.
Parameters
TPluginSelection & aPluginSelection | OUT parameter. the selection choice as defined by TPluginSelection |
TInt & aPluginType | OUT parameter. plugin type to be used for selection |
TUid & aPluginUid | OUT parameter. UID of the plugin to be used for selection. KNullUid is a possible return value if none is explicitly selected. |
TPtrC8 & aDataType | OUT parameter. The data type to be used for selection. KNullDesC8 if none is specified. CMPXPluginHandlerBase is responsible for the memory management of this parameter. |
TPtrC8 & aScheme | OUT parameter. The scheme to be used for selection. KNullDesC8 if none is specified. CMPXPluginHandlerBase is responsible for the memory management of this parameter. |
TPtrC8 & aExtension | OUT parameter. The extension to be used for selection. KNullDesC8 if none is specified. CMPXPluginHandlerBase is responsible for the memory management of this parameter. |
HandlePluginUnload(const TUid &)
IMPORT_C void | HandlePluginUnload | ( | const TUid & | aPluginUid | ) | [protected, virtual] |
From MMPXPluginMonitorObserver.
- Since
- S60 3.2.3
MMPXPluginMonitorObserver
IndexOf(const TUid &)
IMPORT_C TInt | IndexOf | ( | const TUid & | aPluginUid | ) | const |
Returns the index of the specified plugin.
Parameters
const TUid & aPluginUid | UID of the plugin to search for |
IsPluginLoaded(const TUid &)
IMPORT_C TBool | IsPluginLoaded | ( | const TUid & | aPluginUid | ) | [protected, virtual] |
Checks if the specified plugin is loaded.
Parameters
const TUid & aPluginUid | identifies the plugin |
LoadPluginL(const TUid &)
IMPORT_C void | LoadPluginL | ( | const TUid & | aPluginUid | ) | [protected, virtual] |
Request to the derived class to load a specified plugin.
Parameters
const TUid & aPluginUid | identifies the plugin |
PluginFlagsL(const TUid &)
IMPORT_C TUint | PluginFlagsL | ( | const TUid & | aUid | ) | const |
Get plugin flag for a given implementation UID.
- Since
- S60 3.2.3
-
leave
- KErrNotFound Uid is not found
Parameters
const TUid & aUid | plugin's implementation Uid |
PluginName(TInt)
IMPORT_C const TDesC & | PluginName | ( | TInt | aPluginType | ) | const |
Returns display name for plugin with the given type.
PluginName(const TUid &)
IMPORT_C const TDesC & | PluginName | ( | const TUid & | aUid | ) | const |
Returns display name for plugin with the given uid.
Parameters
const TUid & aUid | plugin id |
PluginNamesL()
Returns a list of display names for the plugins.
PluginType(const TUid &)
IMPORT_C TUid | PluginType | ( | const TUid & | aUid | ) | const |
Get plugin type for a given implementation UID.
Parameters
const TUid & aUid | plugin's implementation Uid |
PluginUid(const TDesC &)
IMPORT_C TUid | PluginUid | ( | const TDesC & | aPluginName | ) | const |
Returns the UID of the plugin with the specified display name.
Parameters
const TDesC & aPluginName | a plugin's display name |
PluginsChangedL()
IMPORT_C void | PluginsChangedL | ( | ) | [protected, virtual] |
From MMPXPluginMonitorObserver. This is invoked by CMPXPluginMonitor when there is a change in the plugins for the designated plugin interface in the system.
ReleasePlugin(const TUid &)
IMPORT_C TBool | ReleasePlugin | ( | const TUid & | aPluginUid | ) | |
Indicates that this plugin is no longer used by a client. Plugins are reference counted and this call may result in the plugin being unloaded.
Parameters
const TUid & aPluginUid | plugin UID |
ResolvePluginL()
IMPORT_C void | ResolvePluginL | ( | ) | [protected, virtual] |
Resolves a plugin. To be implemented by the child class. This is invoked whenever a client selects a plugin and whenever CMPXPluginMonitor notifies that there is a change in the plugins for the designated plugin interface in the system.
A typical implementation for this method is to invoke DoResolvePluginL and instantiate a plugin using the plugin UID returned from DoResolvePluginL.
NOTE: this method is not pure virtual because currently the playlist recognizer instantiates this class as opposed to the derived handler. This should be fixed and both ResolvePluginL and UnloadPlugin should be made pure virtuals.
SelectPluginL(const TUid &)
IMPORT_C void | SelectPluginL | ( | const TUid & | aPluginUid | ) | |
Use this particular plugin.
Parameters
const TUid & aPluginUid | UID of the plugin to be used |
SelectPluginL(const TDesC &)
IMPORT_C void | SelectPluginL | ( | const TDesC & | aPluginName | ) | |
Use the plugin with the specified display name.
Parameters
const TDesC & aPluginName | name of the plugin |
SelectPluginL(const TDesC &, const TDesC8 &)
IMPORT_C void | SelectPluginL | ( | const TDesC & | aUri, |
| const TDesC8 & | aDataType |
| ) | [virtual] |
Select a plugin based on the URI and data type of the media given.
- Since
- S60 3.2.3
-
leave
- KErrArgument Invalid URI
Parameters
const TDesC & aUri | URI of the media |
const TDesC8 & aDataType | Mime type of the media. KNullDesC8 if not to be used for selection. |
SelectPluginL(const RFile &)
IMPORT_C void | SelectPluginL | ( | const RFile & | aFile | ) | [virtual] |
Select a plugin based on file handle for the given media.
Parameters
const RFile & aFile | a file handle to the media |
SelectPluginL(TInt)
IMPORT_C void | SelectPluginL | ( | TInt | aPluginType | ) | [virtual] |
Select a plugin based on the plugin type.
Parameters
TInt aPluginType | plugin type for the appropriate plugin to be used. The representation for each bit is to be defined by each plugin interface. |
SupportUids(const TUid &, const TArray< TUid > &)
Check if the plugin supports the array of uids.
Parameters
const TUid & aPluginId | plugin id |
const TArray< TUid > & aUids | contains plugin uids |
SupportedAppUid(const TUid &)
IMPORT_C TUid | SupportedAppUid | ( | const TUid & | aUid | ) | const |
Get supported app uid for a given implementation UID
Parameters
const TUid & aUid | plugin's implementation Uid |
SupportedExtensionsL()
Return a list of file extensions supported by plugins.
SupportedExtensionsL(const TUid &)
Return a list of file extensions supported by a plugin.
Parameters
const TUid & aUid | plugin id |
SupportedMimeTypesL()
Return a list of mime types supported by plugins.
SupportedMimeTypesL(const TUid &)
Return a list of mime types supported by a plugin.
Parameters
const TUid & aUid | plugin id |
SupportedSchemasL()
Return a list of schemas supported by plugins.
UnloadPlugin(const TUid &)
IMPORT_C void | UnloadPlugin | ( | const TUid & | aPluginUid | ) | [protected, virtual] |
Request to the derived class to unload a specified plugin.
Parameters
const TUid & aPluginUid | identifies the plugin |
UsePlugin(const TUid &)
IMPORT_C void | UsePlugin | ( | const TUid & | aPluginUid | ) | |
Indicates that this plugin is used by a client. Increments the reference count for the plugin.
Parameters
const TUid & aPluginUid | plugin UID |
Member Enumerations Documentation
Enum TPluginSelection
Enumerators
ESelectionType | |
ESelectionUid | |
Member Data Documentation
TUid
iInterfaceUid
TUid
| iInterfaceUid | [protected] |
MMPXPluginHandlerObserver & iObserver
MMPXPluginHandlerObserver & | iObserver | [protected] |
TBool
iOwnedPluginMonitor
TBool
| iOwnedPluginMonitor | [protected] |
RPointerArray< CMPXPluginInfo > iPluginInfoArray
CMPXPluginMonitor * iPluginMonitor
TInt
iSelectedType
TInt
| iSelectedType | [protected] |
TUid
iSelectedUid
TUid
| iSelectedUid | [protected] |
TPluginSelection
iSelection
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.