/usr/share/gir-1.0/PolkitAgent-1.0.gir is in libpolkit-agent-1-dev 0.104-1ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | <?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.2"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GLib" version="2.0"/>
<include name="GObject" version="2.0"/>
<include name="Gio" version="2.0"/>
<include name="Polkit" version="1.0"/>
<package name="polkit-agent-1"/>
<c:include name="polkitagent/polkitagent.h"/>
<namespace name="PolkitAgent"
version="1.0"
shared-library="libpolkit-agent-1.so.0"
c:identifier-prefixes="PolkitAgent"
c:symbol-prefixes="polkit_agent">
<class name="Listener"
c:symbol-prefix="listener"
c:type="PolkitAgentListener"
parent="GObject.Object"
abstract="1"
glib:type-name="PolkitAgentListener"
glib:get-type="polkit_agent_listener_get_type"
glib:type-struct="ListenerClass">
<doc xml:whitespace="preserve">#PolkitAgentListener is an abstract base class used for implementing authentication
agents. To implement an authentication agent, simply subclass #PolkitAgentListener and
implement the @initiate_authentication and @initiate_authentication_finish methods.
Typically authentication agents use #PolkitAgentSession to
authenticate users (via passwords) and communicate back the
authentication result to the PolicyKit daemon. This is however not
requirement. Depending on the system an authentication agent may
use other means (such as a Yes/No dialog) to obtain sufficient
evidence that the user is one of the requested identities.
To register a #PolkitAgentListener with the PolicyKit daemon, use
polkit_agent_listener_register().</doc>
<function name="unregister"
c:identifier="polkit_agent_listener_unregister">
<doc xml:whitespace="preserve">Unregisters @listener.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="registration_handle" transfer-ownership="none">
<doc xml:whitespace="preserve">A handle obtained from polkit_agent_listener_register().</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<virtual-method name="initiate_authentication"
invoker="initiate_authentication"
introspectable="0">
<doc xml:whitespace="preserve">Called on a registered authentication agent (see
polkit_agent_listener_register()) when the user owning the session
needs to prove he is one of the identities listed in @identities.
When the user is done authenticating (for example by dismissing an
authentication dialog or by successfully entering a password or
otherwise proving the user is one of the identities in
@identities), @callback will be invoked. The caller then calls
polkit_agent_listener_initiate_authentication_finish() to get the
result.
#PolkitAgentListener derived subclasses imlementing this method
<emphasis>MUST</emphasis> not ignore @cancellable; callers of this
function can and will use it. Additionally, @callback must be
invoked in the <link
linkend="g-main-context-push-thread-default">thread-default main
loop</link> of the thread that this method is called from.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="action_id" transfer-ownership="none">
<doc xml:whitespace="preserve">The action to authenticate for.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="message" transfer-ownership="none">
<doc xml:whitespace="preserve">The message to present to the user.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:whitespace="preserve">A themed icon name representing the action or %NULL.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="details" transfer-ownership="none">
<doc xml:whitespace="preserve">Details describing the action.</doc>
<type name="Polkit.Details" c:type="PolkitDetails*"/>
</parameter>
<parameter name="cookie" transfer-ownership="none">
<doc xml:whitespace="preserve">The cookie for the authentication request.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="identities" transfer-ownership="none">
<doc xml:whitespace="preserve">A list of #PolkitIdentity objects that the user can choose to authenticate as.</doc>
<type name="GLib.List" c:type="GList*">
<type name="gpointer" c:type="gpointer"/>
</type>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
allow-none="1">
<doc xml:whitespace="preserve">A #GCancellable.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
allow-none="1"
scope="async"
closure="8">
<doc xml:whitespace="preserve">Function to call when the user is done authenticating.</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" closure="8">
<doc xml:whitespace="preserve">Data to pass to @callback.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="initiate_authentication_finish"
invoker="initiate_authentication_finish"
throws="1">
<doc xml:whitespace="preserve">Finishes an authentication request from the PolicyKit daemon, see
polkit_agent_listener_initiate_authentication() for details.</doc>
<return-value transfer-ownership="none">
<doc xml:whitespace="preserve">%TRUE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="res" transfer-ownership="none">
<doc xml:whitespace="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to polkit_agent_listener_initiate_authentication().</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</virtual-method>
<method name="initiate_authentication"
c:identifier="polkit_agent_listener_initiate_authentication"
introspectable="0">
<doc xml:whitespace="preserve">Called on a registered authentication agent (see
polkit_agent_listener_register()) when the user owning the session
needs to prove he is one of the identities listed in @identities.
When the user is done authenticating (for example by dismissing an
authentication dialog or by successfully entering a password or
otherwise proving the user is one of the identities in
@identities), @callback will be invoked. The caller then calls
polkit_agent_listener_initiate_authentication_finish() to get the
result.
#PolkitAgentListener derived subclasses imlementing this method
<emphasis>MUST</emphasis> not ignore @cancellable; callers of this
function can and will use it. Additionally, @callback must be
invoked in the <link
linkend="g-main-context-push-thread-default">thread-default main
loop</link> of the thread that this method is called from.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="action_id" transfer-ownership="none">
<doc xml:whitespace="preserve">The action to authenticate for.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="message" transfer-ownership="none">
<doc xml:whitespace="preserve">The message to present to the user.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:whitespace="preserve">A themed icon name representing the action or %NULL.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="details" transfer-ownership="none">
<doc xml:whitespace="preserve">Details describing the action.</doc>
<type name="Polkit.Details" c:type="PolkitDetails*"/>
</parameter>
<parameter name="cookie" transfer-ownership="none">
<doc xml:whitespace="preserve">The cookie for the authentication request.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="identities" transfer-ownership="none">
<doc xml:whitespace="preserve">A list of #PolkitIdentity objects that the user can choose to authenticate as.</doc>
<type name="GLib.List" c:type="GList*">
<type name="gpointer" c:type="gpointer"/>
</type>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
allow-none="1">
<doc xml:whitespace="preserve">A #GCancellable.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
allow-none="1"
scope="async"
closure="8">
<doc xml:whitespace="preserve">Function to call when the user is done authenticating.</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none">
<doc xml:whitespace="preserve">Data to pass to @callback.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="initiate_authentication_finish"
c:identifier="polkit_agent_listener_initiate_authentication_finish"
throws="1">
<doc xml:whitespace="preserve">Finishes an authentication request from the PolicyKit daemon, see
polkit_agent_listener_initiate_authentication() for details.</doc>
<return-value transfer-ownership="none">
<doc xml:whitespace="preserve">%TRUE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="res" transfer-ownership="none">
<doc xml:whitespace="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to polkit_agent_listener_initiate_authentication().</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</method>
<method name="register"
c:identifier="polkit_agent_listener_register"
throws="1">
<doc xml:whitespace="preserve">Registers @listener with the PolicyKit daemon as an authentication
agent for @subject. This is implemented by registering a D-Bus
object at @object_path on the unique name assigned by the system
message bus.
Whenever the PolicyKit daemon needs to authenticate a processes
that is related to @subject, the methods
polkit_agent_listener_initiate_authentication() and
polkit_agent_listener_initiate_authentication_finish() will be
invoked on @listener.
Note that registration of an authentication agent can fail; for
example another authentication agent may already be registered for
@subject.
Note that the calling thread is blocked until a reply is received.
registration handle that can be used with
polkit_agent_listener_unregister().</doc>
<return-value transfer-ownership="full">
<doc xml:whitespace="preserve">%NULL if @error is set, otherwise a</doc>
<type name="gpointer" c:type="gpointer"/>
</return-value>
<parameters>
<parameter name="flags" transfer-ownership="none">
<doc xml:whitespace="preserve">A set of flags from the #PolkitAgentRegisterFlags enumeration.</doc>
<type name="RegisterFlags" c:type="PolkitAgentRegisterFlags"/>
</parameter>
<parameter name="subject" transfer-ownership="none">
<doc xml:whitespace="preserve">The subject to become an authentication agent for, typically a #PolkitUnixSession object.</doc>
<type name="Polkit.Subject" c:type="PolkitSubject*"/>
</parameter>
<parameter name="object_path" transfer-ownership="none">
<doc xml:whitespace="preserve">The D-Bus object path to use for the authentication agent or %NULL for the default object path.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
allow-none="1">
<doc xml:whitespace="preserve">A #GCancellable or %NULL.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="ListenerClass"
c:type="PolkitAgentListenerClass"
glib:is-gtype-struct-for="Listener">
<doc xml:whitespace="preserve">VFuncs that authentication agents needs to implement.</doc>
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="initiate_authentication" introspectable="0">
<callback name="initiate_authentication" introspectable="0">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="listener" transfer-ownership="none">
<type name="Listener" c:type="PolkitAgentListener*"/>
</parameter>
<parameter name="action_id" transfer-ownership="none">
<doc xml:whitespace="preserve">The action to authenticate for.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="message" transfer-ownership="none">
<doc xml:whitespace="preserve">The message to present to the user.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:whitespace="preserve">A themed icon name representing the action or %NULL.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="details" transfer-ownership="none">
<doc xml:whitespace="preserve">Details describing the action.</doc>
<type name="Polkit.Details" c:type="PolkitDetails*"/>
</parameter>
<parameter name="cookie" transfer-ownership="none">
<doc xml:whitespace="preserve">The cookie for the authentication request.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="identities" transfer-ownership="none">
<doc xml:whitespace="preserve">A list of #PolkitIdentity objects that the user can choose to authenticate as.</doc>
<type name="GLib.List" c:type="GList*">
<type name="gpointer" c:type="gpointer"/>
</type>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
allow-none="1">
<doc xml:whitespace="preserve">A #GCancellable.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
allow-none="1"
scope="async"
closure="9">
<doc xml:whitespace="preserve">Function to call when the user is done authenticating.</doc>
<type name="Gio.AsyncReadyCallback"
c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" closure="9">
<doc xml:whitespace="preserve">Data to pass to @callback.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="initiate_authentication_finish">
<callback name="initiate_authentication_finish" throws="1">
<return-value transfer-ownership="none">
<doc xml:whitespace="preserve">%TRUE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="listener" transfer-ownership="none">
<type name="Listener" c:type="PolkitAgentListener*"/>
</parameter>
<parameter name="res" transfer-ownership="none">
<doc xml:whitespace="preserve">A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to polkit_agent_listener_initiate_authentication().</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_polkit_reserved0" introspectable="0">
<callback name="_polkit_reserved0">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved1" introspectable="0">
<callback name="_polkit_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved2" introspectable="0">
<callback name="_polkit_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved3" introspectable="0">
<callback name="_polkit_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved4" introspectable="0">
<callback name="_polkit_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved5" introspectable="0">
<callback name="_polkit_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved6" introspectable="0">
<callback name="_polkit_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_polkit_reserved7" introspectable="0">
<callback name="_polkit_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<bitfield name="RegisterFlags"
glib:type-name="PolkitAgentRegisterFlags"
glib:get-type="polkit_agent_register_flags_get_type"
c:type="PolkitAgentRegisterFlags">
<doc xml:whitespace="preserve">Flags used in polkit_agent_listener_register().</doc>
<member name="none"
value="0"
c:identifier="POLKIT_AGENT_REGISTER_FLAGS_NONE"
glib:nick="none"/>
<member name="run_in_thread"
value="1"
c:identifier="POLKIT_AGENT_REGISTER_FLAGS_RUN_IN_THREAD"
glib:nick="run-in-thread"/>
</bitfield>
<class name="Session"
c:symbol-prefix="session"
c:type="PolkitAgentSession"
parent="GObject.Object"
glib:type-name="PolkitAgentSession"
glib:get-type="polkit_agent_session_get_type"
glib:type-struct="SessionClass">
<doc xml:whitespace="preserve">The #PolkitAgentSession class is an abstraction used for interacting with the
native authentication system (for example PAM) for obtaining authorizations.
This class is typically used together with instances that are derived from
the #PolkitAgentListener abstract base class.
To perform the actual authentication, #PolkitAgentSession uses a trusted suid helper.
The authentication conversation is done through a pipe. This is transparent; the user
only need to handle the
#PolkitAgentSession::request,
#PolkitAgentSession::show-info,
#PolkitAgentSession::show-error and
#PolkitAgentSession::completed
signals and invoke polkit_agent_session_response() in response to requests.
If the user successfully authenticates, the authentication helper will invoke
a method on the PolicyKit daemon (see polkit_authority_authentication_agent_response_sync())
with the given @cookie. Upon receiving a positive response from the PolicyKit daemon (via
the authentication helper), the #PolkitAgentSession::completed signal will be emitted
with the @gained_authorization paramter set to %TRUE.
If the user is unable to authenticate, the #PolkitAgentSession::completed signal will
be emitted with the @gained_authorization paramter set to %FALSE.</doc>
<constructor name="new" c:identifier="polkit_agent_session_new">
<doc xml:whitespace="preserve">Creates a new authentication session.
The caller should connect to the
#PolkitAgentSession::request,
#PolkitAgentSession::show-info,
#PolkitAgentSession::show-error and
#PolkitAgentSession::completed
signals and then call polkit_agent_session_initiate() to initiate the authentication session.</doc>
<return-value transfer-ownership="full">
<doc xml:whitespace="preserve">A #PolkitAgentSession. Free with g_object_unref().</doc>
<type name="Session" c:type="PolkitAgentSession*"/>
</return-value>
<parameters>
<parameter name="identity" transfer-ownership="none">
<doc xml:whitespace="preserve">The identity to authenticate.</doc>
<type name="Polkit.Identity" c:type="PolkitIdentity*"/>
</parameter>
<parameter name="cookie" transfer-ownership="none">
<doc xml:whitespace="preserve">The cookie obtained from the PolicyKit daemon</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</constructor>
<method name="cancel" c:identifier="polkit_agent_session_cancel">
<doc xml:whitespace="preserve">Cancels an authentication session. This will make @session emit the #PolkitAgentSession::completed
signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="initiate" c:identifier="polkit_agent_session_initiate">
<doc xml:whitespace="preserve">Initiates the authentication session. Before calling this method,
make sure to connect to the various signals. The signals will be
emitted in the <link
linkend="g-main-context-push-thread-default">thread-default main
loop</link> that this method is invoked from.
Use polkit_agent_session_cancel() to cancel the session.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</method>
<method name="response" c:identifier="polkit_agent_session_response">
<doc xml:whitespace="preserve">Function for providing response to requests received
via the #PolkitAgentSession::request signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="response" transfer-ownership="none">
<doc xml:whitespace="preserve">Response from the user, typically a password.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</method>
<property name="cookie"
writable="1"
construct-only="1"
transfer-ownership="none">
<doc xml:whitespace="preserve">The cookie obtained from the PolicyKit daemon</doc>
<type name="utf8"/>
</property>
<property name="identity"
writable="1"
construct-only="1"
transfer-ownership="none">
<doc xml:whitespace="preserve">The identity to authenticate.</doc>
<type name="Polkit.Identity"/>
</property>
<glib:signal name="completed" when="last">
<doc xml:whitespace="preserve">Emitted when the authentication session has been completed or
cancelled. The @gained_authorization parameter is %TRUE only if
the user successfully authenticated.
Upon receiving this signal, the user should free @session using g_object_unref().</doc>
<return-value transfer-ownership="none">
<type name="none"/>
</return-value>
<parameters>
<parameter name="gained_authorization" transfer-ownership="none">
<doc xml:whitespace="preserve">%TRUE only if the authorization was successfully obtained.</doc>
<type name="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="request" when="last">
<doc xml:whitespace="preserve">Emitted when the user is requested to answer a question.
When the response has been collected from the user, call polkit_agent_session_response().</doc>
<return-value transfer-ownership="none">
<type name="none"/>
</return-value>
<parameters>
<parameter name="request" transfer-ownership="none">
<doc xml:whitespace="preserve">The request to show the user, e.g. "name: " or "password: ".</doc>
<type name="utf8"/>
</parameter>
<parameter name="echo_on" transfer-ownership="none">
<doc xml:whitespace="preserve">%TRUE if the response to the request SHOULD be echoed on the screen, %FALSE if the response MUST NOT be echoed to the screen.</doc>
<type name="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="show-error" when="last">
<doc xml:whitespace="preserve">Emitted when there is information related to an error condition to be displayed to the user.</doc>
<return-value transfer-ownership="none">
<type name="none"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:whitespace="preserve">An error string to display to the user.</doc>
<type name="utf8"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="show-info" when="last">
<doc xml:whitespace="preserve">Emitted when there is information to be displayed to the user.</doc>
<return-value transfer-ownership="none">
<type name="none"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:whitespace="preserve">A string to display to the user.</doc>
<type name="utf8"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="SessionClass"
c:type="PolkitAgentSessionClass"
disguised="1"
glib:is-gtype-struct-for="Session">
</record>
<class name="TextListener"
c:symbol-prefix="text_listener"
c:type="PolkitAgentTextListener"
parent="Listener"
glib:type-name="PolkitAgentTextListener"
glib:get-type="polkit_agent_text_listener_get_type">
<doc xml:whitespace="preserve">#PolkitAgentTextListener is an #PolkitAgentListener implementation
that interacts with the user using a textual interface.</doc>
<implements name="Gio.Initable"/>
<constructor name="new"
c:identifier="polkit_agent_text_listener_new"
throws="1">
<doc xml:whitespace="preserve">Creates a new #PolkitAgentTextListener for authenticating the user
via an textual interface on the controlling terminal
(e.g. <filename>/dev/tty</filename>). This can fail if e.g. the
current process has no controlling terminal.</doc>
<return-value transfer-ownership="full">
<doc xml:whitespace="preserve">A #PolkitAgentTextListener or %NULL if @error is set. Free with g_object_unref() when done with it.</doc>
<type name="Listener" c:type="PolkitAgentListener*"/>
</return-value>
<parameters>
<parameter name="cancellable"
transfer-ownership="none"
allow-none="1">
<doc xml:whitespace="preserve">A #GCancellable or %NULL.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</constructor>
</class>
<constant name="_INSIDE_POLKIT_AGENT_H"
value="1"
c:type="_POLKIT_AGENT_INSIDE_POLKIT_AGENT_H">
<type name="gint" c:type="gint"/>
</constant>
<function name="register_listener"
c:identifier="polkit_agent_register_listener"
throws="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="listener" transfer-ownership="none">
<type name="Listener" c:type="PolkitAgentListener*"/>
</parameter>
<parameter name="subject" transfer-ownership="none">
<type name="Polkit.Subject" c:type="PolkitSubject*"/>
</parameter>
<parameter name="object_path" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>
|