Infinity.Request¶
| Implementations: | |
|---|---|
| None | |
Virtual Methods¶
| do_finished(result, error) | |
| do_is_local() | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| progress | float | r | Percentage of completion of the request | 
| type | str | r/w/co | A string identifier for the type of the request | 
Fields¶
None
Class Details¶
- 
class Infinity.Request¶
- Bases: - GObject.GInterface- Structure: - Infinity.RequestInterface- Infinity.Requestis an opaque data type. You should only access it via the public API functions.- 
classmethod error_quark()¶
- Returns: - A GQuark. - Return type: - int- Error domain for request errors. Errors in this domain will be from the - Infinity.RequestErrorenumeration. See- GLib.Errorfor information on error domains.
 - 
classmethod strerror(code)¶
- Parameters: - code ( - Infinity.RequestError) – An error code from the- Infinity.RequestErrorenumeration.- Returns: - A static string that must not be freed. - Return type: - str- Returns a human-readable string for the given error code. 
 - 
fail(error)¶
- Parameters: - error ( - GLib.Error) – A- GLib.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) – A- Infinity.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: - Trueif the request is local and- Falseif it is remote.- Return type: - bool- 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) –
 
- result (
 
- 
classmethod 
Signal Details¶
- 
Infinity.Request.signals.finished(request, result, error)¶
- Signal Name: - finished- Flags: - Parameters: - request (Infinity.Request) – The object which received the signal
- result (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.
- request (