TrackerEndpointHttp
TrackerEndpointHttp is an endpoint implementation that exports a local TrackerSparqlConnection so it is accessible via HTTP requests.
Access to these endpoints may be managed via the block-remote-address signal, the boolean return value expressing whether the connection is blocked or not. Inspection of the requester address is left up to the user. The default value allows all requests independently of their provenance, users are encouraged to add a handler.
If the provided GTlsCertificate is NULL, the endpoint will allow plain HTTP connections. Users are encouraged to provide a certificate in order to use HTTPS.
As a security measure, and in compliance with the SPARQL 1.1 specifications, the HTTP endpoint does not support database updates or modifications in any way. The database is completely owned by the host.
A TrackerEndpointHttp may be created on a different thread/main context than the one creating the TrackerSparqlConnection.
TrackerEndpointHttp
GObject ╰──TrackerEndpoint ╰──TrackerEndpointHttp
The
Tracker.EndpointHttp
GObject.Object ╰──Tracker.Endpoint ╰──Tracker.EndpointHttp
The
Tracker.EndpointHttp
GObject.Object ╰──Tracker.Endpoint ╰──Tracker.EndpointHttp
The
Constructors
tracker_endpoint_http_new
TrackerEndpointHttp * tracker_endpoint_http_new (TrackerSparqlConnection * sparql_connection, guint port, GTlsCertificate * certificate, GCancellable * cancellable, GError ** error)
Sets up a Tracker endpoint to listen via HTTP, in the given port. If certificate is not NULL, HTTPS may be used to connect to the endpoint.
Parameters:
sparql_connection
–
port
–
HTTP port to listen to
certificate
(
[nullable])
–
certificate to use for encription, or NULL
cancellable
(
[nullable])
–
a GCancellable, or NULL
error
–
pointer to a GError
a TrackerEndpointDBus object.
Since : 3.1
Tracker.EndpointHttp.prototype.new
function Tracker.EndpointHttp.prototype.new(sparql_connection: Tracker.SparqlConnection, port: Number, certificate: Gio.TlsCertificate, cancellable: Gio.Cancellable): {
// javascript wrapper for 'tracker_endpoint_http_new'
}
Sets up a Tracker endpoint to listen via HTTP, in the given port. If certificate is not null, HTTPS may be used to connect to the endpoint.
Parameters:
HTTP port to listen to
certificate to use for encription, or null
a Gio.Cancellable, or null
a Tracker.EndpointDBus object.
Since : 3.1
Tracker.EndpointHttp.new
@raises(GLib.GError)
def Tracker.EndpointHttp.new (sparql_connection, port, certificate, cancellable):
#python wrapper for 'tracker_endpoint_http_new'
Sets up a Tracker endpoint to listen via HTTP, in the given port. If certificate is not None, HTTPS may be used to connect to the endpoint.
Parameters:
HTTP port to listen to
certificate to use for encription, or None
a Gio.Cancellable, or None
a Tracker.EndpointDBus object.
Since : 3.1
Signals
block-remote-address
gboolean block_remote_address_callback (TrackerEndpointHttp * self, GSocketAddress * address, gpointer user_data)
Allows control over the connections stablished. The given address is that of the requesting peer.
Returning FALSE in this handler allows the connection, returning TRUE blocks it. The default with no signal handlers connected is FALSE.
Parameters:
self
–
The TrackerNotifier
address
–
The socket address of the remote connection
user_data
–
Flags:
block-remote-address
function block_remote_address_callback(self: Tracker.EndpointHttp, address: Gio.SocketAddress, user_data: Object): {
// javascript callback for the 'block-remote-address' signal
}
Allows control over the connections stablished. The given address is that of the requesting peer.
Returning false in this handler allows the connection, returning true blocks it. The default with no signal handlers connected is false.
Parameters:
The Tracker.Notifier
The socket address of the remote connection
Flags:
block-remote-address
def block_remote_address_callback (self, address, *user_data):
#python callback for the 'block-remote-address' signal
Allows control over the connections stablished. The given address is that of the requesting peer.
Returning False in this handler allows the connection, returning True blocks it. The default with no signal handlers connected is False.
Parameters:
The Tracker.Notifier
The socket address of the remote connection
Flags:
Properties
http_certificate
“self.props.http_certificate” Gio.TlsCertificate
Flags : Read / Write / Construct Only
The results of the search are