Home · All Classes · Main Classes · Deprecated |
Inherits MDesktopEntry.
Public Member Functions | |
MAppletMetaData (const QString &filename) | |
virtual | ~MAppletMetaData () |
bool | isValid () const |
QString | runnerBinary () const |
QString | appletBinary () const |
QString | resourceIdentifier () const |
This class provides m applet metadata such as applet binary, appletrunner binary, icon and description.
Applet metadata is stored in a .desktop file. The metadata file may also contain applet specific metadata such as script or markup source. Applet-specific information can also be accessed through this interface.
Applet is ran using applet runner binary. Each applet has to define an applet binary which is compiled as a shared library. Both applet binaries and applet runner binaries are searched from a centralized place in the file system. The location for applet binaries and applet runner binaries is determined by APPLET_LIBS compile-time definition. All applet binaries and applet runner binaries are searched from this location.
// Instantiate metadata from an applet file relative to binary path. MAppletMetaData data("filename.desktop"); // Make sure that applet metadata is valid before using it. if(data.isValid()) { // Access metadata.. }
MAppletMetaData::MAppletMetaData | ( | const QString & | filename | ) |
Constructs a new instance of MAppletMetaData by reading the .desktop file in that is given as a construction parameter.
filename | Location of .desktop file to be read by constructed MAppletMetaData instance. |
MAppletMetaData::~MAppletMetaData | ( | ) | [virtual] |
Destructor
QString MAppletMetaData::appletBinary | ( | ) | const |
Get absolute path of the applet binary. The applet binary absolute path is effectively the APPLET_LIBS compile-time path definition appended by the applet binary defined in the applet metadata.
bool MAppletMetaData::isValid | ( | ) | const [virtual] |
Checks if the given metadata file contains all necessary data for an applet. At least applet binary needs to be specified.
Note that applet metadata file needs to be valid desktop file before applet metadata-specific keys are investigated.
Reimplemented from MDesktopEntry.
QString MAppletMetaData::resourceIdentifier | ( | ) | const |
Get a resource identifier for the applet, used for specifying the directory of applet resources.
QString MAppletMetaData::runnerBinary | ( | ) | const |
Returns absolute path of the applet runner binary. The applet runner absolute path is effectively the APPLET_LIBS compile-time path definition appended by the applet runner binary defined in the applet metadata.
If runner binary is not specified the applet described by this metadata should be ran in the host process.
Copyright © 2010 Nokia Corporation | MeeGo Touch |