# 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 <structname>TrackerEndpointHttp</structname> object represents a public connection to a TrackerSparqlConnection on a HTTP port.

## Tracker.EndpointHttp

    GObject.Object
        ╰──Tracker.Endpoint
            ╰──Tracker.EndpointHttp

The <structname>TrackerEndpointHttp</structname> object represents a public connection to a Tracker.SparqlConnection on a HTTP port.

## Tracker.EndpointHttp

    GObject.Object
        ╰──Tracker.Endpoint
            ╰──Tracker.EndpointHttp

The <structname>TrackerEndpointHttp</structname> object represents a public connection to a Tracker.SparqlConnection on a HTTP port.

### 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` –

a TrackerSparqlConnection

`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

Returns ( [transfer: full]) –

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:

`sparql_connection` (Tracker.SparqlConnection) –

a Tracker.SparqlConnection

`port` (Number) –

HTTP port to listen to

`certificate` (Gio.TlsCertificate) –

certificate to use for encription, or NULL

`cancellable` (Gio.Cancellable) –

a GCancellable, or NULL

Returns (Tracker.EndpointHttp) –

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 NULL, HTTPS may be used to connect to the endpoint.

Parameters:

`sparql_connection` (Tracker.SparqlConnection) –

a Tracker.SparqlConnection

`port` (int) –

HTTP port to listen to

`certificate` (Gio.TlsCertificate) –

certificate to use for encription, or NULL

`cancellable` (Gio.Cancellable) –

a GCancellable, or NULL

Returns (Tracker.EndpointHttp) –

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` –
No description available
Returns –
No description available

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:

`self` (Tracker.EndpointHttp) –

The Tracker.Notifier

`address` (Gio.SocketAddress) –

The socket address of the remote connection

`user_data` (Object) –
No description available
Returns (Number) –
No description available

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:

`self` (Tracker.EndpointHttp) –

The Tracker.Notifier

`address` (Gio.SocketAddress) –

The socket address of the remote connection

`user_data` (variadic) –
No description available
Returns (bool) –
No description available

Flags:

### Properties

#### http-certificate

    “http-certificate” GTlsCertificate*

Flags : Read / Write / Construct Only

#### http-certificate

    “http-certificate” Gio.TlsCertificate

Flags : Read / Write / Construct Only

#### http_certificate

    “self.props.http_certificate” Gio.TlsCertificate

Flags : Read / Write / Construct Only

#### http-port

    “http-port” guint

Flags : Read / Write / Construct Only

#### http-port

    “http-port” Number

Flags : Read / Write / Construct Only

#### http_port

    “self.props.http_port” int

Flags : Read / Write / Construct Only

The results of the search are