#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() |
void | evaluate() |
void | getCapList(QList< QString > &) |
QString | getDomain() |
QString | getLastDomainParsed() |
bool | isAllowed(const QStringList &) |
bool | isAllowed(const QStringList &, isAllowedMode) |
QString | key() |
bool | persist() |
bool | persist(QByteArray &) |
capabilityErr | pruneSecSession(QList< QString > &, QMap< QString, bool > &, bool) |
void | savePromptResponse() |
bool | saveSecsession(QString, QString) |
void | setClientInfo(const QString &, const QString &) |
void | setClientName(const QString &) |
void | setDisplayText(const QString &) |
void | setUserHandler(UserConditionHandler *) |
Public Signals | |
---|---|
void | promptUser(CapabilitySet *, QString) |
void | promptUserOneShot(QString, QString, bool *) |
This class represents a security manager client session Exported.
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 & | key, |
const QString & | store, | ||
UserConditionHandler * | handler = NULL | ||
) |
Parameters | |
---|---|
key | - Key of previously persisted session |
store | - Storage location for persisted sessions |
handler | - User condition handler |
SecSession | ( | const QByteArray & | blob, |
UserConditionHandler * | handler = NULL | ||
) |
SecSession | ( | const QString & | policyFileName, |
const QString & | trustDomain, | ||
const QString & | secureStoreLocation, | ||
UserConditionHandler * | handler = NULL | ||
) |
const QHash< QString, QString > & | clientInfo | ( | ) | const |
Gets the client info hashlist
void | evaluate | ( | ) |
Evaluates the content of the secsession based on the domain and path to file stored in SecSessionPrivate
void | getCapList | ( | QList< QString > & | capList | ) |
QString | getDomain | ( | ) | const |
QString | getLastDomainParsed | ( | ) | const |
bool | isAllowed | ( | const QStringList & | neededCaps | ) |
bool | isAllowed | ( | const QStringList & | neededCaps, |
isAllowedMode | ||||
) |
Checks whether the list of capabilities are allowed
Parameters | |
---|---|
neededCaps | - This list of capabilities needed by the caller |
QString | key | ( | ) | const |
Generates a key for this session, to be used when sharing sessions
See also: SecSession(const QString &aKey, const QString &aStore)
bool | persist | ( | QByteArray & | blob | ) |
void | promptUser | ( | CapabilitySet * | caps, |
QString | scope | |||
) | [signal] |
void | promptUserOneShot | ( | QString | question, |
QString | cap, | |||
bool * | result | |||
) | [signal] |
capabilityErr | pruneSecSession | ( | QList< QString > & | required_caps, |
QMap< QString, bool > & | optional_caps_map, | |||
bool | hasAccessTag | |||
) |
void | savePromptResponse | ( | ) |
Serializes the content of the secsession, and writes to the file contained in SecSessionPrivate's clientInfo member variable
bool | saveSecsession | ( | QString | resourcesDir, |
QString | secureSessionString | |||
) |
void | setClientInfo | ( | const QString & | key, |
const QString & | value | |||
) |
Generic method to set any value in the client info list
void | setClientName | ( | const QString & | clientName | ) |
Sets the name of client
Parameters | |
---|---|
clientName | Client Name |
void | setDisplayText | ( | const QString & | text | ) |
Sets the display text of client
Parameters | |
---|---|
text | Display text |
void | setUserHandler | ( | UserConditionHandler * | handler | ) | const |
Sets the user condition handler to evaulate permissions
Parameters | |
---|---|
handler | - User Condition Handler |