Response
Object Hierarchy:
Description:
public class Response :
Object,
Serializable
Inbound RPC envelope — matching Request.id, plus result or error.
After Client.call, check
error first. Successful calls put objects in result (never null; omit on
the wire when empty) and optional scalars in values (same
Gee.ArrayList of boxed GLib.Value as
Request.values). File.read-style string payloads may use msg /
msg_encode.
Usage Examples
Check error
var resp = yield rpc.call(req);
if (resp.error != null)
GLib.warning("%s", resp.error.message);
Object result
foreach (var obj in resp.result)
stdout.printf("%s\n", obj.get_type().name());
Positional values
if (resp.values.size > 0)
stdout.printf("%d\n", resp.values.get(0).get_int());
See also:
Request, Client
Content:
Properties:
- public Error? error { get; set; }
- public int id { get; set; }
- public string msg { get; set; }
Scalar string payload (e.g. File.read). Empty when unused.
- public int msg_encode { get; set; }
Encoding of msg
for File.read.
- public ArrayList<Object> result { get; set; }
Object list on the wire (length 0, 1, or N).
- public ArrayList<Value?> values { get; set; }
Positional returns (daemon → client), GIR order.
Static methods:
Creation methods:
Methods:
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface OLLMrpc.Bin.Serializable