Changeset View
Changeset View
Standalone View
Standalone View
core/polkitqt1-authority.h
Context not available. | |||||
46 | namespace PolkitQt1 | 46 | namespace PolkitQt1 | ||
---|---|---|---|---|---|
47 | { | 47 | { | ||
48 | 48 | | |||
49 | typedef QMap<QString, QString> DetailsMap; | ||||
50 | | ||||
49 | /** | 51 | /** | ||
50 | * \class Authority polkitqt1-authority.h Authority | 52 | * \class Authority polkitqt1-authority.h Authority | ||
51 | * \author Daniel Nicoletti <dantti85-pk@yahoo.com.br> | 53 | * \author Daniel Nicoletti <dantti85-pk@yahoo.com.br> | ||
Context not available. | |||||
210 | void checkAuthorization(const QString &actionId, const Subject &subject, | 212 | void checkAuthorization(const QString &actionId, const Subject &subject, | ||
211 | AuthorizationFlags flags); | 213 | AuthorizationFlags flags); | ||
212 | 214 | | |||
215 | /** | ||||
216 | * This function does the same as checkAuthorization(const QString&, const | ||||
217 | * Subject&, AuthorizationFlags), but also accepts a | ||||
218 | * DetailsMap parameter. This map can contain key/value pairs that, for | ||||
219 | * example, are used to expand placeholders in polkit authentication | ||||
220 | * messages that are formatted like "Authentication required to access | ||||
221 | * $(device)". For this example, when a key "device" exists in the map, | ||||
222 | * the "$(device)" will be replaced by the corresponding value in the map. | ||||
223 | * | ||||
224 | * \see checkAuthorization(const QString&, const Subject&, AuthorizationFlags) Base version of this method. | ||||
225 | */ | ||||
226 | void checkAuthorizationWithDetails( | ||||
bruns: please add a KF6 TODO, merge with checkAuthorization | |||||
@bruns The polkit-qt-1 repository is not a framework, so "KF6" could be misleading here. What about something like // TODO: merge with checkAuthorization when we decide to break binary compatibility. ? elvisangelaccio: @bruns The `polkit-qt-1` repository is not a framework, so "KF6" could be misleading here. | |||||
227 | const QString &actionId, const Subject &subject, | ||||
228 | AuthorizationFlags flags, const DetailsMap &details); | ||||
229 | | ||||
213 | /** | 230 | /** | ||
214 | * Synchronous version of the checkAuthorization method. | 231 | * Synchronous version of the checkAuthorization method. | ||
215 | * | 232 | * | ||
Context not available. | |||||
222 | Result checkAuthorizationSync(const QString &actionId, const Subject &subject, | 239 | Result checkAuthorizationSync(const QString &actionId, const Subject &subject, | ||
223 | AuthorizationFlags flags); | 240 | AuthorizationFlags flags); | ||
224 | 241 | | |||
242 | /** | ||||
243 | * This function does the same as checkAuthorizationSync(const QString&, | ||||
244 | * const Subject&, AuthorizationFlags), but also accepts a DetailsMap | ||||
245 | * parameter. | ||||
246 | * | ||||
247 | * \see checkAuthorization(const QString&, const Subject&, AuthorizationFlags, const DetailsMap&) for a description of the details parameter. | ||||
248 | * | ||||
249 | * \see checkAuthorizationSync(const QString&, const Subject, AuthorizationFlags) Base version of this method. | ||||
250 | */ | ||||
251 | Result checkAuthorizationSyncWithDetails(const QString &actionId, const Subject &subject, | ||||
252 | AuthorizationFlags flags, const DetailsMap &details); | ||||
253 | | ||||
225 | /** | 254 | /** | ||
226 | * This method can be used to cancel last authorization check. | 255 | * This method can be used to cancel last authorization check. | ||
227 | */ | 256 | */ | ||
Context not available. |
please add a KF6 TODO, merge with checkAuthorization