PromptHandler Class Reference

#include <mw/wac/prompthandler.h>

Link against: prompthandler.lib

class PromptHandler : public QObject

Class for handling launch-time user prompting for access to certain capabilities.

Inherits from

  • PromptHandler
    Public Member Functions
    PromptHandler()
    ~PromptHandler()
    voidclearPrompt()
    boolparseFeatureTags()
    voidsetPromptsDisabled(bool)
    voidsetWidgetPath(QString)
    Public Slots
    voidhandleOneShotPrompt(QString, QString, bool *)
    voidhandlePrompt(QString, QList< QString >)
    voidhandlerDeveloperPrompt(QString, QList< QString >)
    Public Signals
    voiduserResponse(bool)
    Inherited Attributes
    QObject::d_ptr
    QObject::objectName
    QObject::staticQtMetaObject
    Inherited Functions
    QObject::QObject(QObjectPrivate &,QObject *)
    QObject::blockSignals(bool)
    QObject::childEvent(QChildEvent *)
    QObject::children()const
    QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const
    QObject::connectNotify(const char *)
    QObject::customEvent(QEvent *)
    QObject::deleteLater
    QObject::destroyed
    QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &)
    QObject::disconnect(const QObject *,const char *)
    QObject::disconnect(const QObject *,const char *,const QObject *,const char *)
    QObject::disconnect(const char *,const QObject *,const char *)
    QObject::disconnectNotify(const char *)
    QObject::dumpObjectInfo()
    QObject::dumpObjectTree()
    QObject::dynamicPropertyNames()const
    QObject::event(QEvent *)
    QObject::eventFilter(QObject *,QEvent *)
    QObject::findChild(const QString &)const
    QObject::findChildren(const QRegExp &)const
    QObject::findChildren(const QString &)const
    QObject::inherits(const char *)const
    QObject::installEventFilter(QObject *)
    QObject::isWidgetType()const
    QObject::killTimer(int)
    QObject::moveToThread(QThread *)
    QObject::objectName()const
    QObject::parent()const
    QObject::property(const char *)const
    QObject::receivers(const char *)const
    QObject::registerUserData()
    QObject::removeEventFilter(QObject *)
    QObject::sender()const
    QObject::senderSignalIndex()const
    QObject::setObjectName(const QString &)
    QObject::setParent(QObject *)
    QObject::setProperty(const char *,const QVariant &)
    QObject::setUserData(uint,QObjectUserData *)
    QObject::signalsBlocked()const
    QObject::startTimer(int)
    QObject::thread()const
    QObject::timerEvent(QTimerEvent *)
    QObject::userData(uint)const
    QObject::~QObject()

    Detailed Description

    Prompts the user at launch time for access to the union of capabilities requested in the feature tag and capabilities listed with "access" attribute in the access policy file.

    Capabilities listed with access="session" or access="blanket" in the access policy file are stored in a widget's secsession inside a <user> element which contains information about the scope and grant status of all capabilities listed.

    Constructor & Destructor Documentation

    PromptHandler ( )

    PromptHandler()

    ~PromptHandler ( )

    ~PromptHandler()

    Member Function Documentation

    clearPrompt ( )

    voidclearPrompt()

    handleOneShotPrompt ( QString, QString, bool * )

    voidhandleOneShotPrompt(QStringquestion,
    QStringprompt,
    bool *result
    )[slot]

    Finds the union of capabilities requested by a widget, and those requiring user prompts. Depending on the response of the user, updates the UserCondition associated with the capabilities in question. These capabilities are then saved in the secsession, ready to be serialized and written to disk.

    handlePrompt ( QString, QList< QString > )

    voidhandlePrompt(QStringquestion,
    QList< QString >prompt
    )[slot]

    Finds the union of capabilities requested by a widget, and those requiring user prompts. Depending on the response of the user, updates the UserCondition associated with the capabilities in question. These capabilities are then saved in the secsession, ready to be serialized and written to disk.

    handlerDeveloperPrompt ( QString, QList< QString > )

    voidhandlerDeveloperPrompt(QStringquestion,
    QList< QString >prompt
    )[slot]

    Finds the union of capabilities requested by a widget, and those requiring user prompts. Depending on the response of the user, updates the UserCondition associated with the capabilities in question. These capabilities are then saved in the secsession, ready to be serialized and written to disk.

    parseFeatureTags ( )

    boolparseFeatureTags()

    Opens and parses a widget's config.xml file, looking for services requested using a <feature> tag. This funciton then gets a mapping of services to capabilities, saving all capabilities requested for further use.

    Return Value
    true if any capabilities are requested inside config.xml

    setPromptsDisabled ( bool )

    voidsetPromptsDisabled(booldisabled)

    Disables prompting (designed for widgets that are added to the home screen)

    Parameters
    disabledTrue if you wish to disable prompting

    setWidgetPath ( QString )

    voidsetWidgetPath(QStringpath)

    Stores the path supplied for further use

    Parameters
    paththe full path of the installed widget that requires prompts

    userResponse ( bool )

    voiduserResponse(boolresponse)[signal]