Top |
guint32 | qrtr_node_service_info_get_service () |
guint32 | qrtr_node_service_info_get_port () |
guint32 | qrtr_node_service_info_get_version () |
guint32 | qrtr_node_service_info_get_instance () |
void | qrtr_node_service_info_free () |
guint32 | qrtr_node_get_id () |
QrtrBus * | qrtr_node_peek_bus () |
QrtrBus * | qrtr_node_get_bus () |
GList * | qrtr_node_peek_service_info_list () |
GList * | qrtr_node_get_service_info_list () |
gint32 | qrtr_node_lookup_port () |
gint32 | qrtr_node_lookup_service () |
void | qrtr_node_wait_for_services () |
gboolean | qrtr_node_wait_for_services_finish () |
QrtrNodeServiceInfo | |
#define | QRTR_NODE_BUS |
#define | QRTR_NODE_ID |
#define | QRTR_NODE_SIGNAL_SERVICE_ADDED |
#define | QRTR_NODE_SIGNAL_SERVICE_REMOVED |
#define | QRTR_NODE_SIGNAL_REMOVED |
QrtrNode |
QrtrNode represents a device on the QRTR bus and can be used to look up services published by that device.
guint32
qrtr_node_service_info_get_service (QrtrNodeServiceInfo *info
);
Get the service number from the QrtrNodeServiceInfo.
Since: 1.0
guint32
qrtr_node_service_info_get_port (QrtrNodeServiceInfo *info
);
Get the port number from the QrtrNodeServiceInfo.
Since: 1.0
guint32
qrtr_node_service_info_get_version (QrtrNodeServiceInfo *info
);
Get the version number from the QrtrNodeServiceInfo.
Since: 1.0
guint32
qrtr_node_service_info_get_instance (QrtrNodeServiceInfo *info
);
Get the instance number from the QrtrNodeServiceInfo.
Since: 1.0
void
qrtr_node_service_info_free (QrtrNodeServiceInfo *info
);
Frees a single QrtrNodeServiceInfo, as returned by qrtr_node_get_service_info_list()
.
Since: 1.0
guint32
qrtr_node_get_id (QrtrNode *self
);
Gets the node ID in the QRTR bus.
Since: 1.0
QrtrBus *
qrtr_node_peek_bus (QrtrNode *self
);
Get the QrtrBus where this node is available, without increasing the reference count on the returned object.
Since: 1.0
QrtrBus *
qrtr_node_get_bus (QrtrNode *self
);
Get the QrtrBus where this node is available.
Since: 1.0
GList *
qrtr_node_peek_service_info_list (QrtrNode *self
);
Get the list of services currently supported by the QrtrNode.
a GList of QrtrNodeServiceInfo elements. Do not
free the returned object, it is owned by self
.
[element-type QrtrNodeServiceInfo][transfer none]
Since: 1.0
GList *
qrtr_node_get_service_info_list (QrtrNode *self
);
Get the list of services currently supported by the QrtrNode.
a GList of QrtrNodeServiceInfo elements, that
must be freed with g_list_free_full()
using qrtr_node_service_info_free()
as GDestroyNotify.
[element-type QrtrNodeServiceInfo][transfer full]
Since: 1.0
gint32 qrtr_node_lookup_port (QrtrNode *self
,guint32 service
);
If a server has announced itself for the given node and service number, return the port number of that service.
If multiple instances are registered, this method returns the port number for the service with the highest version number.
Since: 1.0
gint32 qrtr_node_lookup_service (QrtrNode *self
,guint32 port
);
If a server has announced itself for the given node and port number, return the service it serves.
Since: 1.0
void qrtr_node_wait_for_services (QrtrNode *self
,GArray *services
,guint timeout_ms
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously waits until all the services listed in services
are present
on the node.
The operation may fail if any of the requested services isn't notified, or if the node is removed from the bus while waiting.
When the operation is finished callback
will be called. You can then call
qrtr_node_wait_for_services_finish()
to get the result of the
operation.
self |
a QrtrNode. |
|
services |
a GArray of service types. |
[in][element-type guint32] |
timeout_ms |
the timeout, in milliseconds, to wait for the the services to be exposed in the node. |
|
cancellable |
a GCancellable, or NULL. |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
user data to pass to |
Since: 1.0
gboolean qrtr_node_wait_for_services_finish (QrtrNode *self
,GAsyncResult *result
,GError **error
);
Finishes an operation started with qrtr_node_wait_for_services()
.
Since: 1.0
typedef struct _QrtrNodeServiceInfo QrtrNodeServiceInfo;
Information for a service instance in the QrtrNode.
Since: 1.0
#define QRTR_NODE_SIGNAL_SERVICE_ADDED "service-added"
Symbol defining the “service-added” signal.
Since: 1.0
#define QRTR_NODE_SIGNAL_SERVICE_REMOVED "service-removed"
Symbol defining the “service-removed” signal.
Since: 1.0
#define QRTR_NODE_SIGNAL_REMOVED "node-removed"
Symbol defining the “node-removed” signal.
Since: 1.0
“bus”
property“bus” QrtrBus *
QRTR bus.
Owner: QrtrNode
Flags: Read / Write / Construct Only
Since: 1.0
“node-id”
property “node-id” guint
ID of the QRTR node.
Owner: QrtrNode
Flags: Read / Write / Construct Only
Default value: 0
Since: 1.0
“node-removed”
signalvoid user_function (QrtrNode *self, gpointer user_data)
The ::node-removed signal is emitted when the node fully disappears from the QRTR bus.
Flags: Run Last
Since: 1.0
“service-added”
signalvoid user_function (QrtrNode *self, guint service, gpointer user_data)
The ::service-added signal is emitted when a new service registers on the QRTR node.
self |
the QrtrNode |
|
service |
the service ID of the service that has been added |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.0
“service-removed”
signalvoid user_function (QrtrNode *self, guint service, gpointer user_data)
The ::service-removed signal is emitted when a service deregisters from the QRTR node.
self |
the QrtrNode |
|
service |
the service ID of the service that was removed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.0