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.Requestis 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.RequestErrorenumeration. SeeGLib.Errorfor information on error domains.
- classmethod strerror(code)¶
- Parameters:
code (
Infinity.RequestError) – An error code from theInfinity.RequestErrorenumeration.- 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.Errordescribing the reason for why the request failed.
Declares the request as failed by emitting the
Infinity.Request::finishedsignal with the given error.
- finish(result)¶
- Parameters:
result (
Infinity.RequestResult) – AInfinity.RequestResultcontaining the result of the request.
Declares the request as succeeded by emitting the
Infinity.Request::finishedsignal 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) –
Default signal handler of the
Infinity.Request::finishedsignal.
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.RequestResultwhich contains the result of the request.error (
GLib.Error) – Error information in case the request failed, orNoneotherwise.
This signal is emitted when the request finishes. If error is non-
Nonethe request failed, otherwise it finished successfully.
Property Details¶
- Infinity.Request.props.progress¶
-
Percentage of completion of the request