WAC::SecSession Class Reference

#include <mw/wac/wacsecsession.h>

Link against: wacsecmgr.lib

class WAC::SecSession
Public Member Functions
SecSession(const QByteArray &, const QString &, const QString &)
SecSession(const QString &, const QString &, UserConditionHandler *)
SecSession(const QByteArray &, UserConditionHandler *)
SecSession(const QString &, const QString &, const QString &, UserConditionHandler *)
~SecSession()
const QHash< QString, QString > &clientInfo()
QString clientName()
QString displayText()
voidevaluate()
voidgetCapList(QList< QString > &)
QString getDomain()
QString getLastDomainParsed()
boolisAllowed(const QStringList &)
boolisAllowed(const QStringList &, isAllowedMode)
QString key()
boolpersist()
boolpersist(QByteArray &)
capabilityErr pruneSecSession(QList< QString > &, QMap< QString, bool > &, bool)
voidsavePromptResponse()
boolsaveSecsession(QString, QString)
voidsetClientInfo(const QString &, const QString &)
voidsetClientName(const QString &)
voidsetDisplayText(const QString &)
voidsetUserHandler(UserConditionHandler *)
Public Signals
voidpromptUser(CapabilitySet *, QString)
voidpromptUserOneShot(QString, QString, bool *)

Detailed Description

This class represents a security manager client session Exported.

Constructor & Destructor Documentation

SecSession ( const QByteArray &, const QString &, const QString & )

SecSession(const QByteArray &policy,
const QString &domain,
const QString &store
)

Constructor

Parameters
policy- Policy file in memory
domain- Domain name
store- Storage location for persistence

SecSession ( const QString &, const QString &, UserConditionHandler * )

SecSession(const QString &key,
const QString &store,
UserConditionHandler *handler = NULL
)
Constructor using the key of a previously persisted session
Pre-condition
A previous session must have been stored
Parameters
key- Key of previously persisted session
store- Storage location for persisted sessions
handler- User condition handler

SecSession ( const QByteArray &, UserConditionHandler * )

SecSession(const QByteArray &blob,
UserConditionHandler *handler = NULL
)

SecSession ( const QString &, const QString &, const QString &, UserConditionHandler * )

SecSession(const QString &policyFileName,
const QString &trustDomain,
const QString &secureStoreLocation,
UserConditionHandler *handler = NULL
)

~SecSession ( )

~SecSession()

Destructor

Member Function Documentation

clientInfo ( )

const QHash< QString, QString > &clientInfo()const

Gets the client info hashlist

Return Value
The Client Info hash list

clientName ( )

QString clientName()const

Retrieves the Client Name

Return Value
Client Name

displayText ( )

QString displayText()const

Retrieves the display text

Return Value
Display text

evaluate ( )

voidevaluate()

Evaluates the content of the secsession based on the domain and path to file stored in SecSessionPrivate

getCapList ( QList< QString > & )

voidgetCapList(QList< QString > &capList)

getDomain ( )

QString getDomain()const

getLastDomainParsed ( )

QString getLastDomainParsed()const

isAllowed ( const QStringList & )

boolisAllowed(const QStringList &neededCaps)

isAllowed ( const QStringList &, isAllowedMode )

boolisAllowed(const QStringList &neededCaps,
isAllowedMode
)

Checks whether the list of capabilities are allowed

Parameters
neededCaps- This list of capabilities needed by the caller
Return Value
TRUE if allowed, else FALSE

key ( )

QString key()const

Generates a key for this session, to be used when sharing sessions

See also: SecSession(const QString &aKey, const QString &aStore)

Return Value
The key for this policy

persist ( )

boolpersist()

Persists the current session

Return Value
void

persist ( QByteArray & )

boolpersist(QByteArray &blob)

promptUser ( CapabilitySet *, QString )

voidpromptUser(CapabilitySet *caps,
QStringscope
)[signal]

promptUserOneShot ( QString, QString, bool * )

voidpromptUserOneShot(QStringquestion,
QStringcap,
bool *result
)[signal]

pruneSecSession ( QList< QString > &, QMap< QString, bool > &, bool )

capabilityErr pruneSecSession(QList< QString > &required_caps,
QMap< QString, bool > &optional_caps_map,
boolhasAccessTag
)

savePromptResponse ( )

voidsavePromptResponse()

Serializes the content of the secsession, and writes to the file contained in SecSessionPrivate's clientInfo member variable

saveSecsession ( QString, QString )

boolsaveSecsession(QStringresourcesDir,
QStringsecureSessionString
)

setClientInfo ( const QString &, const QString & )

voidsetClientInfo(const QString &key,
const QString &value
)

Generic method to set any value in the client info list

setClientName ( const QString & )

voidsetClientName(const QString &clientName)

Sets the name of client

Parameters
clientNameClient Name

setDisplayText ( const QString & )

voidsetDisplayText(const QString &text)

Sets the display text of client

Parameters
textDisplay text

setUserHandler ( UserConditionHandler * )

voidsetUserHandler(UserConditionHandler *handler)const

Sets the user condition handler to evaulate permissions

Parameters
handler- User Condition Handler
Return Value
void