~ubuntu-branches/ubuntu/oneiric/polkit-qt-1/oneiric

« back to all changes in this revision

Viewing changes to core/polkitqt1-authority.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-11-07 01:18:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101107011828-qf5lzf950ih0l250
Tags: 0.98.1~git20101107-0ubuntu1
* New upstream snapshot:
  - Drop kubuntu_01_fix_glib_ftbfs.diff, accepted upstream
  - Bump build-depend versions on polkit to >= 0.98

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
     *                      or an error has occurred
208
208
     *
209
209
     */
210
 
    void checkAuthorization(const QString &actionId, Subject *subject,
 
210
    void checkAuthorization(const QString &actionId, const Subject &subject,
211
211
                            AuthorizationFlags flags);
212
212
 
213
213
    /**
219
219
     *
220
220
     * \see checkAuthorization Asynchronous version of this method.
221
221
     */
222
 
    Result checkAuthorizationSync(const QString &actionId, Subject *subject,
 
222
    Result checkAuthorizationSync(const QString &actionId, const Subject &subject,
223
223
                                  AuthorizationFlags flags);
224
224
 
225
225
    /**
264
264
     * \param locale the locale of the authentication agent
265
265
     * \param objectPath the object path for the authentication agent
266
266
     */
267
 
    void registerAuthenticationAgent(Subject *subject, const QString &locale,
 
267
    void registerAuthenticationAgent(const Subject &subject, const QString &locale,
268
268
                                     const QString &objectPath);
269
269
 
270
270
    /**
279
279
     * \return \c true if the Authentication agent has been successfully registered
280
280
     *         \c false if the Authentication agent registration failed
281
281
    */
282
 
    bool registerAuthenticationAgentSync(Subject *subject, const QString &locale,
 
282
    bool registerAuthenticationAgentSync(const Subject &subject, const QString &locale,
283
283
                                         const QString &objectPath);
284
284
 
285
285
    /**
300
300
     * \return \c true if the Authentication agent has been successfully unregistered
301
301
     *         \c false if the Authentication agent unregistration failed
302
302
     */
303
 
    void unregisterAuthenticationAgent(Subject *subject, const QString &objectPath);
 
303
    void unregisterAuthenticationAgent(const Subject &subject, const QString &objectPath);
304
304
 
305
305
    /**
306
306
     * Unregisters an Authentication agent.
313
313
     * \return \c true if the Authentication agent has been successfully unregistered
314
314
     *         \c false if the Authentication agent unregistration failed
315
315
    */
316
 
    bool unregisterAuthenticationAgentSync(Subject *subject, const QString &objectPath);
 
316
    bool unregisterAuthenticationAgentSync(const Subject &subject, const QString &objectPath);
317
317
 
318
318
    /**
319
319
     * This method can be used to cancel the unregistration of the authentication agent.
330
330
     * \param cookie The cookie passed to the authentication agent from the authority.
331
331
     * \param identity The identity that was authenticated.
332
332
     */
333
 
    void authenticationAgentResponse(const QString &cookie, Identity *identity);
 
333
    void authenticationAgentResponse(const QString &cookie, const Identity &identity);
334
334
 
335
335
    /**
336
336
     * Provide response that \p identity successfully authenticated for the authentication request identified by \p cookie.
343
343
     * \return \c true if authority acknowledged the call, \c false if error is set.
344
344
     *
345
345
    */
346
 
    bool authenticationAgentResponseSync(const QString &cookie, Identity *identity);
 
346
    bool authenticationAgentResponseSync(const QString& cookie, const PolkitQt1::Identity& identity);
347
347
 
348
348
    /**
349
349
     * This method can be used to cancel the authenticationAgentResponseAsync method.
360
360
     * \param subject the subject to get temporary authorizations for
361
361
     *
362
362
     */
363
 
    void enumerateTemporaryAuthorizations(Subject *subject);
 
363
    void enumerateTemporaryAuthorizations(const Subject &subject);
364
364
 
365
365
    /**
366
366
     * Retrieves all temporary action that applies to \p subject
373
373
     *
374
374
     * \return List of all temporary authorizations
375
375
    */
376
 
    QList<TemporaryAuthorization *> enumerateTemporaryAuthorizationsSync(Subject *subject);
 
376
    TemporaryAuthorization::List enumerateTemporaryAuthorizationsSync(const Subject &subject);
377
377
 
378
378
    /**
379
379
     * This method can be used to cancel the enumerateTemporaryAuthorizationsAsync method.
389
389
 
390
390
     * \param subject the subject to revoke temporary authorizations from
391
391
     */
392
 
    void revokeTemporaryAuthorizations(Subject *subject);
 
392
    void revokeTemporaryAuthorizations(const Subject &subject);
393
393
 
394
394
    /**
395
395
     * Revokes all temporary authorizations that applies to \p subject
401
401
     * \return \c true if all temporary authorization were revoked
402
402
     *         \c false if the revoking failed
403
403
    */
404
 
    bool revokeTemporaryAuthorizationsSync(Subject *subject);
 
404
    bool revokeTemporaryAuthorizationsSync(const Subject &subject);
405
405
 
406
406
    /**
407
407
     * This method can be used to cancel the method revokeTemporaryAuthorizationsAsync.
504
504
     *
505
505
     * \note Free all TemporaryAuthorization objects using \p delete operator.
506
506
     */
507
 
    void enumerateTemporaryAuthorizationsFinished(QList<PolkitQt1::TemporaryAuthorization *>);
 
507
    void enumerateTemporaryAuthorizationsFinished(PolkitQt1::TemporaryAuthorization::List);
508
508
 
509
509
    /**
510
510
     * This signal is emmited when asynchronous method revokeTemporaryAuthorizations finishes.
534
534
}
535
535
 
536
536
Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitQt1::Authority::AuthorizationFlags)
537
 
Q_DECLARE_METATYPE(PolkitQt1::Authority::Result);
 
537
Q_DECLARE_METATYPE(PolkitQt1::Authority::Result)
538
538
 
539
539
#endif