Polkit.Subject¶
- Implementations:
Polkit.SystemBusName
,Polkit.UnixProcess
,Polkit.UnixSession
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Polkit.Subject¶
- Bases:
- Structure:
Polkit.Subject
is an abstract type for representing one or more processes.- classmethod from_string(str)¶
- Parameters:
str (
str
) – A string obtained fromPolkit.Subject.to_string
().- Raises:
- Returns:
A
Polkit.Subject
orNone
if error is set. Free withGObject.Object.unref
().- Return type:
Creates an object from str that implements the
Polkit.Subject
interface.
- equal(b)¶
- Parameters:
b (
Polkit.Subject
) – APolkit.Subject
.- Returns:
- Return type:
Checks if self and b are equal, ie. represent the same subject. However, avoid calling
Polkit.Subject.equal
() to compare two processes; for more information see thePolkitUnixProcess
documentation.This function can be used in e.g. g_hash_table_new().
- exists(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied
Asynchronously checks if self exists.
When the operation is finished, callback will be invoked in the
thread-default main loop
of the thread you are calling this method from. You can then callPolkit.Subject.exists_finish
() to get the result of the operation.
- exists_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – AGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toPolkit.Subject.exists
().- Raises:
- Returns:
- Return type:
Finishes checking whether a subject exists.
- exists_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
- Return type:
Checks if self exists.
This is a synchronous blocking call - the calling thread is blocked until a reply is received. See
Polkit.Subject.exists
() for the asynchronous version.
- hash()¶
- Returns:
A hash code.
- Return type:
Gets a hash code for self that can be used with e.g. g_hash_table_new().
- to_string()¶
-
Serializes self to a string that can be used in
Polkit.Subject.from_string
().
- do_equal(b) virtual¶
- Parameters:
b (
Polkit.Subject
) – APolkit.Subject
.- Returns:
- Return type:
Checks if a and b are equal, ie. represent the same subject. However, avoid calling
Polkit.Subject.equal
() to compare two processes; for more information see thePolkitUnixProcess
documentation.This function can be used in e.g. g_hash_table_new().
- do_exists(cancellable, callback, *user_data) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied
Asynchronously checks if subject exists.
When the operation is finished, callback will be invoked in the
thread-default main loop
of the thread you are calling this method from. You can then callPolkit.Subject.exists_finish
() to get the result of the operation.
- do_exists_finish(res) virtual¶
- Parameters:
res (
Gio.AsyncResult
) – AGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toPolkit.Subject.exists
().- Returns:
- Return type:
Finishes checking whether a subject exists.
- do_exists_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Returns:
- Return type:
Checks if subject exists.
This is a synchronous blocking call - the calling thread is blocked until a reply is received. See
Polkit.Subject.exists
() for the asynchronous version.
- do_hash() virtual¶
- Returns:
A hash code.
- Return type:
Gets a hash code for subject that can be used with e.g. g_hash_table_new().
- do_to_string() virtual¶
-
Serializes subject to a string that can be used in
Polkit.Subject.from_string
().