#include <Session>
Inherits QObject.
- Author
- Radek Novacek rnova.nosp@m.cek@.nosp@m.redha.nosp@m.t.co.nosp@m.m
This class is interface for interacting with native authentication system for obtaining authorizations.
◆ Session() [1/2]
Session::Session |
( |
const PolkitQt1::Identity & |
identity, |
|
|
const QString & |
cookie, |
|
|
AsyncResult * |
result = 0 , |
|
|
QObject * |
parent = 0 |
|
) |
| |
Create a new authentication session.
- Parameters
-
identity | The identity to authenticate |
cookie | The cookie obtained from the PolicyKit daemon |
result | Result of the authentication action. Must be finished using complete() method. |
parent | |
◆ Session() [2/2]
Session::Session |
( |
PolkitAgentSession * |
pkAgentSession, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
Create a new authentication session from PolkitAgentSession object
- Warning
- Use this only if you are completely aware of what are you doing!
- Parameters
-
pkAgentSession | PolkitAgentSession object |
parent | |
◆ ~Session()
Destroy authentication session.
◆ cancel()
Cancel the authentication session. This will emit the completed() signal.
◆ completed
void PolkitQt1::Agent::Session::completed |
( |
bool |
gainedAuthorization | ) |
|
|
signal |
This signal will be emitted when the authentication polkitqt1-agent-session.has been completed or cancelled.
- Parameters
-
gainedAuthorization | True if authorization was successfully obtained. |
◆ initiate()
void Session::initiate |
( |
| ) |
|
Initiate the authentication session.
Use cancel() to cancel the session.
◆ request
void PolkitQt1::Agent::Session::request |
( |
const QString & |
request, |
|
|
bool |
echo |
|
) |
| |
|
signal |
This signal will be emitted when user is requested to answer a question.
- Parameters
-
request | The request to show the user, e.g. "name: " or "password: ". |
echo | True if the response to the request SHOULD be echoed on the screen, False if the response MUST NOT be echoed to the screen. |
◆ result()
AsyncResult * Session::result |
( |
| ) |
|
Get AsyncResult that can be used to finish authentication operation
- Returns
- AsyncResult object or NULL if it is not set
◆ setResponse()
void Session::setResponse |
( |
const QString & |
response | ) |
|
Method for providing response to requests received via request signal.
- Parameters
-
response | Response from the user, typically a password |
◆ showError
void PolkitQt1::Agent::Session::showError |
( |
const QString & |
text | ) |
|
|
signal |
This signal will be emitted when there is information related to an error condition to be displayed to the user.
- Parameters
-
text | An error string to display to the user. |
◆ showInfo
void PolkitQt1::Agent::Session::showInfo |
( |
const QString & |
text | ) |
|
|
signal |
This signal will be emitted when there is information to be displayed to the user.
- Parameters
-
text | A string to be displayed to the user. |
The documentation for this class was generated from the following files: