Infinity.Request¶
- Implementations:
None
Methods¶
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Percentage of completion of the request |
||
r/w/co |
A string identifier for the type of the request |
Signals¶
Name |
Short Description |
---|---|
This signal is emitted when the request finishes. |
Fields¶
None
Class Details¶
- class Infinity.Request¶
- Bases:
- Structure:
Infinity.Request
is an opaque data type. You should only access it via the public API functions.- classmethod error_quark()¶
- Returns:
A GQuark.
- Return type:
Error domain for request errors. Errors in this domain will be from the
Infinity.RequestError
enumeration. SeeGLib.Error
for information on error domains.
- classmethod strerror(code)¶
- Parameters:
code (
Infinity.RequestError
) – An error code from theInfinity.RequestError
enumeration.- Returns:
A static string that must not be freed.
- Return type:
Returns a human-readable string for the given error code.
- fail(error)¶
- Parameters:
error (
GLib.Error
) – AGLib.Error
describing the reason for why the request failed.
Declares the request as failed by emitting the
Infinity.Request
::finished
signal with the given error.
- finish(result)¶
- Parameters:
result (
Infinity.RequestResult
) – AInfinity.RequestResult
containing the result of the request.
Declares the request as succeeded by emitting the
Infinity.Request
::finished
signal with the given result. The function takes ownership of result.
- is_local()¶
-
Returns whether self is local or remote. A local request was triggered by a local API call, whereas a remote request was caused by a remote participant from the network.
- do_finished(result, error) virtual¶
- Parameters:
result (
Infinity.RequestResult
) –error (
GLib.Error
) –
Signal Details¶
- Infinity.Request.signals.finished(request, result, error)¶
- Signal Name:
finished
- Flags:
- Parameters:
request (
Infinity.Request
) – The object which received the signalresult (
Infinity.RequestResult
) – AInfinity.RequestResult
which contains the result of the request.error (
GLib.Error
) – Error information in case the request failed, orNone
otherwise.
This signal is emitted when the request finishes. If error is non-
None
the request failed, otherwise it finished successfully.
Property Details¶
- Infinity.Request.props.progress¶
-
Percentage of completion of the request